summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 918efa19a9e56c2d3a024a5e2ddad53051be7947 (plain)
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
60
61
62
## Process this file with automake to produce Makefile.in.

libexec_PROGRAMS = migcom
bin_SCRIPTS = mig

AM_YFLAGS = -d

EXTRA_DIST = gensym.awk cpu.sym

CLEANFILES = cpu.h *.sym[co] lexxer.c parser.c parser.h

SUBDIRS = tests

AWK_V = $(AWK_V_$(V))
AWK_V_ = $(AWK_V_$(AM_DEFAULT_VERBOSITY))
AWK_V_0 = @echo "  AWK    $@";

migcom_SOURCES = boolean.h error.c error.h global.c global.h		\
		 header.c lexxer.h lexxer.l message.h mig_string.h	\
		 migcom.c parser.h parser.y routine.c routine.h		\
		 server.c statement.c statement.h string.c		\
		 type.c type.h user.c utils.c utils.h write.h
migcom_LDADD = @LEXLIB@

SUFFIXES = .h .symo .symc .sym

.sym.symc:
	$(AWK_V) $(AWK) -f $(srcdir)/gensym.awk $< > $@
.symc.symo:
	$(AM_V_CC) $(TARGET_CC) -S $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -x c -o $@ $<
.symo.h:
	$(AM_V_GEN) sed -e '/^[^*].*$$/d' -e 's/^[*]/#define/' -e 's/mAgIc[^-0-9]*//' \
	    $< > $@
cpu.symc: $(srcdir)/gensym.awk

lexxer.c: parser.h

$(migcom_OBJECTS): cpu.h

#
# Building a distribution.
#

dist-hook: gen-ChangeLog

gen_start_commit = 12a56fa3ce0d65a25e7bcf68aba03d8ba189273f
ChangeLog_files = ChangeLog
.PHONY: gen-ChangeLog
gen-ChangeLog:
	$(AM_V_GEN)if test -d $(top_srcdir)/.git; then			\
	  (cd $(top_srcdir)/ &&						\
	  ./gitlog-to-changelog	--strip-tab				\
	    $(gen_start_commit).. &&					\
	  echo) >> $(distdir)/cl-t &&					\
	  for f in $(ChangeLog_files); do				\
	    (cd $(top_srcdir)/ &&					\
	    git show $(gen_start_commit):$$f) >> $(distdir)/cl-t &&	\
	    rm -f $(distdir)/$$f &&					\
	    mv $(distdir)/cl-t $(distdir)/$$f				\
	    || exit $$?;						\
	  done;								\
	fi