summaryrefslogtreecommitdiff
path: root/agen5/Makefile.am
blob: 4adc1daa957851503b3a365f0aca1b83f4f66829 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
##  -*- Mode: Makefile -*-
##
## Makefile.am -- process this file with automake to produce Makefile.in
##
## Time-stamp:      "2012-04-01 05:21:26 bkorb"
##
##  This file is part of AutoGen.
##  AutoGen Copyright (c) 1992-2012 by Bruce Korb - all rights reserved
##
## AutoGen is free software: you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by the
## Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## AutoGen is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## See the GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License along
## with this program.  If not, see <http://www.gnu.org/licenses/>.

SUBDIRS         = test
INCLUDES        = @INCLIST@
FSMTPL          = fsm.tpl  fsm-macro.tlib fsm-trans.tlib
TEMPLATES       = directive.tpl snarf.tpl $(FSMTPL)
DEFINITIONS     = cgi.def opts.def pseudo.def defParse.def
GEN_CSRC        = opts.h directive.h expr.ini expr.h proto.h pseudo-fsm.h
pkgdata_DATA    = $(FSMTPL)
man_MANS        = autogen.1
DISTCLEANFILES  = stamp-* ag.c
bin_PROGRAMS    = autogen

# The list of source files with AutoGen functions
#
FUNCLIST        = \
	funcCase.c funcDef.c funcEval.c funcFor.c funcIf.c functions.c

# The list of source files with Guile expression functions defined
#
EXPRLIST        = \
    expExtract.c expFormat.c expGperf.c expGuile.c  expMake.c \
    expOutput.c  expPrint.c  expState.c expString.c agShell.c \
    $(FUNCLIST)

FSMLIST         = cgi-fsm.c defParse-fsm.c
csrc = \
    autogen.c    ag-text.c $(FSMLIST) $(EXPRLIST)  agCgi.c \
    agDep.c      agInit.c  agUtils.c  defDirect.c  defFind.c \
    defLex.c     defLoad.c fmemopen.c loadPseudo.c opts.c \
    scmStrings.c tpLoad.c  tpParse.c  tpProcess.c

hsrc = ag-text.h autogen.h defParse-fsm.h functions.h cgi-fsm.h guile-iface.h

EXTRA_DIST = $(csrc) $(hsrc) $(DEFINITIONS) $(TEMPLATES) $(man_MANS) \
		defParse.x bootstrap.dir schemedef.scm \
		guile-iface.def guile-iface.tpl \
		invoke-autogen.texi mk-stamps.sh

LO_LIB          = $(top_builddir)/autoopts/libopts.la
SNV_LIB         = $(top_builddir)/snprintfv/libsnprintfv.la

nodist_autogen_SOURCES = ag.c
autogen_SOURCES = $(GEN_CSRC)
autogen_LDADD   = $(LO_LIB) $(SNV_LIB) $(LIBGUILE_LIBS)
autogen_LDFLAGS = $(DYNAMIC_AG)
autogen_CFLAGS  = $(LIBGUILE_CFLAGS)

AM_YFLAGS = -d

ag.c : Makefile
	exec > $@ ; \
	echo '#undef   PKGDATADIR' ; \
	echo '#define  PKGDATADIR "$(pkgdatadir)"' ; \
	mk=`set -- $(MAKE) ; which $$1` ; \
	echo 'static char const zMakeProg[] = "'$$mk'";' ; \
	echo ; echo '#define  DEFINING' ; \
	echo '#include "autoopts/project.h"' ; \
	echo '#include "autoopts/ag-char-map.h"' ; \
	echo '#include "autogen.h"' ; \
	for f in $(csrc) ; do echo "#include \"$$f\"" ; done

STAMPENV = top_srcdir=$(top_srcdir) top_builddir=$(top_builddir) \
	srcdir=$(srcdir) AGexe=$(AGexe) GDexe=$(GDexe) CLexe=$(CLexe) \
	DEPDIR="$(DEPDIR)"

MAKE_STAMP  = $(STAMPENV) $(POSIX_SHELL) $(srcdir)/bootstrap.dir $@

../snprintfv/snprintfv.h :
	@if [ ! -f ../snprintfv/snprintfv.h ] ; then cd ../snprintfv ; \
	ln -s $(top_srcdir)/snprintfv/snprintfv/snprintfv.h . ; fi

../snprintfv/libsnprintfv.la :
	cd ../snprintfv ; $(MAKE) libsnprintfv.la

.NOTPARALLEL:

# start-generated-text

list_stamps = \
    stamp-opts      stamp-proto     stamp-parse     stamp-cgi \
    stamp-pseudo    stamp-exprini   stamp-directive stamp-texi \
    stamp-ag_text   stamp-fmem      stamp-man       stamp-func \
    stamp-gver
if AMDEP
@am__include@ @am__quote@./$(DEPDIR)/stamp-opts.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-proto.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-parse.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-cgi.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-pseudo.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-exprini.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-directive.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-texi.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-ag_text.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-fmem.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-man.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-func.d@am__quote@
@am__include@ @am__quote@./$(DEPDIR)/stamp-gver.d@am__quote@
endif

stamp-opts:
	@target="$(AUTOGEN_stamp_opts_TList)" \
	$(MAKE_STAMP)

stamp-proto:
	@target="$(AUTOGEN_stamp_proto_TList)" \
	$(MAKE_STAMP)

stamp-parse:
	@target="$(AUTOGEN_stamp_parse_TList)" \
	$(MAKE_STAMP)

stamp-cgi:
	@target="$(AUTOGEN_stamp_cgi_TList)" \
	$(MAKE_STAMP)

stamp-pseudo:
	@target="$(AUTOGEN_stamp_pseudo_TList)" \
	$(MAKE_STAMP)

stamp-exprini:
	@target="$(AUTOGEN_stamp_exprini_TList)" \
	$(MAKE_STAMP)

stamp-directive:
	@target="$(AUTOGEN_stamp_directive_TList)" \
	$(MAKE_STAMP)

stamp-texi:
	@target="$(AUTOGEN_stamp_texi_TList)" \
	$(MAKE_STAMP)

stamp-ag_text:
	@target="$(AUTOGEN_stamp_ag_text_TList)" \
	$(MAKE_STAMP)

stamp-fmem:
	@target="$(AUTOGEN_stamp_fmem_TList)" \
	$(MAKE_STAMP)

stamp-man:
	@target="$(AUTOGEN_stamp_man_TList)" \
	$(MAKE_STAMP)

stamp-func:
	@target="$(AUTOGEN_stamp_func_TList)" \
	$(MAKE_STAMP)

stamp-gver:
	@target="$(AUTOGEN_stamp_gver_TList)" \
	$(MAKE_STAMP)

# end-generated-text
# end of Makefile.am