SummaryRefsLogTreeCommitDiffStats
path: root/scm/mcron/makefile.am
blob: cb7a6bbf8c62bd2f59e3c384378a7114a08233e9 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
MODULES =				\
  environment.scm			\
  job-specifier.scm			\
  main.scm				\
  redirect.scm				\
  vixie-specification.scm		\
  vixie-time.scm

GEN_MODULES =				\
  config.scm				\
  core.scm

GOBJECTS =				\
  $(GEN_MODULES:%.scm=%.go)		\
  $(MODULES:%.scm=%.go)

mcronmodule_DATA =			\
  $(GOBJECTS)				\
  $(GEN_MODULES)

dist_mcronmodule_DATA = 		\
  $(MODULES)				\
  crontab.scm				\
  mcron-core.scm

# Extend silent rules to Guile compilation.
AM_V_GUILEC = $(AM_V_GUILEC_$(V))
AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
AM_V_GUILEC_0 = @echo "  GUILEC  " $@;

# Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling.  Otherwise, if
# $GUILE_LOAD_COMPILED_PATH contains $(mcronmoduledir), we may find .go files
# in there that are newer than the local .scm files (for instance because the
# user ran 'make install' recently).  When that happens, we end up loading
# those previously-installed .go files, which may be stale, thereby breaking
# the whole thing.
#
# XXX: Use the C locale for when Guile lacks
# <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
.scm.go:
	$(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ;			\
	unset GUILE_LOAD_COMPILED_PATH ;				\
	LC_ALL=C							\
	$(GUILD) compile						\
	  --load-path="$(top_builddir)/scm"				\
	  --load-path="$(top_srcdir)/scm"				\
	  --warn=format --warn=unbound-variable --warn=arity-mismatch	\
	  --target="$(host)" --output="$@" "$<"

SUFFIXES = .go
CLEANFILES = $(GOBJECTS)

# If you're wondering, the configure script keeps deleting all files with a name
# like core.*, so we have to keep re-making it (I lost a good day's work because
# of this).

core.scm : mcron-core.scm
	$(CP) mcron-core.scm core.scm