Makefile.am 8.43 KB
Newer Older
Point Gerald's avatar
Point Gerald committed
1
2
AUTOMAKE_OPTIONS=no-installinfo no-texinfo.tex info-in-builddir
ARCENV=ARCPATH=${builddir}:${srcdir} ARC_DATADIR=.
3
ARC=${top_builddir}/src/arc
Point Gerald's avatar
Point Gerald committed
4
ARCOPTS=-c 'set arc.shell.preprocessor.php.command php'
Point Gerald's avatar
Point Gerald committed
5
info_TEXINFOS = arc-handbook.texi
6
MAKEINFOFLAGS=-I ${srcdir} -I ${builddir}
point's avatar
point committed
7

8
CMDLINE_HELP_FILES = \
Point Gerald's avatar
Point Gerald committed
9
   a2l-preferences.texi \
Point Gerald's avatar
Point Gerald committed
10
   acheck-builtins.texi \
Point Gerald's avatar
Point Gerald committed
11
   acheck-commands.texi \
Point Gerald's avatar
Point Gerald committed
12
   apropos-cmd.texi \
point's avatar
point committed
13
14
   ca-cmd.texi \
   card-cmd.texi \
Point Gerald's avatar
Point Gerald committed
15
   cd-cmd.texi \
point's avatar
point committed
16
   check-card-cmd.texi \
Point Gerald's avatar
Point Gerald committed
17
   chkctl-cmd.texi \
Point Gerald's avatar
Point Gerald committed
18
   cuts-cmd.texi \
Point Gerald's avatar
Point Gerald committed
19
   depgraph-cmd.texi \
Point Gerald's avatar
Point Gerald committed
20
   diag-cmd.texi \
21
   echo-cmd.texi \
point's avatar
point committed
22
23
24
25
26
27
   eval-cmd.texi \
   exit-cmd.texi \
   flatten-cmd.texi \
   gc-cmd.texi \
   help-cmd.texi \
   info-cmd.texi \
Point Gerald's avatar
Point Gerald committed
28
   l2a-preferences.texi \
point's avatar
point committed
29
30
   list-cmd.texi \
   load-cmd.texi \
Point Gerald's avatar
Point Gerald committed
31
   mec5-builtins.texi \
Point Gerald's avatar
Point Gerald committed
32
33
   node-info-cmd.texi \
   obfuscate-cmd.texi \
point's avatar
point committed
34
   pick-cmd.texi \
Point Gerald's avatar
Point Gerald committed
35
   preferences.texi \
36
   pwd-cmd.texi \
Point Gerald's avatar
Point Gerald committed
37
   references.texi \
point's avatar
point committed
38
   remove-cmd.texi \
Point Gerald's avatar
Point Gerald committed
39
   sat-cmd.texi \
point's avatar
point committed
40
41
42
43
   set-cmd.texi \
   show-cmd.texi \
   show-ts-marks-cmd.texi \
   solve-cmd.texi \
Point Gerald's avatar
Point Gerald committed
44
   stepper-cmd.texi \
point's avatar
point committed
45
   store-cmd.texi \
Point Gerald's avatar
Point Gerald committed
46
47
   target-reduction-cmd.texi \
   timer-cmd.texi \
point's avatar
point committed
48
49
   to-lustre-cmd.texi \
   ts-cmd.texi  \
point's avatar
point committed
50
   ts-marks-cmd.texi \
Point Gerald's avatar
Point Gerald committed
51
   validate-cmd.texi 
52
53
54

GENERATED_HELP_FILES = \
   banner.texi \
Point Gerald's avatar
Point Gerald committed
55
   commands.texi \
Point Gerald's avatar
Point Gerald committed
56
   pages.texi \
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
   release-info.texi \
   license.texi \
   authors.texi

EXTRA_TEXINFOS= \
  arc-handbook.texi \
  acheck.texi \
  introduction.texi \
  session.texi \
  macros.texi \
  references.texi \
  indices.texi \
  installation.texi \
  preferences.texi \
  mec5.texi \
