Skip to content
Newer
Older
100644 301 lines (260 sloc) 8.48 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@
37
bf7e1c5 Have a single location for HOMEURL in aclocal.m4
schulte authored
38 HOMEURL= @HOMEURL@
39 HOMECACHE= @HOMECACHE@
40
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
41 BINDIR= $(PREFIX)/bin
51c7b89 updated lib->share
mehl authored
42 SHAREDIR= $(PREFIX)/share
43 TOOLSDIR= $(SHAREDIR)/tools
44 ELISPDIR= $(SHAREDIR)/elisp
45 IMAGESDIR= $(SHAREDIR)/images
bf7e1c5 Have a single location for HOMEURL in aclocal.m4
schulte authored
46 CACHEDIR= $(PREFIX)/$(HOMECACHE)
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
47 CACHETOOLS= $(CACHEDIR)/tools
48 CACHEBIN= $(CACHEDIR)/bin
51c7b89 updated lib->share
mehl authored
49 SHARECACHE= $(CACHEDIR)/share
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
50
51 ######################################################################
52 # programs
53 ######################################################################
c4b0b27 global configure
mehl authored
54
aceb872 set MAKE in top level file to the GNU make we found. this way, even if
duchier authored
55 MAKE= @MAKE@
c4b0b27 global configure
mehl authored
56 INSTALL= @INSTALL@
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
57 INSTALL_BIN= $(INSTALL) -m 555
58 INSTALL_FILE= $(INSTALL) -m 444
59 INSTALL_DIR= @INSTALL_DIR@
c4b0b27 global configure
mehl authored
60
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
61 ######################################################################
62 # other variables
63 ######################################################################
c4b0b27 global configure
mehl authored
64
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
65 OZVERSION= $(SRCTOP)/OZVERSION
1ccfcdd Support to build dates (thanks a lot to Denys) started
schulte authored
66 OZBUILD= @OZBUILDDATE@
60b7e28 Have the license also as rich text
schulte authored
67 FILES= README LICENSE LICENSE.html LICENSE.rtf
d376a05 only use PREFIX (no OZHOME)
mehl authored
68 ALLFILES= $(FILES:%=$(PREFIX)/%)
c4b0b27 global configure
mehl authored
69
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
70 # sub directories for recursive makes
f4482b2 -enable-subdirs
mehl authored
71 SUBDIRS= @oz_subdirs@
1fd0f6a demo are not in common
mehl authored
72
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
73 ######################################################################
74 # common targets
75 ######################################################################
c4b0b27 global configure
mehl authored
76
2c0bd2e 3rd: target platform to generate only platform dependent stuff
mehl authored
77 .PHONY: all bootstrap install clean veryclean distclean check
c4b0b27 global configure
mehl authored
78
1f9ba3c make all does not point to make bootstrap anymore; nevertheless make …
scheidhr authored
79 bootstrap::
c4b0b27 global configure
mehl authored
80
1f9ba3c make all does not point to make bootstrap anymore; nevertheless make …
scheidhr authored
81 all bootstrap clean veryclean depend distclean check install::
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
82 dirs="$(SUBDIRS)"; \
83 for i in $$dirs; do \
84 if (cd $$i && $(MAKE) $@); \
85 then true; \
86 else exit 1; \
87 fi; \
88 done
89
90 clean::
91 -rm -f *~
92
93 veryclean::
94 $(MAKE) clean SUBDIRS=
c4b0b27 global configure
mehl authored
95
608fba9 changes to configure the whole tree
duchier authored
96 distclean::
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
97 $(MAKE) veryclean SUBDIRS=
98 -rm -f Makefile config.cache config.log config.status
99
8eb3d1b Packing targets started
schulte authored
100 install:: $(PREFIX)
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
101
8eb3d1b Packing targets started
schulte authored
102 $(PREFIX):
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
103 $(INSTALL_DIR) $@
104
105 all:: Makefile
c4b0b27 global configure
mehl authored
106
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
107 Makefile: Makefile.in ./config.status
108 ./config.status
109
110 ./config.status: ./configure
111 ./config.status --recheck
112
608fba9 changes to configure the whole tree
duchier authored
113 install:: $(ALLFILES)
c4b0b27 global configure
mehl authored
114
6218037 install files works
mehl authored
115 $(ALLFILES): $(PREFIX)/% : % $(PREFIX)
116 $(INSTALL_FILE) $< $@
2d6b53a first steps to cleanup Makefiles (see mozart/README.Makefiles)
mehl authored
117
8eb3d1b Packing targets started
schulte authored
118 ######################################################################
119 # other targets
120 ######################################################################
121
6e4d875 Use YYMMDD as date (Thanks to Lars)
schulte authored
122 PLATFORMS= solaris-sparc aix3-rs600 freebsd-i486 hpux-700 \
123 irix6-mips linux-i486 netbsd-i486 netbsd-m68k netbsd-sparc \
45fbc7c freebsdelf-i486 works
schulte authored
124 osf1-alpha solaris-i486 sunos-sparc freebsdelf-i486
8eb3d1b Packing targets started
schulte authored
125 COMPRESS= gzip -9
60b7e28 Have the license also as rich text
schulte authored
126 ZIP= zip -r
8eb3d1b Packing targets started
schulte authored
127 TAR= tar
44383cb Imporved packing
schulte authored
128 PACKDIR= /tmp/pack
cf3608c Windows packing: not yet finished
schulte authored
129 MPD= $(PACKDIR)/mozart
130 WIN32CACHEDIR= $(MPD)/cache/$(HOMECACHE)
c4b0b27 global configure
mehl authored
131
108cdf9 Imporved
schulte authored
132 .PHONY: src doc $(PLATFORMS)
c4b0b27 global configure
mehl authored
133
108cdf9 Imporved
schulte authored
134 src: $(PACKDIR)
8eb3d1b Packing targets started
schulte authored
135 (cd $(PACKDIR); \
136 (cd $(SRCTOP)/..; \
137 $(TAR) -cf - mozart) | $(TAR) -xf - ; \
a69d398 Packaging complete
schulte authored
138 find mozart -name CVS -type d -exec rm -rf '{}' ';' 2>/dev/null ; \
139 find mozart -name '.cvsignore' -type f -exec rm -f '{}' ';' ; \
83604fa Simpler rpms
schulte authored
140 mv mozart mozart-`$(OZVERSION)`.$(OZBUILD); \
141 $(TAR) -cf - mozart-`$(OZVERSION)`.$(OZBUILD) ) | \
1ccfcdd Support to build dates (thanks a lot to Denys) started
schulte authored
142 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-src.tar.gz
83604fa Simpler rpms
schulte authored
143 rm -rf $(PACKDIR)/mozart-`$(OZVERSION)`.$(OZBUILD)
c4b0b27 global configure
mehl authored
144
8dbc044 Be more accurate which belongs to which package
schulte authored
145 doc: $(PACKDIR) $(PACKDIR)/mozart
146 rm -f files.doc
147 $(MAKE) files.doc
148 rm -rf $(PACKDIR)/mozart
149 $(INSTALL_DIR) $(PACKDIR)/mozart
150 ( (cd $(PREFIX); \
151 $(TAR) -cf - -T $(BUILDTOP)/files.doc ) | \
152 (cd $(PACKDIR)/mozart; $(TAR) -xf - ) )
153 (cd $(PACKDIR); $(TAR) -cf - mozart ) | \
1ccfcdd Support to build dates (thanks a lot to Denys) started
schulte authored
154 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-doc.tar.gz
a69d398 Packaging complete
schulte authored
155 rm -rf $(PACKDIR)/mozart
8dbc044 Be more accurate which belongs to which package
schulte authored
156 rm -f files.doc
a69d398 Packaging complete
schulte authored
157
158 $(PLATFORMS): $(PACKDIR) $(PACKDIR)/mozart
6652842 Ease multiple platform building
schulte authored
159 rm -f files.base files.base-$@ files.contrib files.contrib-$@
8dbc044 Be more accurate which belongs to which package
schulte authored
160 $(MAKE) files.base files.base-$@ files.contrib files.contrib-$@
6652842 Ease multiple platform building
schulte authored
161 rm -f files.all files.base-all files.contrib-all
8dbc044 Be more accurate which belongs to which package
schulte authored
162 cat files.base files.base-$@ > files.base-all
163 cat files.contrib files.contrib-$@ > files.contrib-all
6652842 Ease multiple platform building
schulte authored
164 cat files.base-$@ files.contrib-$@ > files.all
8dbc044 Be more accurate which belongs to which package
schulte authored
165 rm -rf $(PACKDIR)/mozart
166 $(INSTALL_DIR) $(PACKDIR)/mozart
167 ( (cd $(PREFIX); \
168 $(TAR) -cf - -T $(BUILDTOP)/files.base-all ) | \
169 (cd $(PACKDIR)/mozart; $(TAR) -xf - ) )
a69d398 Packaging complete
schulte authored
170 (cd $(PACKDIR); $(TAR) -cf - mozart ) | \
8dbc044 Be more accurate which belongs to which package
schulte authored
171 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-$@.tar.gz
a69d398 Packaging complete
schulte authored
172 rm -rf $(PACKDIR)/mozart
8dbc044 Be more accurate which belongs to which package
schulte authored
173 $(INSTALL_DIR) $(PACKDIR)/mozart
174 ( (cd $(PREFIX); \
175 $(TAR) -cf - -T $(BUILDTOP)/files.contrib-all ) | \
176 (cd $(PACKDIR)/mozart; $(TAR) -xf - ) )
177 (cd $(PACKDIR); $(TAR) -cf - mozart ) | \
178 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-$@-contrib.tar.gz
179 rm -rf $(PACKDIR)/mozart
6652842 Ease multiple platform building
schulte authored
180 $(INSTALL_DIR) $(PACKDIR)/mozart
181 ( (cd $(PREFIX); \
182 $(TAR) -cf - -T $(BUILDTOP)/files.all ) | \
183 (cd $(PACKDIR)/mozart; $(TAR) -xf - ) )
184 (cd $(PACKDIR); $(TAR) -cf - mozart ) | \
185 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-$@-internal.tar.gz
186 rm -rf $(PACKDIR)/mozart
8dbc044 Be more accurate which belongs to which package
schulte authored
187 rm -f files.base files.base-$@ files.contrib files.contrib-$@
6652842 Ease multiple platform building
schulte authored
188 rm -f files.base-all files.contrib-all files.all
c4b0b27 global configure
mehl authored
189
cf3608c Windows packing: not yet finished
schulte authored
190 $(PACKDIR) $(PACKDIR)/mozart:
8eb3d1b Packing targets started
schulte authored
191 $(INSTALL_DIR) $@
c4b0b27 global configure
mehl authored
192
cf3608c Windows packing: not yet finished
schulte authored
193 win32-i486: $(PACKDIR) $(PACKDIR)/mozart
194 ( cd $(PREFIX); \
195 $(TAR) cf - \
196 $(FILES) \
197 include share \
198 contrib doc examples \
199 winbin platform/win32-i486 \
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
200 ) | (cd $(MPD); $(TAR) xf -)
cf3608c Windows packing: not yet finished
schulte authored
201 $(INSTALL_DIR) $(WIN32CACHEDIR)/share
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
202 find $(MPD) -name '*.so-*' -and -not -name '*.so-win32-i486' \
cf3608c Windows packing: not yet finished
schulte authored
203 -exec rm -f '{}' ';'
204 mv $(MPD)/share/images $(WIN32CACHEDIR)/share
205 mv $(MPD)/share/?*.ozf $(WIN32CACHEDIR)/share
206 mv $(MPD)/share/*.so-win32-i486 $(WIN32CACHEDIR)/share || true
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
207 mv $(MPD)/platform/win32-i486/GumpScanner.so \
208 $(WIN32CACHEDIR)/share/GumpScanner.so-win32-i486
209 mv $(MPD)/platform/win32-i486/Bison.so \
210 $(WIN32CACHEDIR)/share/Bison.so-win32-i486
211 (cd $(MPD)/contrib; \
212 rm -rf text os/io.ozf os/process.ozf os/open.ozf; \
cf3608c Windows packing: not yet finished
schulte authored
213 rm -rf LP.ozf Psql.ozf RI.ozf Reflect.ozf DaVinci.ozf)
214 mv $(MPD)/contrib $(WIN32CACHEDIR)
215 rm -rf $(MPD)/share/doc \
216 $(MPD)/platform/win32-i486/oztool.sh
217 mv $(WIN32CACHEDIR)/share/Init.ozf $(MPD)/share
218 for i in ozc ozd ozl; do \
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
219 cat $(MPD)/winbin/ozwrapper.bin \
220 $(PREFIX)/bin/$$i > $(MPD)/winbin/$$i.exe; \
221 done
222 for i in convertTextPickle; do \
223 if [ -r $(PREFIX)/bin/$$i ]; then \
224 cat $(MPD)/winbin/ozwrapper.bin \
225 $(PREFIX)/bin/$$i > $(MPD)/winbin/$$i.exe; \
226 fi; \
227 done
cf3608c Windows packing: not yet finished
schulte authored
228 mv $(MPD)/winbin $(MPD)/bin
229 chmod -R a+x $(MPD)/bin
a638165 Okay! target win32-i486 creates three subdirs
schulte authored
230 rm -rf mozart-win32
231 $(INSTALL_DIR) mozart-win32
232 $(INSTALL_DIR) mozart-win32/contrib
233 (cd $(MPD); \
234 $(TAR) cf - cache/$(HOMECACHE)/contrib) | \
235 (cd mozart-win32/contrib; $(TAR) xf -)
236 $(INSTALL_DIR) mozart-win32/doc
237 (cd $(MPD); \
238 $(TAR) cf - doc examples share/gump) | \
239 (cd mozart-win32/doc; $(TAR) xf -)
240 $(INSTALL_DIR) mozart-win32/base
241 (cd $(MPD); \
242 $(TAR) cf - $(FILES) bin cache/$(HOMECACHE)/share \
243 include share/Init.ozf share/elisp platform) | \
244 (cd mozart-win32/base; $(TAR) xf -)
1c1c4f8 Use a different stylesheet for the CHM documentation
kornstae authored
245 $(INSTALL_DIR) mozart-win32/doc/doc
246 $(INSTALL_FILE) $(SRCTOP)/doc/utilities/ozdoc-iexplorer.css \
247 mozart-win32/doc/doc/ozdoc.css
7808cdd Shit
schulte authored
248 rm -rf /tmp/pack/mozart
7501766 Remove the mozart-win32.zip archive before adding files to avoid upda…
kornstae authored
249 rm -f mozart-win32.zip
60b7e28 Have the license also as rich text
schulte authored
250 $(ZIP) -r mozart-win32.zip mozart-win32
4cf1bb3 Directly create zip for win32
schulte authored
251 rm -rf mozart-win32
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
252
8dbc044 Be more accurate which belongs to which package
schulte authored
253 files.base:
254 (cd $(PREFIX); \
255 find . \( -type f -or -type l \) -and \( \
c3b79ac -not --> !
schulte authored
256 ! -path './platform/*' -and \
4eeab0c Another last minute fix: exclude winbin for
schulte authored
257 ! -path './winbin/*' -and \
c3b79ac -not --> !
schulte authored
258 ! -path './contrib/*' -and \
259 ! -path './doc/*' -and \
260 ! -path './examples/*' -and \
261 ! -path './share/gump/examples/*' -and \
262 ! -path './share/doc/*' -and \
263 ! -path './bin/ozdoc' -and \
264 ! -path './bin/convertTextPickle' -and \
265 ! -name '*.so-*' \
8dbc044 Be more accurate which belongs to which package
schulte authored
266 \) ) > $@
267
268 files.base-%:
269 (cd $(PREFIX); \
270 find . \( -type f -or -type l \) -and \
271 \( -path './platform/$*/*' -or \
272 -path './share/*.so-$*' \) \
273 ) > $@
274
275 files.contrib:
276 (cd $(PREFIX); \
277 find . \( -type f -or -type l \) -and \( \
c3b79ac -not --> !
schulte authored
278 \( -path './contrib/*' -and ! -name '*.so-*' \) -or \
8dbc044 Be more accurate which belongs to which package
schulte authored
279 -path './bin/ozdoc' -or \
280 -path './bin/convertTextPickle' -or \
281 -path './share/doc/*' \
282 \) ) > $@
283
284 files.contrib-%:
285 (cd $(PREFIX); \
286 find . \( -type f -or -type l \) -and \
287 -path './contrib/*' -and \
288 -name '*.so-$*' \
289 ) > $@
290
291 files.doc:
292 (cd $(PREFIX); \
ad84848 Move GumpScanner.so and Bison.so into cache directory under windows,
kornstae authored
293 find . \( -type f -or -type l \) -and \( \
294 -path './doc/*' -or \
295 -path './share/gump/examples/*' -or \
296 -path './examples/*' \
297 \) -and -not -path './doc/Mozart.hh?' ) > $@
4eeab0c Another last minute fix: exclude winbin for
schulte authored
298
299
300
Something went wrong with that request. Please try again.