build: Echo "M4" when running an m4 command.
[paraslash.git] / m4 / lls / makefile
1 .PRECIOUS: $(lls_suite_dir)/%.suite $(lsg_h)
2 lls_m4_include_dir := $(lls_m4_dir)/include
3
4 $(lls_suite_dir)/%.m4d: $(lls_m4_dir)/%.suite.m4 | $(lls_suite_dir)
5 @[ -z "$(Q)" ] || echo 'M4D $<'
6 $(Q) $(M4) -Pg -I $(lls_m4_include_dir) -s $< \
7 | awk '{if ($$1 ~ /#line/) {gsub(/"/, "", $$3); if ($$3 != "$<") \
8 print "$(lls_suite_dir)/$(*F).suite: " $$3}}' | sort | uniq > $@
9
10 $(lls_suite_dir)/%.suite: $(lls_m4_dir)/%.suite.m4 | $(lls_suite_dir)
11 @[ -z "$(Q)" ] || echo 'M4 $<'
12 $(Q) $(M4) -Pg -I $(lls_m4_include_dir) -D GIT_VERSION=$(GIT_VERSION) \
13 -D COPYRIGHT_YEAR=$(COPYRIGHT_YEAR) -D LOGLEVELS=$(LOGLEVELS) \
14 $< > $@
15
16 $(lls_suite_dir)/%.lsg.c: $(lls_suite_dir)/%.suite
17 @[ -z "$(Q)" ] || echo 'LSGC $<'
18 $(Q) $(LOPSUBGEN) --gen-c --output-dir $(lls_suite_dir) < $<
19
20 $(lls_suite_dir)/%.lsg.h: $(lls_suite_dir)/%.suite
21 @[ -z "$(Q)" ] || echo 'LSGH $<'
22 $(Q) $(LOPSUBGEN) --gen-header --output-dir $(lls_suite_dir) < $<
23
24 $(lls_suite_dir)/%.lsg.man: $(lls_suite_dir)/%.suite
25 @[ -z "$(Q)" ] || echo 'LSGM $<'
26 $(Q) $(LOPSUBGEN) --gen-man --output-dir $(lls_suite_dir) < $<
27
28 $(object_dir)/%.o: $(lls_suite_dir)/%.c | $(object_dir)
29 @[ -z "$(Q)" ] || echo 'CC $<'
30 $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(STRICT_CFLAGS) $<