afm-unit: Simplify the Makefile 97/21397/1
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 15 May 2019 15:38:08 +0000 (17:38 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Thu, 23 May 2019 14:08:54 +0000 (16:08 +0200)
The use of AFM_CONFIG_DIR brings nothing except confusion.

Bug-AGL: SPEC-2436

Change-Id: I21a18ad98349bf6799b72061523bc353ad3d6c3f
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
conf/unit/generate-unit-conf/Makefile
conf/unit/generate-unit-conf/service.inc

index 562f025..2849d6f 100644 (file)
@@ -6,20 +6,15 @@ FILES = $(MAIN) binder.inc provided-api.inc provided-binding.inc service.inc Mak
 
 DIR = ..
 
-#AFM_CONFIG_DIR ?= /etc/afm
-AFM_CONFIG_DIR ?= "@afm_confdir@"
-
-C = -DAFM_CONFIG_DIR=$(AFM_CONFIG_DIR)
-
 D = -DAGL_DEVEL
 
 all: $(DIR)/afm-unit.conf.in $(DIR)/afm-unit-debug.conf.in
 
 $(DIR)/afm-unit.conf.in: $(FILES)
        @echo generating $@
-       @m4 $C $< | sed '/^[ \t]*\\*[ \t]*$$/d' > $@
+       @m4 $< | sed '/^[ \t]*\\*[ \t]*$$/d' > $@
 
 $(DIR)/afm-unit-debug.conf.in: $(FILES)
        @echo generating $@
-       @m4 $C $D $< | sed '/^[ \t]*\\*[ \t]*$$/d' > $@
+       @m4 $D $< | sed '/^[ \t]*\\*[ \t]*$$/d' > $@
 
index 839533d..dd585d5 100644 (file)
@@ -64,8 +64,8 @@ After=UNIT_NAME_API_SOCKET({{name}},%i)
 %nl
 
 [Service]
-EnvironmentFile=-AFM_CONFIG_DIR/unit.env.d/*
-EnvironmentFile=-AFM_CONFIG_DIR/widget.env.d/{{:id}}/*
+EnvironmentFile=-@afm_confdir@/unit.env.d/*
+EnvironmentFile=-@afm_confdir@/widget.env.d/{{:id}}/*
 SmackProcessLabel=User::App::{{:id}}
 SuccessExitStatus=0 SIGKILL