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.
This commit is contained in:
parent
6a82b53ddd
commit
245413041c
3 changed files with 5 additions and 7 deletions
|
|
@ -19,19 +19,20 @@
|
||||||
bin_PROGRAMS = mcron crontab
|
bin_PROGRAMS = mcron crontab
|
||||||
sbin_PROGRAMS = cron
|
sbin_PROGRAMS = cron
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -DPACKAGE_LOAD_PATH=\"$(moduledir)\"
|
||||||
AM_CFLAGS = @GUILE_CFLAGS@
|
AM_CFLAGS = @GUILE_CFLAGS@
|
||||||
LDADD = @GUILE_LIBS@
|
LDADD = @GUILE_LIBS@
|
||||||
|
|
||||||
mcron_SOURCES = src/mcron.c
|
mcron_SOURCES = src/mcron.c
|
||||||
mcron_CPPFLAGS = -DPROGRAM="\"mcron\""
|
mcron_CPPFLAGS = $(AM_CPPFLAGS) -DPROGRAM="\"mcron\""
|
||||||
mcron_DEPENDENCIES = $(modules:%.scm=%.go)
|
mcron_DEPENDENCIES = $(modules:%.scm=%.go)
|
||||||
|
|
||||||
cron_SOURCES = src/mcron.c
|
cron_SOURCES = src/mcron.c
|
||||||
cron_CPPFLAGS = -DPROGRAM="\"cron\""
|
cron_CPPFLAGS = $(AM_CPPFLAGS) -DPROGRAM="\"cron\""
|
||||||
cron_DEPENDENCIES = $(modules:%.scm=%.go)
|
cron_DEPENDENCIES = $(modules:%.scm=%.go)
|
||||||
|
|
||||||
crontab_SOURCES = src/mcron.c
|
crontab_SOURCES = src/mcron.c
|
||||||
crontab_CPPFLAGS = -DPROGRAM="\"crontab\""
|
crontab_CPPFLAGS = $(AM_CPPFLAGS) -DPROGRAM="\"crontab\""
|
||||||
crontab_DEPENDENCIES = $(modules:%.scm=%.go)
|
crontab_DEPENDENCIES = $(modules:%.scm=%.go)
|
||||||
|
|
||||||
dist_mcronmodule_DATA = \
|
dist_mcronmodule_DATA = \
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
AC_PREREQ(2.61)
|
AC_PREREQ(2.61)
|
||||||
AC_INIT([GNU Mcron], [1.0.8], [bug-mcron@gnu.org])
|
AC_INIT([GNU Mcron], [1.0.8], [bug-mcron@gnu.org])
|
||||||
AC_CONFIG_HEADER([src/config.h])
|
|
||||||
AC_CONFIG_SRCDIR([src/mcron.c])
|
AC_CONFIG_SRCDIR([src/mcron.c])
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
AC_REQUIRE_AUX_FILE([test-driver.scm])
|
AC_REQUIRE_AUX_FILE([test-driver.scm])
|
||||||
|
|
@ -31,9 +30,8 @@ AM_INIT_AUTOMAKE([subdir-objects -Wall -Wno-override])
|
||||||
AM_SILENT_RULES([yes]) # enables silent rules by default
|
AM_SILENT_RULES([yes]) # enables silent rules by default
|
||||||
|
|
||||||
moduledir="${datarootdir}/guile/site/2.0"
|
moduledir="${datarootdir}/guile/site/2.0"
|
||||||
|
AC_SUBST([moduledir])
|
||||||
AC_SUBST([mcronmoduledir], ["${moduledir}/mcron"])
|
AC_SUBST([mcronmoduledir], ["${moduledir}/mcron"])
|
||||||
AC_DEFINE_UNQUOTED([PACKAGE_LOAD_PATH], ["${moduledir}"],
|
|
||||||
[Define to the guile modules location of this package.])
|
|
||||||
AC_MSG_CHECKING([whether debugging is requested])
|
AC_MSG_CHECKING([whether debugging is requested])
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
AC_HELP_STRING([--enable-debug],
|
AC_HELP_STRING([--enable-debug],
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@
|
||||||
is needed because the crontab personality requires SUID which is not
|
is needed because the crontab personality requires SUID which is not
|
||||||
permitted for executable scripts. */
|
permitted for executable scripts. */
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <libguile.h>
|
#include <libguile.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue