From 245413041c1ddee4bb7d752f6f1044750b887df8 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sun, 17 Jul 2016 00:10:35 +0200 Subject: build: Define PACKAGE_LOAD_PATH in Makefile. Previously PACKAGE_LOAD_PATH was set in config header which wasn't correctly expanded due to the presence of ${prefix} in ${moduledir}. Let 'make' handle the expansion. * Makefile.am (AM_CPPFLAGS): New variable. (cron_CPPFLAGS, crontab_CPPFLAGS, mcron_CPPFLAGS): Use it. * configure.ac (PACKAGE_LOAD_PATH): Undefine it. (AC_CONFIG_HEADER): Remove macro. * src/mcron.c: Adapt to it. --- Makefile.am | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index ddb1c26..d01e730 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,19 +19,20 @@ bin_PROGRAMS = mcron crontab sbin_PROGRAMS = cron +AM_CPPFLAGS = -DPACKAGE_LOAD_PATH=\"$(moduledir)\" AM_CFLAGS = @GUILE_CFLAGS@ LDADD = @GUILE_LIBS@ mcron_SOURCES = src/mcron.c -mcron_CPPFLAGS = -DPROGRAM="\"mcron\"" +mcron_CPPFLAGS = $(AM_CPPFLAGS) -DPROGRAM="\"mcron\"" mcron_DEPENDENCIES = $(modules:%.scm=%.go) cron_SOURCES = src/mcron.c -cron_CPPFLAGS = -DPROGRAM="\"cron\"" +cron_CPPFLAGS = $(AM_CPPFLAGS) -DPROGRAM="\"cron\"" cron_DEPENDENCIES = $(modules:%.scm=%.go) crontab_SOURCES = src/mcron.c -crontab_CPPFLAGS = -DPROGRAM="\"crontab\"" +crontab_CPPFLAGS = $(AM_CPPFLAGS) -DPROGRAM="\"crontab\"" crontab_DEPENDENCIES = $(modules:%.scm=%.go) dist_mcronmodule_DATA = \ -- cgit v1.2.3