Point Gerald's avatar
Point Gerald committed
72
  as.texi \
73
74
75
76
77
  \
  arc-shell.texi \
   ${CMDLINE_HELP_FILES}

CMDLINE_FILES=$(CMDLINE_HELP_FILES:%.texi=%.txt) \
78
              $(GENERATED_HELP_FILES:%.texi=%.txt)
79

80
81
82
83
84
85
ARC_GENERATED_FILES= pipeline.goal pipeline.reduced.alt \
                     cuts-example-1.res cuts-example-2.res \
                     cuts-example-3.res cuts-example-4.res  \
                     cuts-example-5.res cuts-example-6.res 


Point Gerald's avatar
Point Gerald committed
86

87
CLEANFILES=${CMDLINE_FILES} ${GENERATED_HELP_FILES} pages.idx cmdmacros.texi \
Point Gerald's avatar
Point Gerald committed
88
89
           ${ARC_GENERATED_FILES} default-preferences \
           arc-handbook.info
point's avatar
point committed
90

point's avatar
point committed
91
EXTRA_DIST = switch.alt leaky-pipe.alt counter.alt pick-example.alt \
point's avatar
point committed
92
             seq-n-counters.alt store-example.mec5 fp-ex1.mec5 fp-ex2.mec5 \
Point Gerald's avatar
Point Gerald committed
93
             fp-ex3.mec5 munu.dot munu.mec5 munu.pdf \
94
             game.ack  game.arc  game.mec5  game_q0.dot  game_q1.dot \
95
             game.alt  game.dot  game.pdf   game_q0.pdf  game_q1.pdf \
Point Gerald's avatar
Point Gerald committed
96
             ${CMDLINE_FILES} pipeline.alt.php pipeline.arc \
Point Gerald's avatar
Point Gerald committed
97
             as-big-semantics.png  as-main.png as-semantics.png \
Point Gerald's avatar
Point Gerald committed
98
             as-console.png as-relations.png as-validate.png as-graph.png \
Point Gerald's avatar
Point Gerald committed
99
100
             cmdmacro.tmpl Board.alt Board.props

point's avatar
point committed
101

102
if HAS_TEXI2PDF
103
arc_handbook_TEXINFOS = arc-handbook.texi ${EXTRA_TEXINFOS} ${EXTRA_DIST} cmdmacros.texi
104
endif
point's avatar
point committed
105

106
dvi:
107

108
109
if HAS_MAKEINFO
pkgdata_DATA=pages.idx ${CMDLINE_FILES}
110

Point Gerald's avatar
Point Gerald committed
111
#$(srcdir)/arc-handbook.info: cmdmacros.texi ${ARC_GENERATED_FILES}
112

Point Gerald's avatar
Point Gerald committed
113
all : default-preferences ${ARC} cmdmacros.texi ${pkgdata_DATA} 
114

115
116
117
echo-pkgdata: 
	@ echo ${pkgdata_DATA} 

118
.texi.txt: 
119
	${MAKEINFO} ${MAKEINFOFLAGS} --force --plaintext --fill-column=79 $< -o $@
120
121
122
123

.PHONY: ${GENERATED_HELP_FILES}
else
all :
124
endif
125

Point Gerald's avatar
Point Gerald committed
126
${CMDLINE_FILES} : cmdmacros.texi macros.texi
127
cmdmacros.texi : ${ARC} cmdmacro.tmpl
128
	(CMDS=$$(${ARCENV} ${ARC} -qbc 'list commands' | tr -d "-"); \
129
130
131
132
133
         for C in $${CMDS}; do \
           sed -e "s/@CMD@/$${C}/g" ${srcdir}/cmdmacro.tmpl; \
         done) > cmdmacros.texi


