-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
99 lines (78 loc) · 2.21 KB
/
Makefile.am
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
# Makefile.am
# $Id$
srcdir = @srcdir@
VPATH = @srcdir@
ACLOCAL_AMFLAGS = -I m4
if wx
.PHONY: all wx
else
if fox
.PHONY: all fox
else
.PHONY: all
endif
endif
# I want to be able to see what gets built and why, so here is a GNU
# make trace facility.
TRACE = $(warning TRACE: $@ :: $?)
# As at present set up this Makefile.am imagines that in a CSL build
# directory there are two sub-directories, csl and fox or wxWidgets, and it is
# necessary to delegate make to each of them. Well if a GUI is not needed
# or if a system version of wxWidgets is to be used then the fox/wxWidgets
# sub-directory is not used.
#
# For PSL it supposes that there will be a build directory called
# psl to delegate to.
AM_MAKEFLAGS=$(MFLAGS) $(MYFLAGS)
if csl
LISPDIR=csl
if fox
FOXDEP=include/fox-1.6/fxver.h
else
FOXDEP=
endif
if wx
WXDEP=bin/wx-config
else
WXDEP=
endif
else
if psl
LISPDIR=psl
FOXDEP=
WXDEP=
else
LISPDIR=unknown
FOXDEP=
WXDEP=
endif
endif
# I have "all" as a special case here because the first target should be
# the default one.
all: $(FOXDEP) $(WXDEP)
echo Build all: $(MAKE) mflags=$(MFLAGS) myflags=$(MYFLAGS) all
cd $(LISPDIR) && $(LOCALCYG) $(MAKE) $(MFLAGS) $(MYFLAGS) all MYFLAGS="$(MFLAGS) $(MYFLAGS)"
if csl
if fox
fox $(FOXDEP):
echo Build FOX: $(MAKE) mflags=$(MFLAGS) myflags=$(MYFLAGS) install
cd fox && $(LOCALCYG) $(MAKE) $(MFLAGS) $(MYFLAGS) install MYFLAGS="$(MFLAGS) $(MYFLAGS)"
endif
if wx
wx $(WXDEP):
echo Build wxWidgets: $(MAKE) mflags=$(MFLAGS) myflags=$(MYFLAGS) install
cd wxWidgets && $(LOCALCYG) $(MAKE) $(MFLAGS) $(MYFLAGS) install MYFLAGS="$(MFLAGS) $(MYFLAGS)"
endif
# If one of the major foundations of this Makefile have a date later than that
# on fxver.h then make does a futile recursion to try to fix it and in the
# process it can do a LOT of work that I do not want done. I can at least
# arrange that that happens at most once by putting the following rules:
$(srcdir)/configure.ac:
touch "$(srcdir)/configure.ac"
$(srcdir)/Makefile.am:
touch "$(srcdir)/Makefile.am"
endif
%:: $(FOXDEP) $(WXDEP)
echo $(MAKE) mflags=$(MFLAGS) myflags=$(MYFLAGS) makecmdgoals=$(MAKECMDGOALS)
cd $(LISPDIR) && $(MAKE) $(MFLAGS) $(MYFLAGS) $(MAKECMDGOALS) MYFLAGS="$(MFLAGS) $(MYFLAGS)"
# end of Makefile.am