-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
561 lines (508 loc) · 16 KB
/
Makefile.in
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# Makefile for the Curry compiler
#
# $Id: Makefile.in 3203 2016-05-22 11:58:45Z wlux $
#
# Copyright (c) 2000-2016 Wolfgang Lux
# See LICENSE for the full license.
#
@SET_MAKE@
# package information
PACKAGE = @PACKAGE_TARNAME@
VERSION = @PACKAGE_VERSION@
# source directory
srcdir = @srcdir@
# install directories
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
bindir = @bindir@
libdir = @libdir@
mandir = @mandir@
# compiler definitions
HC = @HC@
HFLAGS = @HFLAGS@
HC_PATH_STYLE = @HC_PATH_STYLE@
HASKELL = @HASKELL@
LATEX = latex
BIBTEX = bibtex
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_DIR = @INSTALL_DIR@
LN_S = @LN_S@
# file lists
PROGRAMS = cycc cymk newer @CAM2C@ @MACH@
SCRIPTS = cyc cymake cyi
man_MANS = cyc.1 cymake.1 cyi.1
SUBDIRS = doc runtime curry test
cycc_SRCS = \
cycc.hs \
Ident.lhs \
PredefIdent.lhs \
Types.lhs \
PredefTypes.lhs \
Curry.lhs \
CurryUtils.lhs \
CurryPP.lhs \
CurryLexer.lhs \
CurryParser.lhs \
Base.lhs \
Interfaces.lhs \
IdentInfo.lhs \
TypeInfo.lhs \
ValueInfo.lhs \
PrecInfo.lhs \
ImportSyntaxCheck.lhs \
TypeSyntaxCheck.lhs \
SyntaxCheck.lhs \
ExportSyntaxCheck.lhs \
CaseCheck.lhs \
UnusedCheck.lhs \
ShadowCheck.lhs \
OverlapCheck.lhs \
Renaming.lhs \
PrecCheck.lhs \
KindCheck.lhs \
TypeCheck.lhs \
IntfSyntaxCheck.lhs \
IntfQual.lhs \
IntfCheck.lhs \
IntfEquiv.lhs \
Imports.lhs \
Exports.lhs \
TypeSubst.lhs \
TypeTrans.lhs \
Typing.lhs \
TrustInfo.lhs \
Trust.lhs \
Qual.lhs \
Desugar.lhs \
Records.lhs \
Newtype.lhs \
LazyPatterns.lhs \
CaseMatch.lhs \
Simplify.lhs \
PatternBind.lhs \
Lift.lhs \
IL.lhs \
ILPP.lhs \
ILTrans.lhs \
ILLift.lhs \
DTransform.lhs \
Cam.lhs \
CamPP.lhs \
ILCompile.lhs \
CCode.lhs \
CPretty.lhs \
CElim.lhs \
CPS.lhs \
CGen.lhs \
Modules.lhs \
Goals.lhs \
Common.lhs \
SplitModule.lhs \
Files.lhs \
Options.lhs \
Unlit.lhs \
LexComb.lhs \
LLParseComb.lhs \
Pretty.lhs \
Error.lhs \
Combined.lhs \
SCC.lhs \
NestEnv.lhs \
TopEnv.lhs \
Env.lhs \
Subst.lhs \
Map.lhs \
Set.lhs \
Position.lhs \
GetOpt.hs \
Utils.lhs \
$(APPLICATIVE_LHS) \
$(PATHUTILS_LHS) \
$(IOEXTS_LHS) \
$(cycc_$(HASKELL)_SRCS)
cycc_hs2010_SRCS = hs2010/Char.hs hs2010/Directory.hs hs2010/IO.hs \
hs2010/List.hs hs2010/Maybe.hs hs2010/Monad.hs hs2010/Ratio.hs \
hs2010/System.hs
cycc_XXX = $(cycc_SRCS:.hs=.hi)
cycc_INTF = $(cycc_XXX:.lhs=.hi)
cycc_OBJS = $(cycc_INTF:.hi=.o)
cymk_SRCS = \
cymk.hs \
Ident.lhs \
PredefIdent.lhs \
CurryDeps.lhs \
Curry.lhs \
CurryLexer.lhs \
CurryParser.lhs \
Files.lhs \
Unlit.lhs \
LexComb.lhs \
LLParseComb.lhs \
Error.lhs \
SCC.lhs \
Env.lhs \
Map.lhs \
Set.lhs \
Position.lhs \
GetOpt.hs \
Utils.lhs \
$(APPLICATIVE_LHS) \
$(PATHUTILS_LHS) \
$(cymk_$(HASKELL)_SRCS)
cymk_hs2010_SRCS = hs2010/Char.hs hs2010/Directory.hs hs2010/IO.hs \
hs2010/List.hs hs2010/Maybe.hs hs2010/Monad.hs hs2010/System.hs
cymk_XXX = $(cymk_SRCS:.hs=.hi)
cymk_INTF = $(cymk_XXX:.lhs=.hi)
cymk_OBJS = $(cymk_INTF:.hi=.o)
newer_SRCS = \
newer.lhs \
Utils.lhs \
$(newer_$(HASKELL)_SRCS)
newer_hs2010_SRCS = hs2010/Directory.hs hs2010/IO.hs hs2010/List.hs \
hs2010/System.hs hs2010/Time.hs
newer_XXX = $(newer_SRCS:.hs=.hi)
newer_INTF = $(newer_XXX:.lhs=.hi)
newer_OBJS = $(newer_INTF:.hi=.o)
cam2c_SRCS = \
cam2c.lhs \
Cam.lhs \
CamParser.lhs \
CCode.lhs \
CPretty.lhs \
CElim.lhs \
CPS.lhs \
CGen.lhs \
Files.lhs \
LexComb.lhs \
LLParseComb.lhs \
Pretty.lhs \
Error.lhs \
GetOpt.hs \
SCC.lhs \
Map.lhs \
Set.lhs \
Position.lhs \
Utils.lhs \
$(APPLICATIVE_LHS) \
$(PATHUTILS_LHS) \
$(cam2c_$(HASKELL)_SRCS)
cam2c_hs2010_SRCS = hs2010/Char.hs hs2010/Directory.hs hs2010/IO.hs \
hs2010/List.hs hs2010/Maybe.hs hs2010/Monad.hs hs2010/Ratio.hs \
hs2010/System.hs
cam2c_XXX = $(cam2c_SRCS:.hs=.hi)
cam2c_INTF = $(cam2c_XXX:.lhs=.hi)
cam2c_OBJS = $(cam2c_INTF:.hi=.o)
mach_SRCS = \
mach.lhs \
MachInterp.lhs \
MachLoader.lhs \
MachNode.lhs \
MachStack.lhs \
MachEnviron.lhs \
MachChoice.lhs \
MachSpace.lhs \
MachThreads.lhs \
MachResult.lhs \
MachTypes.lhs \
Cam.lhs \
CamParser.lhs \
LLParseComb.lhs \
LexComb.lhs \
Position.lhs \
Error.lhs \
Combined.lhs \
GetOpt.hs \
Env.lhs \
Map.lhs \
Set.lhs \
Utils.lhs \
$(APPLICATIVE_LHS) \
$(IOEXTS_LHS) \
$(mach_$(HASKELL)_SRCS)
mach_hs2010_SRCS = hs2010/Char.hs hs2010/IO.hs hs2010/List.hs \
hs2010/Maybe.hs hs2010/Monad.hs hs2010/System.hs
mach_XXX = $(mach_SRCS:.hs=.hi)
mach_INTF = $(mach_XXX:.lhs=.hi)
mach_OBJS = $(mach_INTF:.hi=.o)
APPLICATIVE_LHS = $(HASKELL)/Applicative.lhs
APPLICATIVE_SRCS = hs98/Applicative.lhs hs2010/Applicative.lhs
PATHUTILS_LHS = $(HC_PATH_STYLE)/PathUtils.lhs
PATHUTILS_SRCS = unix/PathUtils.lhs windows/PathUtils.lhs
IOEXTS_LHS = @IOExts_lhs@
IOEXTS_SRCS = ghc/IOExts.lhs hbc/IOExts.lhs nhc/IOExts.lhs
HS2010_SRCS = hs2010/Char.hs hs2010/Directory.hs hs2010/IO.hs hs2010/List.hs \
hs2010/Maybe.hs hs2010/Monad.hs hs2010/Ratio.hs hs2010/System.hs \
hs2010/Time.hs
SRCS = $(cycc_SRCS) $(cymk_SRCS) $(newer_SRCS) $(cam2c_SRCS) $(mach_SRCS)
INTF = $(cycc_INTF) $(cymk_INTF) $(newer_INTF) $(cam2c_INTF) $(mach_INTF)
OBJS = $(cycc_OBJS) $(cymk_OBJS) $(newer_OBJS) $(cam2c_OBJS) $(mach_OBJS)
DISTFILES = README LICENSE NEWS curry.tex curry.bib \
configure configure.in aclocal.m4 config.guess config.sub install-sh \
Makefile.in ghc.mk ghc-make.mk hbc.mk nhc.mk makedoc.in in-place-config \
configure-bin.in Makefile-bin.in in-place-config-bin \
$(SCRIPTS:=.in) $(man_MANS:=.in) $(SRCS) \
$(PATHUTILS_SRCS) $(IOEXTS_SRCS) $(HS2010_SRCS) \
$(APPLICATIVE_SRCS)
# default target, build all programs and the library
all: scripts programs runtime curry mans
# program rules
# program build rules are compiler specific and can be found in @hc@.mk
programs: $(PROGRAMS)
scripts: $(SCRIPTS)
# non-existent target for forcing the execution of target
# NB this is necessary on Solaris because System V makes do not
# understand .PHONY
FORCE:
# runtime library
.PHONY: runtime
runtime: FORCE
cd runtime && $(MAKE)
# Curry library
.PHONY: curry icurry ccurry
curry: cycc runtime
cd curry && $(MAKE)
icurry ccurry: cycc
cd curry && $(MAKE) $@
# manual pages
mans: $(man_MANS)
man_edit = sed \
-e 's,@bindir\@,$(bindir),g' \
-e 's,@libdir\@,$(libdir),g' \
-e 's,@version\@,$(VERSION),g'
cyc.1: Makefile $(srcdir)/cyc.1.in
rm -f cyc.1
$(man_edit) $(srcdir)/cyc.1.in >cyc.1
cymake.1: Makefile $(srcdir)/cymake.1.in
rm -f cymake.1
$(man_edit) $(srcdir)/cymake.1.in >cymake.1
cyi.1: Makefile $(srcdir)/cyi.1.in
rm -f cyi.1
$(man_edit) $(srcdir)/cyi.1.in >cyi.1
# documentation
.PHONY: curry.dvi curry.pdf tex
curry.dvi: newer makedoc tex
./makedoc latex
curry.pdf: newer makedoc tex
./makedoc pdflatex
tex: FORCE
cd runtime && $(MAKE) tex
makedoc: $(srcdir)/makedoc.in config.status
./config.status $@
# Use TeXShop.app for typesetting the documentation. This may be convenient
# for Mac OS X users.
.PHONY: TeXShop
TeXShop: tex
osascript -e 'set p to (POSIX file "'"`pwd`/$(srcdir)/curry.tex"'" as alias)' \
-e 'tell application "TeXShop"' \
-e ' open p' \
-e ' latexinteractive (every document whose path is p)' \
-e 'end tell'
# link all source files into the current directory
# NB if $(srcdir) is a relative path we have to modify the paths for target
# files which are located in subdirectories
# NB The seemingly contrived $(MAKEFLAGS:M-s:S/=/=/) substitution is used in
# order to check for the presence of -s among the command line flags in
# a portable way. GNU make and other POSIX compatible make commands
# collect all single letter options -- if any -- in the first word of
# $(MAKEFLAGS). BSD make commands, on the other hand, use a separate word
# for each single letter option. In order to make the -s option the first
# word if present, we use BSD make's :M variable modifier, which filters
# $(MAKEFLAGS) keeping only those words which match the pattern following
# :M. Since other make commands do not understand this modifier, we also
# add the identity substitution :S/=/=/, which yields a System V compatible
# variable substitution of the form :SUFFIX=REPL.
.DEFAULT:
@test ! -r $@ -a -f $(srcdir)/$@ && \
(test -d $(@D) || mkdir $(@D)) && \
if expr $(srcdir) : '/.*' >/dev/null; then \
(set dummy $(MAKEFLAGS:M-s:S/=/=/); \
case $$2 in *=*) set -x;; *s*) ;; *) set -x;; esac; \
ln -s $(srcdir)/$@ $@); \
else \
srcdir=`echo $@ | sed -e 's:[^/]*$$::' -e 's:[^/]*/:../:g'` && \
(set dummy $(MAKEFLAGS:M-s:S/=/=/); \
case $$2 in *=*) set -x;; *s*) ;; *) set -x;; esac; \
ln -s $${srcdir}$(srcdir)/$@ $@); \
fi
# install the binaries
begin_config = ^\# DO NOT DELETE: Beginning of in-place configuration$$
end_config = ^\# DO NOT DELETE: End of in-place configuration$$
install_edit = sed \
-e '/$(begin_config)/,/$(end_config)/d' \
-e "s/%BUILD_DATE%/`date`/"
install: install-dir install-subdirs
install-dir: scripts cycc cymk newer mans
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_DIR) $(DESTDIR)$(libdir)
$(INSTALL_DIR) $(DESTDIR)$(libdir)/curry-$(VERSION)
$(INSTALL_DIR) $(DESTDIR)$(mandir)
$(INSTALL_DIR) $(DESTDIR)$(mandir)/man1
$(install_edit) cyc > /tmp/cyc
$(INSTALL_PROGRAM) /tmp/cyc $(DESTDIR)$(bindir)/cyc-$(VERSION)
cd $(DESTDIR)$(bindir) && rm -f cyc && $(LN_S) cyc-$(VERSION) cyc
@rm -f /tmp/cyc
$(install_edit) cymake > /tmp/cymake
$(INSTALL_PROGRAM) /tmp/cymake $(DESTDIR)$(bindir)/cymake-$(VERSION)
cd $(DESTDIR)$(bindir) && rm -f cymake && $(LN_S) cymake-$(VERSION) cymake
@rm -f /tmp/cymake
$(install_edit) cyi > /tmp/cyi
$(INSTALL_PROGRAM) /tmp/cyi $(DESTDIR)$(bindir)/cyi-$(VERSION)
cd $(DESTDIR)$(bindir) && rm -f cyi && $(LN_S) cyi-$(VERSION) cyi
@rm -f /tmp/cyi
$(INSTALL_PROGRAM) -s cycc $(DESTDIR)$(libdir)/curry-$(VERSION)
$(INSTALL_PROGRAM) -s cymk $(DESTDIR)$(libdir)/curry-$(VERSION)
$(INSTALL_PROGRAM) -s newer $(DESTDIR)$(libdir)/curry-$(VERSION)
$(INSTALL_DATA) cyc.1 $(DESTDIR)$(mandir)/man1/cyc-$(VERSION).1
echo '.so man1/cyc-$(VERSION).1' > $(DESTDIR)$(mandir)/man1/cyc.1
$(INSTALL_DATA) cymake.1 $(DESTDIR)$(mandir)/man1/cymake-$(VERSION).1
echo '.so man1/cymake-$(VERSION).1' > $(DESTDIR)$(mandir)/man1/cymake.1
$(INSTALL_DATA) cyi.1 $(DESTDIR)$(mandir)/man1/cyi-$(VERSION).1
echo '.so man1/cyi-$(VERSION).1' > $(DESTDIR)$(mandir)/man1/cyi.1
install-subdirs: runtime curry
uninstall:
cd $(DESTDIR)$(bindir) && for f in $(SCRIPTS); do \
cmp -s $$f $$f-$(VERSION) && rm -f $$f; \
rm -f $$f-$(VERSION); \
done
rm -rf $(DESTDIR)$(libdir)/curry-$(VERSION)
for f in $(man_MANS); do \
man=`basename $$f .1`; \
echo ".so man1/$$man-$(VERSION).1" | \
cmp -s - $(DESTDIR)$(mandir)/man1/$$man.1 && \
rm -f $(DESTDIR)$(mandir)/man1/$$man.1; \
rm -f $(DESTDIR)$(mandir)/man1/$$man-$(VERSION).1; \
done
# build the distributions
distdir = $(PACKAGE)-$(VERSION)
bindistdir = $(distdir)-@target_cpu@-@target_os@
dist: distdir
rm -f $(distdir).tar $(distdir).tar.gz
tar -cf $(distdir).tar $(distdir)
gzip $(distdir).tar
rm -rf $(distdir)
distdir:
rm -rf $(distdir)
mkdir $(distdir)
mkdir $(distdir)/unix $(distdir)/windows
mkdir $(distdir)/ghc $(distdir)/hbc $(distdir)/nhc
mkdir $(distdir)/hs98 $(distdir)/hs2010
for f in $(DISTFILES); do cp $(srcdir)/$$f $(distdir)/$$f; done
for d in $(SUBDIRS); do \
mkdir $(distdir)/$$d && \
(cd $$d && $(MAKE) distdir distdir=../$(distdir)/$$d) || \
exit $$?; \
done
bindist: bindistdir
rm -f $(bindistdir).tar $(bindistdir).tar.gz
cd $(bindistdir) && autoconf && rm -rf autom4te.cache
tar -cf $(bindistdir).tar $(bindistdir)
gzip $(bindistdir).tar
rm -rf $(bindistdir)
bindistdir: cycc cymk newer runtime curry
rm -rf $(bindistdir)
mkdir $(bindistdir) $(bindistdir)/bin $(bindistdir)/lib $(bindistdir)/doc $(bindistdir)/man
cp $(srcdir)/README $(srcdir)/LICENSE $(srcdir)/NEWS $(bindistdir)
cp $(srcdir)/aclocal.m4 $(srcdir)/install-sh $(bindistdir)
cp $(srcdir)/config.guess $(srcdir)/config.sub $(bindistdir)
sed -e 's/%PACKAGE_NAME%/@PACKAGE_NAME@/g' \
-e 's/%TARGET%/@target_cpu@-@target_os@/g' \
-e 's/%VERSION%/@PACKAGE_VERSION@/g' \
-e 's/%CURRY_CFLAGS%/@CURRY_CFLAGS@/g' \
-e 's/%HC_PATH_STYLE%/@HC_PATH_STYLE@/g' \
-e 's/%LD_R%/@LD_R@/' \
-e '/^%AC_CONFIG_COMMANDS%$$/r $(srcdir)/configure-bin-@LIBKIND@' \
-e '/^%AC_CONFIG_COMMANDS%$$/d' \
$(srcdir)/configure-bin.in > $(bindistdir)/configure.in
sed -e 's/%LIBKIND%/@LIBKIND@/g' $(srcdir)/Makefile-bin.in > $(bindistdir)/Makefile.in
cp $(srcdir)/in-place-config-bin $(bindistdir)/in-place-config
sed -e "s/%BUILD_DATE%/`date`/g" $(srcdir)/cyc.in > $(bindistdir)/bin/cyc.in
sed -e "s/%BUILD_DATE%/`date`/g" $(srcdir)/cymake.in > $(bindistdir)/bin/cymake.in
cp $(srcdir)/cyi.in $(bindistdir)/bin
for f in cycc cymk newer; do cp $$f $(bindistdir)/lib && strip $(bindistdir)/lib/$$f; done
for f in $(man_MANS); do \
cp $(srcdir)/$$f.in $(bindistdir)/man || exit $$?; \
done
for d in $(SUBDIRS); do \
(cd $$d && $(MAKE) bindistdir distdir=../$(bindistdir)) || \
exit $$?; \
done
# run the test suite
.PHONY: test
test: FORCE
cd test && $(MAKE) test
# automatic reconfiguration
$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4
cd $(srcdir) && autoconf
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in config.status
./config.status $@
$(MAKE) depend-dir
cyc: $(srcdir)/cyc.in $(srcdir)/in-place-config config.status
./config.status $@
cymake: $(srcdir)/cymake.in $(srcdir)/in-place-config config.status
./config.status $@
cyi: $(srcdir)/cyi.in $(srcdir)/in-place-config config.status
./config.status $@
.PRECIOUS: config.status
config.status: $(srcdir)/configure
./config.status --recheck
./config.status
# clean up
mostlyclean: mostlyclean-subdirs mostlyclean-dir
mostlyclean-dir::
rm -f $(INTF) $(OBJS)
rm -f cycc cymk newer cam2c mach
rm -f $(man_MANS) core *.core
clean: clean-subdirs clean-dir
clean-dir:: mostlyclean-dir
rm -f curry.aux curry.toc curry.log runtime/runtime.aux
rm -f curry.bbl curry.blg curry.out curry.dvi curry.ps curry.pdf
for f in $(SRCS); do if test -h $$f; then rm $$f; fi; done
distclean: distclean-subdirs distclean-dir
-rm -f config.status
distclean-dir:: clean-dir
-rm -f Makefile makedoc $(SCRIPTS) .depend config.cache config.log
-rm -f *~ a.out *.bak *.BAK TAGS
maintainerclean: maintainerclean-subdirs maintainerclean-dir
-rm -f configure config.status
maintainerclean-dir:: distclean-dir
# dependencies
# NB: methods for computing the dependencies of Haskell modules differ
# between the various compilers and are defined in @hc@.mk (included below)
depend: depend-dir depend-subdirs
# recursive invocations
# NB The seemingly contrived $(MAKEFLAGS:M-s:S/=/=/) and $(MAKEFLAGS:M-k:S/=/=/)
# substitutions are used in order to check for the presence of -s and -k,
# respectively, among the command line flags in a portable way. GNU make
# and other POSIX compatible make commands collect all single letter options
# -- if any -- in the first word of $(MAKEFLAGS). BSD make commands, on the
# other hand, use a separate word for each single letter option. In order to
# make the -s and -k options the first word if present, we use BSD make's
# :M variable modifier, which filters $(MAKEFLAGS) keeping only those words
# which match the pattern following :M. Since other make commands do not
# understand this modifier, we also add the identity substitution :S/=/=/,
# which yields a System V compatible variable substitution of the form
# :SUFFIX=REPL.
mostlyclean-subdirs clean-subdirs distclean-subdirs maintainerclean-subdirs \
depend-subdirs install-subdirs:
@fail=; subdirs="$(SUBDIRS)"; \
set dummy $(MAKEFLAGS:M-s:S/=/=/); s=$$2; \
set dummy $(MAKEFLAGS:M-k:S/=/=/); k=$$2; \
for d in $$subdirs; do \
target=`echo $@ | sed 's/-subdirs$$//'`; \
case $$s in \
*=*) echo "Making $$target in $$d";; \
*s*) ;; \
*) echo "Making $$target in $$d"; \
esac; \
(cd $$d && $(MAKE) $$target) || \
{ rc=$$?; case $$k in *=*) exit $$rc;; *k*) fail=yes;; *) exit $$rc;; esac; } \
done; \
test -z "$$fail"
# include definitions specific to the Haskell compiler
include $(srcdir)/@hc@.mk
# include computed dependencies
include .depend