Point Gerald's avatar
Point Gerald committed
134
135
136
137
138
139
140
141
142
143
pages.texi: ${CMDLINE_HELP_FILES} ${GENERATED_HELP_FILES} 
	rm -f pages.texi 
	(echo "@c %page pages "; \
         echo "@c %title List of help pages"; \
	 for f in `ls ${CMDLINE_HELP_FILES:%=${srcdir}/%} ${GENERATED_HELP_FILES} | sort `; \
        do \
         IF=`basename $$f .texi`.txt; \
         MP=`grep "@c %page" $$f | sed -e 's/@c %page //g' -e 's/ *$$//g'`; \
         TI=`grep "@c %title" $$f | sed -e 's/@c %title //g' -e 's/ *$$//g'`; \
         for p in $$MP; do \
Point Gerald's avatar
Point Gerald committed
144
           echo "$$p :  $${TI}@*"; \
Point Gerald's avatar
Point Gerald committed
145
146
147
         done; \
        done; ) > pages.texi 

148
149
150
151
152
153
154
pages.idx : ${CMDLINE_HELP_FILES} ${GENERATED_HELP_FILES} 
	rm -f pages.idx
	for f in ${CMDLINE_HELP_FILES:%=${srcdir}/%} ${GENERATED_HELP_FILES}; \
        do \
         IF=`basename $$f .texi`.txt; \
         MP=`grep "@c %page" $$f | sed -e 's/@c %page //g' -e 's/ *$$//g'`; \
         TI=`grep "@c %title" $$f | sed -e 's/@c %title //g' -e 's/ *$$//g'`; \
Point Gerald's avatar
Point Gerald committed
155
         for p in $$MP; do \
Point Gerald's avatar
Point Gerald committed
156
           echo "$$p $$IF $$TI" >> pages.idx ; \
Point Gerald's avatar
Point Gerald committed
157
         done; \
158
159
        done

Point Gerald's avatar
Point Gerald committed
160
commands.texi : ${ARC}
Point Gerald's avatar
Point Gerald committed
161
162
	(echo "@c %page commands"; \
         echo "@c %title Command list"; \
163
         ${ARCENV} ${ARC} ${ARCOPTS} -qbc 'list commands' \
Point Gerald's avatar
Point Gerald committed
164
         ) > commands.texi
165

166
167
168
169
170
171
172
173
174
175
176
license.texi : ${top_srcdir}/COPYING
	(echo "@c %page license"; \
         echo "@c %title AltaRica Public License"; \
         echo "@verbatim"; \
         cat ${top_srcdir}/COPYING; \
         echo "@end verbatim") > license.texi

authors.texi : ${top_srcdir}/AUTHORS
	(echo "@c %page authors"; \
         echo "@c %title Authors and contributors of AltaRica Checker"; \
         echo "@verbatim"; \
177
	 cat ${top_srcdir}/AUTHORS; \
178
179
         echo "@end verbatim") > authors.texi

180
banner.texi : ${top_srcdir}/COPYING
181
182
183
184
	@ (echo "@c %page banner"; \
           echo "@c %title ARC banner"; \
           echo "@verbatim" ; \
           echo "${PACKAGE_STRING}" ; \
185
           grep "ARC -- Copyright" ${top_srcdir}/COPYING | sed -e 's/ARC -- //g' ; \
186
187
188
189
190
191
192
193
           echo "All rights reserved."; \
           echo "This software is distributed under AltaRica Public License (see COPYING file)." ; \
           echo ;\
           echo "Please report any bug to ${PACKAGE_BUGREPORT}" | sed -e 's/@/[at]/g'; \
           echo "or on project webpage http://altarica.labri.fr/"; \
           echo "@end verbatim" \
          ) > banner.texi

