-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.in
197 lines (164 loc) · 5.83 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
# $Id$
#
# This source file is a part of the Fresco Project.
# Copyright (C) 1999, 2000 Stefan Seefeld <stefan@fresco.org>
# http://www.fresco.org
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.
SHELL := /bin/sh
srcdir := @abs_srcdir@
top_srcdir := @top_srcdir@
builddir := @abs_builddir@
distdir := @PACKAGE_NAME@-@PACKAGE_VERSION@
mandatory := Prague Babylon Fresco-IDL Fresco-C++ Berlin
optional := GGI SDL \
Fresco-Python Fresco-Java Fresco-Perl \
Fresco-C++-demos Fresco-Python-demos \
contrib/daVinci
testbase_dir := $(shell test -d Fresco-Test && echo 'Fresco-Test')
mandatory_dirs := $(foreach package, $(mandatory), $(shell if test -d $(package) -a -f $(package)/Makefile ; then echo '$(package)'; fi ))
missing_mandatory_dirs := $(foreach package, $(mandatory), $(shell if test ! -d $(package) -o ! -f $(package)/Makefile ; then echo '$(package)'; fi ))
optional_dirs := $(foreach package, $(optional), $(shell test -d $(package) && test -f $(package)/Makefile && echo '$(package)'))
subdirs := $(missing_mandatory_dirs) $(testbase_dir) $(mandatory_dirs) $(optional_dirs)
sxrdirs := Prague Babylon Berlin
# Overridden by the clean-targets, allowing the same subdirs-rule to be used
# for everything.
action := all
.PHONY: all $(subdirs)
.PHONY: depend doc install install-doc dist \
clean distclean maintainer-clean
all: $(subdirs)
$(missing_mandatory_dirs):
@echo "The mandatory package \"$@\" not properly configured!"
@exit 1
$(mandatory_dirs): %: %/Makefile
@echo "making $(action) in $@"
$(MAKE) -C $@ $(action)
$(optional_dirs) $(testbase_dir): %: %/Makefile
@echo "making $(action) in $@ (optional)"
-$(MAKE) -C $@ $(action)
depend:
$(MAKE) action="depend"
sxr: xref
@echo "formatting sxr"
synopsis -c config/synopsis.py -Wc,formatter=SXR -o sxr data.syn
xref: data.syn data.xref sxr_data
doc:
$(MAKE) action="doc"
install:
$(MAKE) action="install"
install-doc:
$(MAKE) action="install-doc"
dist: $(distdir).tar.gz
$(distdir).tar.gz:
@echo "generating $@..."
-rm -rf $(distdir)
cp -pr $(srcdir) $(distdir)
-chmod -R a+r $(distdir)
tar czhf $(distdir).tar.gz \
--exclude CVS \
--exclude .cvsignore \
--exclude autom4te.cache \
--exclude '*.m4' \
--exclude '*.ac' \
--exclude '*~' \
$(distdir)
-rm -rf $(distdir)
build-tests:
ifdef testbase_dir
$(MAKE) -C $(testbase_dir)
$(MAKE) action="build-tests"
else
@echo "you need 'Fresco-Test' in order to build the tests"
endif
run-tests:
ifdef testbase_dir
$(MAKE) -C $(testbase_dir)
$(MAKE) action="run-tests"
else
@echo "you need 'Fresco-Test' in order to run the tests"
endif
uninstall:
$(MAKE) action="uninstall"
clean:
$(MAKE) action="clean"
distclean:
@echo 'This command removes Makefiles and auxiliary files;'
@echo 'run configure to regenerate them.'
$(MAKE) action="distclean"
rm -rf Makefile config.cache config.log config.status \
config/Fresco-config config/synopsis.py \
$(top_srcdir)/autom4te.cache $(top_srcdir)/config/aclocal.m4
maintainer-clean:
@echo 'This command is intended for maintainers to use;'
@echo 'it deletes configure and auxiliary files;'
@echo 'run autogen.sh to regenerated them.'
$(MAKE) action="maintainer-clean"
rm -rf Makefile config.cache config.log config.status \
config/Prague-config config/synopsis.py \
$(top_srcdir)/autom4te.cache $(top_srcdir)/config/aclocal.m4 \
$(top_srcdir)/configure
data.syn: $(join $(sxrdirs), $(patsubst %, /share/doc/%, $(join $(sxrdirs), $(patsubst %, /sxr/%.syn, $(sxrdirs)))))
@echo linking synopsis files together
synopsis -o $@ $^
data.xref: $(join $(sxrdirs), $(patsubst %, /share/doc/%, $(join $(sxrdirs), $(patsubst %, /sxr/%.xref, $(sxrdirs)))))
@echo linking xref files together
compile-xref -m -o $@ $^
sxr_data:
for dir in $(sxrdirs); do \
for file in `(cd $$dir/share/doc/$$dir/sxr/sxr_data && find . -type f -print)`; do \
if ! cmp -s $$dir/share/doc/$$dir/sxr/sxr_data/$$file sxr_data/$$dir/share/doc/$$dir/sxr/sxr_data/$$file 2>/dev/null; then \
mkdir -p `dirname sxr_data/$$dir/share/doc/$$dir/sxr/sxr_data/$$file`;\
cp -p $$dir/share/doc/$$dir/sxr/sxr_data/$$file sxr_data/$$dir/share/doc/$$dir/sxr/sxr_data/$$file;\
touch sxr_data;\
fi\
done\
done
%/%.syn %/%.xref:
$(MAKE) -C $(@D) xref
# insert inter-directory dependencies here, but only if the required package
# is present
ifneq ($(findstring Prague, $(subdirs)),)
Babylon: Prague
Berlin: Prague
GGI: Prague
SDL: Prague
Fresco-C++-demos: Prague
endif
ifneq ($(findstring Babylon, $(subdirs)),)
Berlin: Babylon
Fresco-C++: Babylon
Clients-C++: Babylon
endif
ifneq ($(findstring Fresco-IDL, $(subdirs)),)
Fresco-C++: Fresco-IDL
Fresco-Java: Fresco-IDL
Fresco-Python: Fresco-IDL
Fresco-Perl: Fresco-IDL
endif
ifneq ($(findstring Fresco-C++, $(subdirs)),)
Berlin: Fresco-C++
Fresco-C++-demos: Fresco-C++
contrib/daVinci: Fresco-C++
endif
ifneq ($(findstring Berlin, $(subdirs)),)
GGI: Berlin
SDL: Berlin
Fresco-C++-demos: Berlin #FIXME !!!
endif
ifneq ($(findstring Fresco-Python, $(subdirs)),)
Fresco-Python-demos: Fresco-Python
endif