Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 317 lines (274 sloc) 9.068 kb
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
1 #
2 # Authors:
3 # Michael Mehl (mehl@dfki.de)
4 #
5 # Contributors:
6 # Denys Duchier (duchier@ps.uni-sb.de)
a69d398 Packaging complete
schulte authored
7 # Christian Schulte <schulte@ps.uni-sb.de>
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
8 #
9 # Copyright:
a69d398 Packaging complete
schulte authored
10 # Michael Mehl, 1998
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
11 #
12 # Last change:
13 # $Date$ by $Author$
14 # $Revision$
15 #
16 # This file is part of Mozart, an implementation
17 # of Oz 3:
647ee41 mozart.ps.uni-sb.de --> www.mozart-oz.org
schulte authored
18 # http://www.mozart-oz.org
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
19 #
20 # See the file "LICENSE" or
647ee41 mozart.ps.uni-sb.de --> www.mozart-oz.org
schulte authored
21 # http://www.mozart-oz.org/LICENSE.html
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
22 # for information on usage and redistribution
23 # of this file, and for a DISCLAIMER OF ALL
24 # WARRANTIES.
25
26 # !!! THIS MAKEFILE REQUIRES GNU MAKE !!!!
27
28 ######################################################################
29 # path
30 ######################################################################
608fba9 changes to configure the whole tree
duchier authored
31
32 BUILDTOP= @BUILDTOP@
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
33 SRCTOP= @SRCTOP@
34 SRCDIR= @srcdir@
35 VPATH= @srcdir@
36 PREFIX= @prefix@
55c2007 added support for a bin target to create the binary tarballs
duchier authored
37 PLATFORM= @PLATFORM@
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
38
bf7e1c5 Have a single location for HOMEURL in aclocal.m4
schulte authored
39 HOMEURL= @HOMEURL@
40 HOMECACHE= @HOMECACHE@
41
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
42 BINDIR= $(PREFIX)/bin
51c7b89 updated lib->share
mehl authored
43 SHAREDIR= $(PREFIX)/share
44 TOOLSDIR= $(SHAREDIR)/tools
45 ELISPDIR= $(SHAREDIR)/elisp
46 IMAGESDIR= $(SHAREDIR)/images
bf7e1c5 Have a single location for HOMEURL in aclocal.m4
schulte authored
47 CACHEDIR= $(PREFIX)/$(HOMECACHE)
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
48 CACHETOOLS= $(CACHEDIR)/tools
49 CACHEBIN= $(CACHEDIR)/bin
51c7b89 updated lib->share
mehl authored
50 SHARECACHE= $(CACHEDIR)/share
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
51
52 ######################################################################
53 # programs
54 ######################################################################
c4b0b27 global configure
mehl authored
55
aceb872 set MAKE in top level file to the GNU make we found. this way, even if
duchier authored
56 MAKE= @MAKE@
c4b0b27 global configure
mehl authored
57 INSTALL= @INSTALL@
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
58 INSTALL_BIN= $(INSTALL) -m 555
59 INSTALL_FILE= $(INSTALL) -m 444
60 INSTALL_DIR= @INSTALL_DIR@
c4b0b27 global configure
mehl authored
61
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
62 ######################################################################
63 # other variables
64 ######################################################################
c4b0b27 global configure
mehl authored
65
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
66 OZVERSION= $(SRCTOP)/OZVERSION
1ccfcdd Support to build dates (thanks a lot to Denys) started
schulte authored
67 OZBUILD= @OZBUILDDATE@
60b7e28 Have the license also as rich text
schulte authored
68 FILES= README LICENSE LICENSE.html LICENSE.rtf
d376a05 only use PREFIX (no OZHOME)
mehl authored
69 ALLFILES= $(FILES:%=$(PREFIX)/%)
c4b0b27 global configure
mehl authored
70
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
71 # sub directories for recursive makes
f4482b2 -enable-subdirs
mehl authored
72 SUBDIRS= @oz_subdirs@
1fd0f6a demo are not in common
mehl authored
73
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
74 ######################################################################
75 # common targets
76 ######################################################################
c4b0b27 global configure
mehl authored
77
2c0bd2e 3rd: target platform to generate only platform dependent stuff
mehl authored
78 .PHONY: all bootstrap install clean veryclean distclean check
c4b0b27 global configure
mehl authored
79
1f9ba3c make all does not point to make bootstrap anymore; nevertheless make boo...
scheidhr authored
80 bootstrap::
c4b0b27 global configure
mehl authored
81
1f9ba3c make all does not point to make bootstrap anymore; nevertheless make boo...
scheidhr authored
82 all bootstrap clean veryclean depend distclean check install::
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
83 dirs="$(SUBDIRS)"; \
84 for i in $$dirs; do \
85 if (cd $$i && $(MAKE) $@); \
86 then true; \
87 else exit 1; \
88 fi; \
89 done
90
91 clean::
92 -rm -f *~
93
94 veryclean::
95 $(MAKE) clean SUBDIRS=
c4b0b27 global configure
mehl authored
96
608fba9 changes to configure the whole tree
duchier authored
97 distclean::
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
98 $(MAKE) veryclean SUBDIRS=
99 -rm -f Makefile config.cache config.log config.status
100
8eb3d1b Packing targets started
schulte authored
101 install:: $(PREFIX)
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
102
8eb3d1b Packing targets started
schulte authored
103 $(PREFIX):
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
104 $(INSTALL_DIR) $@
105
106 all:: Makefile
c4b0b27 global configure
mehl authored
107
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
108 Makefile: Makefile.in ./config.status
109 ./config.status
110
111 ./config.status: ./configure
112 ./config.status --recheck
113
608fba9 changes to configure the whole tree
duchier authored
114 install:: $(ALLFILES)
c4b0b27 global configure
mehl authored
115
6218037 install files works
mehl authored
116 $(ALLFILES): $(PREFIX)/% : % $(PREFIX)
117 $(INSTALL_FILE) $< $@
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
118
8eb3d1b Packing targets started
schulte authored
119 ######################################################################
120 # other targets
121 ######################################################################
122
6e4d875 Use YYMMDD as date (Thanks to Lars)
schulte authored
123 PLATFORMS= solaris-sparc aix3-rs600 freebsd-i486 hpux-700 \
124 irix6-mips linux-i486 netbsd-i486 netbsd-m68k netbsd-sparc \
45fbc7c freebsdelf-i486 works
schulte authored
125 osf1-alpha solaris-i486 sunos-sparc freebsdelf-i486
8eb3d1b Packing targets started
schulte authored
126 COMPRESS= gzip -9
60b7e28 Have the license also as rich text
schulte authored
127 ZIP= zip -r
8eb3d1b Packing targets started
schulte authored
128 TAR= tar
44383cb Imporved packing
schulte authored
129 PACKDIR= /tmp/pack
cf3608c Windows packing: not yet finished
schulte authored
130 MPD= $(PACKDIR)/mozart
131 WIN32CACHEDIR= $(MPD)/cache/$(HOMECACHE)
4ea150d merged from 1.2 branch
duchier authored
132 NOTDIRSRCTOP = $(notdir $(SRCTOP))
c4b0b27 global configure
mehl authored
133
108cdf9 Imporved
schulte authored
134 .PHONY: src doc $(PLATFORMS)
c4b0b27 global configure
mehl authored
135
b4b1279 Merge Denys' rpmbuild fix:
glynn authored
136 ifeq ($(USER),root)
137 # make sure that what goes into the tar files for preparing the RPMs
138 # is actually owned by root, otherwise the owner and group of the file
139 # itself will be used, which aren't likely to exist on a user's machine.
140 TARTAR = $(TAR) --owner=root --group=root
141 else
142 TARTAR = $(TAR)
143 endif
144
108cdf9 Imporved
schulte authored
145 src: $(PACKDIR)
4ea150d merged from 1.2 branch
duchier authored
146 echo "[" $(NOTDIRSRCTOP) "]"
0049b08 merged from release branch
duchier authored
147 test -n "$(NOTDIRSRCTOP)" || { echo "bad"; exit 1; }
8eb3d1b Packing targets started
schulte authored
148 (cd $(PACKDIR); \
81e36ec fix the 'src' target so that it works with symbolic links;
popow authored
149 mkdir -p $(NOTDIRSRCTOP); \
150 cd $(NOTDIRSRCTOP); \
151 (cd $(SRCTOP); \
152 $(TAR) -cf - .) | $(TAR) -xf - ; \
153 cd ..; \
4ea150d merged from 1.2 branch
duchier authored
154 tbr=`find $(NOTDIRSRCTOP) -name CVS -type d 2>/dev/null` ; \
f0b83ad freebsd's 'find' does not like when its '-exec' removes directories;
popow authored
155 rm -rf $$tbr ; \
4ea150d merged from 1.2 branch
duchier authored
156 find $(NOTDIRSRCTOP) -name '.cvsignore' -type f -exec rm -f '{}' ';' ; \
157 mv $(NOTDIRSRCTOP) mozart-`$(OZVERSION)`.$(OZBUILD); \
b4b1279 Merge Denys' rpmbuild fix:
glynn authored
158 $(TARTAR) -cf - mozart-`$(OZVERSION)`.$(OZBUILD) ) | \
1ccfcdd Support to build dates (thanks a lot to Denys) started
schulte authored
159 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-src.tar.gz
83604fa Simpler rpms
schulte authored
160 rm -rf $(PACKDIR)/mozart-`$(OZVERSION)`.$(OZBUILD)
c4b0b27 global configure
mehl authored
161
8dbc044 Be more accurate which belongs to which package
schulte authored
162 doc: $(PACKDIR) $(PACKDIR)/mozart
163 rm -f files.doc
164 $(MAKE) files.doc
165 rm -rf $(PACKDIR)/mozart
166 $(INSTALL_DIR) $(PACKDIR)/mozart
167 ( (cd $(PREFIX); \
168 $(TAR) -cf - -T $(BUILDTOP)/files.doc ) | \
169 (cd $(PACKDIR)/mozart; $(TAR) -xf - ) )
b4b1279 Merge Denys' rpmbuild fix:
glynn authored
170 (cd $(PACKDIR); $(TARTAR) -cf - mozart ) | \
1ccfcdd Support to build dates (thanks a lot to Denys) started
schulte authored
171 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-doc.tar.gz
a69d398 Packaging complete
schulte authored
172 rm -rf $(PACKDIR)/mozart
8dbc044 Be more accurate which belongs to which package
schulte authored
173 rm -f files.doc
a69d398 Packaging complete
schulte authored
174
55c2007 added support for a bin target to create the binary tarballs
duchier authored
175 bin: $(PLATFORM)
176
a69d398 Packaging complete
schulte authored
177 $(PLATFORMS): $(PACKDIR) $(PACKDIR)/mozart
6652842 Ease multiple platform building
schulte authored
178 rm -f files.base files.base-$@ files.contrib files.contrib-$@
8dbc044 Be more accurate which belongs to which package
schulte authored
179 $(MAKE) files.base files.base-$@ files.contrib files.contrib-$@
e5696b3 Merged configuration and .in files from the release branch.
glynn authored
180 rm -f files.all
181 cat files.base files.base-$@ files.contrib files.contrib-$@ > files.all
8dbc044 Be more accurate which belongs to which package
schulte authored
182 rm -rf $(PACKDIR)/mozart
183 $(INSTALL_DIR) $(PACKDIR)/mozart
184 ( (cd $(PREFIX); \
e5696b3 Merged configuration and .in files from the release branch.
glynn authored
185 $(TAR) -cf - -T $(BUILDTOP)/files.all ) | \
8dbc044 Be more accurate which belongs to which package
schulte authored
186 (cd $(PACKDIR)/mozart; $(TAR) -xf - ) )
b4b1279 Merge Denys' rpmbuild fix:
glynn authored
187 (cd $(PACKDIR); $(TARTAR) -cf - mozart ) | \
8dbc044 Be more accurate which belongs to which package
schulte authored
188 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-$@.tar.gz
a69d398 Packaging complete
schulte authored
189 rm -rf $(PACKDIR)/mozart
31274ef enhancements + merges from release branch
duchier authored
190 ldd $(PREFIX)/platform/$(PLATFORM)/emulator.exe \
191 $(PREFIX)/platform/$(PLATFORM)/tk.exe | \
192 sed 's/^.*emulator.exe:/emulator.exe dynamically linked against:/' | \
0049b08 merged from release branch
duchier authored
193 sed 's/^.*tk.exe:/tk.exe dynamically linked against:/' > README-`$(OZVERSION)`.$(OZBUILD)-$@
e5696b3 Merged configuration and .in files from the release branch.
glynn authored
194 rm -f files.base files.base-$@ files.contrib files.contrib-$@ files.all
c4b0b27 global configure
mehl authored
195
cf3608c Windows packing: not yet finished
schulte authored
196 $(PACKDIR) $(PACKDIR)/mozart:
624f369 More Solaris puritanism. Makefiles should conform to Bourne shell
glynn authored
197 INSTALL_DIR_CHMOD=777; export INSTALL_DIR_CHMOD && $(INSTALL_DIR) $@
c4b0b27 global configure
mehl authored
198
4519a2b Added experimental target win32-i486-cygwin for packing the
kornstae authored
199 win32-i486-cygwin: $(PACKDIR) $(PACKDIR)/mozart
200 ( cd $(PREFIX) && \
201 $(TAR) c --exclude platform/win32-i486/oztool.sh -f - \
202 $(FILES) \
203 include share \
204 doc examples \
205 cache/x-oz/contrib cache/x-oz/system \
206 bin platform/win32-i486 \
207 ) | (cd $(MPD) && $(TAR) xf -)
6e92089 merged from release branch
duchier authored
208 find $(MPD) -name '*.so-*' -a \! \( -name '*.so-win32-i486' \) \
4519a2b Added experimental target win32-i486-cygwin for packing the
kornstae authored
209 -exec rm -f '{}' ';'
210 rm -rf mozart-win32
211 $(INSTALL_DIR) mozart-win32
212 (cd $(MPD) && \
213 $(TAR) cf - $(FILES) bin cache/x-oz/system cache/x-oz/contrib \
214 doc examples \
215 include share/Init.ozf share/elisp platform) | \
216 (cd mozart-win32 && $(TAR) xf -)
217 $(INSTALL_DIR) mozart-win32/doc
218 $(INSTALL) -m 644 $(SRCTOP)/doc/utilities/ozdoc-iexplorer.css \
219 mozart-win32/doc/ozdoc.css
220 rm -rf $(PACKDIR)/mozart
221 rm -f mozart-win32.zip
222 $(ZIP) mozart-win32.zip mozart-win32
223 rm -rf mozart-win32
224
225 win32-i486-cross: $(PACKDIR) $(PACKDIR)/mozart
cf3608c Windows packing: not yet finished
schulte authored
226 ( cd $(PREFIX); \
227 $(TAR) cf - \
228 $(FILES) \
229 include share \
baf1d07 Fix for make win32-i486 due to changes in directory tree
dragan authored
230 doc examples \
231 cache/x-oz/contrib cache/x-oz/system \
cf3608c Windows packing: not yet finished
schulte authored
232 winbin platform/win32-i486 \
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
233 ) | (cd $(MPD); $(TAR) xf -)
6e92089 merged from release branch
duchier authored
234 find $(MPD) -name '*.so-*' -a \! \( -name '*.so-win32-i486' \) \
cf3608c Windows packing: not yet finished
schulte authored
235 -exec rm -f '{}' ';'
236 for i in ozc ozd ozl; do \
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
237 cat $(MPD)/winbin/ozwrapper.bin \
238 $(PREFIX)/bin/$$i > $(MPD)/winbin/$$i.exe; \
239 done
240 for i in convertTextPickle; do \
241 if [ -r $(PREFIX)/bin/$$i ]; then \
242 cat $(MPD)/winbin/ozwrapper.bin \
243 $(PREFIX)/bin/$$i > $(MPD)/winbin/$$i.exe; \
244 fi; \
245 done
cf3608c Windows packing: not yet finished
schulte authored
246 mv $(MPD)/winbin $(MPD)/bin
247 chmod -R a+x $(MPD)/bin
a638165 Okay! target win32-i486 creates three subdirs
schulte authored
248 rm -rf mozart-win32
249 $(INSTALL_DIR) mozart-win32
250 (cd $(MPD); \
baf1d07 Fix for make win32-i486 due to changes in directory tree
dragan authored
251 $(TAR) cf - $(FILES) bin cache/x-oz/system cache/x-oz/contrib \
252 doc examples \
a638165 Okay! target win32-i486 creates three subdirs
schulte authored
253 include share/Init.ozf share/elisp platform) | \
baf1d07 Fix for make win32-i486 due to changes in directory tree
dragan authored
254 (cd mozart-win32; $(TAR) xf -)
1c1c4f8 Use a different stylesheet for the CHM documentation
kornstae authored
255 $(INSTALL_DIR) mozart-win32/doc/doc
256 $(INSTALL_FILE) $(SRCTOP)/doc/utilities/ozdoc-iexplorer.css \
257 mozart-win32/doc/doc/ozdoc.css
7808cdd Shit
schulte authored
258 rm -rf /tmp/pack/mozart
7501766 Remove the mozart-win32.zip archive before adding files to avoid updatin...
kornstae authored
259 rm -f mozart-win32.zip
60b7e28 Have the license also as rich text
schulte authored
260 $(ZIP) -r mozart-win32.zip mozart-win32
4cf1bb3 Directly create zip for win32
schulte authored
261 rm -rf mozart-win32
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
262
8dbc044 Be more accurate which belongs to which package
schulte authored
263 files.base:
264 (cd $(PREFIX); \
6e92089 merged from release branch
duchier authored
265 find . \( -type f -o -type l \) -a \( \
266 ! -path './platform/*' -a \
267 ! -path './winbin/*' -a \
268 ! -path './cache/x-oz/contrib/*' -a \
269 ! -path './cache/x-oz/doc/*' -a \
270 ! -path './doc/*' -a \
271 ! -path './print/*' -a \
272 ! -path './examples/*' -a \
273 ! -path './cache/x-oz/system/gump/examples/*' -a \
274 ! -path './share/doc/*' -a \
275 ! -path './bin/ozdoc' -a \
276 ! -path './bin/convertTextPickle' -a \
e5696b3 Merged configuration and .in files from the release branch.
glynn authored
277 ! -name '*.so-*' -a \
278 ! -path './share/elisp/Fontifier.el' \
8dbc044 Be more accurate which belongs to which package
schulte authored
279 \) ) > $@
280
4052fec . some bugs in distribution/marshaling are fixed;
popow authored
281
8dbc044 Be more accurate which belongs to which package
schulte authored
282 files.base-%:
283 (cd $(PREFIX); \
6e92089 merged from release branch
duchier authored
284 find . \( -type f -o -type l \) -a \
285 \( -path './platform/$*/*' -o \
286 -path './cache/x-oz/boot/*.so-$*' -o \
4052fec . some bugs in distribution/marshaling are fixed;
popow authored
287 -path './cache/x-oz/system/*.so-$*' \) \
8dbc044 Be more accurate which belongs to which package
schulte authored
288 ) > $@
289
290 files.contrib:
291 (cd $(PREFIX); \
6e92089 merged from release branch
duchier authored
292 find . \( -type f -o -type l \) -a \( \
293 \( -path './cache/x-oz/contrib/*' -a ! -name '*.so-*' \) -o \
294 -path './bin/ozdoc' -o \
295 -path './bin/convertTextPickle' -o \
e5696b3 Merged configuration and .in files from the release branch.
glynn authored
296 -path './share/doc/*' -o \
297 -path './share/elisp/Fontifier.el' \
8dbc044 Be more accurate which belongs to which package
schulte authored
298 \) ) > $@
299
300 files.contrib-%:
301 (cd $(PREFIX); \
6e92089 merged from release branch
duchier authored
302 find . \( -type f -o -type l \) -a \
303 -path './cache/x-oz/contrib/*' -a \
8dbc044 Be more accurate which belongs to which package
schulte authored
304 -name '*.so-$*' \
305 ) > $@
306
307 files.doc:
308 (cd $(PREFIX); \
6e92089 merged from release branch
duchier authored
309 find . \( -type f -o -type l \) -a \( \
310 -path './doc/*' -o \
311 -path './cache/x-oz/system/gump/examples/*' -o \
312 -path './cache/x-oz/doc/*' -o \
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
313 -path './examples/*' \
e5696b3 Merged configuration and .in files from the release branch.
glynn authored
314 \) -a \! \( -path './doc/Mozart.hh?' -o \
315 -path './doc/add-ons/*/*' \) ) > $@
4eeab0c Another last minute fix: exclude winbin for
schulte authored
316
Something went wrong with that request. Please try again.