194
release-info.texi: banner.txt 
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
	@ (echo "@c %page version" ; \
           echo "@c %title Informations about ARC version." ; \
           echo "@verbatim"; \
           cat banner.txt; \
           if test -x ${top_builddir}/config.status; then \
              echo "Options passed to configure script:"; \
              for CF in `${top_builddir}/config.status --config`; do \
                  echo "  $$CF"; \
              done; \
           fi; \
           echo "Repository informations (Distribution): "; \
           if test -f ${top_srcdir}/dist.repinfo; then \
              cat ${top_srcdir}/dist.repinfo; \
           else \
              echo "none"; \
           fi; \
           echo "Current repository informations: "; \
	   ${SHELL} ${top_builddir}/repinfo.sh | sed 's/^/  /g'; \
           echo "Compilation informations: "; \
           echo "  Platform: ${build}"; \
           echo "  Date: `date`"; \
	   echo "  Flags:"; \
	   echo "    CFLAGS=${CFLAGS}"; \
	   echo "    LDFLAGS=${LDFLAGS}"; \
	   echo "    CPPFLAGS=${CPPFLAGS}"; \
	   echo "    LIBS=${LIBS}";\
           echo "@end verbatim"; \
           ) > release-info.texi
Point Gerald's avatar
Point Gerald committed
223

224
arc-handbook.pdf cuts-cmd.txt target-reduction-cmd.txt : ${ARC_GENERATED_FILES}
Point Gerald's avatar
Point Gerald committed
225
226


227
pipeline.goal pipeline.reduced.alt : pipeline.alt.php pipeline.arc ${ARC} 
Point Gerald's avatar
Point Gerald committed
228
	${ARCENV} ${ARC} ${ARCOPTS} -qb ${srcdir}/pipeline.arc > pipeline.reduced.alt
Point Gerald's avatar
Point Gerald committed
229

230
231
cuts-example-1.res : cuts-example.alt ${ARC} 
	${ARCENV} ${ARC} ${ARCOPTS} -C ${srcdir} -qb cuts-example.alt -c 'cuts Counter "count>=3"' > cuts-example-1.res
232

233
234
cuts-example-2.res : cuts-example.alt ${ARC} 
	${ARCENV} ${ARC} ${ARCOPTS} -C ${srcdir} -qb cuts-example.alt -c 'cuts --visible-tags=attr1,attr2 Counter "count>=3"' > cuts-example-2.res
235

236
237
cuts-example-3.res : cuts-example.alt ${ARC} 
	${ARCENV} ${ARC} ${ARCOPTS} -C ${srcdir} -qb cuts-example.alt -c 'cuts --visible-tags=attr2 Counter "count>=3"' > cuts-example-3.res
238

239
240
cuts-example-4.res : cuts-example.alt ${ARC} 
	${ARCENV} ${ARC} ${ARCOPTS} -C ${srcdir} -qb cuts-example.alt -c 'cuts --visible-tags=attr2 --disabled-tags=attr1 Counter "count>=3"' > cuts-example-4.res
241

242
243
cuts-example-5.res : cuts-example.alt ${ARC} 
	${ARCENV} ${ARC} ${ARCOPTS} -C ${srcdir} -qb cuts-example.alt -c 'sequences --enum --visible-tags=attr1,attr2 --order=3 Counter "count>=3"' > cuts-example-5.res
244

245
246
cuts-example-6.res : cuts-example.alt ${ARC} 
	${ARCENV} ${ARC} ${ARCOPTS} -C ${srcdir} -qb cuts-example.alt -c 'sequences --visible-tags=attr1,attr2 --enum --order=3 --min Counter "count>=3"' > cuts-example-6.res
Point Gerald's avatar
Point Gerald committed
247

Point Gerald's avatar
Point Gerald committed
248
${top_builddir}/src/default-preferences ${ARC} : 
Point Gerald's avatar
Point Gerald committed
249
250
	${MAKE} -C ${top_builddir}

Point Gerald's avatar
Point Gerald committed
251
252
253
default-preferences : ${top_builddir}/src/default-preferences 
	${MAKE} -C ${top_builddir}/src default-preferences 
	cp ${top_builddir}/src/default-preferences .