Skip to content
This repository
Newer
Older
100644 301 lines (262 sloc) 8.652 kb
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
1 #
2 # Authors:
3 # Michael Mehl (mehl@dfki.de)
4 #
5 # Contributors:
6 # Denys Duchier (duchier@ps.uni-sb.de)
a69d398f » schulte
1998-12-01 Packaging complete
7 # Christian Schulte <schulte@ps.uni-sb.de>
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
8 #
9 # Copyright:
a69d398f » schulte
1998-12-01 Packaging complete
10 # Michael Mehl, 1998
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
11 #
12 # Last change:
13 # $Date$ by $Author$
14 # $Revision$
15 #
16 # This file is part of Mozart, an implementation
17 # of Oz 3:
647ee41e » schulte
1999-01-21 mozart.ps.uni-sb.de --> www.mozart-oz.org
18 # http://www.mozart-oz.org
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
19 #
20 # See the file "LICENSE" or
647ee41e » schulte
1999-01-21 mozart.ps.uni-sb.de --> www.mozart-oz.org
21 # http://www.mozart-oz.org/LICENSE.html
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
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 ######################################################################
608fba90 » duchier
1998-04-12 changes to configure the whole tree
31
32 BUILDTOP= @BUILDTOP@
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
33 SRCTOP= @SRCTOP@
34 SRCDIR= @srcdir@
35 VPATH= @srcdir@
36 PREFIX= @prefix@
37
bf7e1c52 » schulte
1998-09-18 Have a single location for HOMEURL in aclocal.m4
38 HOMEURL= @HOMEURL@
39 HOMECACHE= @HOMECACHE@
40
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
41 BINDIR= $(PREFIX)/bin
51c7b893 » mehl
1998-06-29 updated lib->share
42 SHAREDIR= $(PREFIX)/share
43 TOOLSDIR= $(SHAREDIR)/tools
44 ELISPDIR= $(SHAREDIR)/elisp
45 IMAGESDIR= $(SHAREDIR)/images
bf7e1c52 » schulte
1998-09-18 Have a single location for HOMEURL in aclocal.m4
46 CACHEDIR= $(PREFIX)/$(HOMECACHE)
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
47 CACHETOOLS= $(CACHEDIR)/tools
48 CACHEBIN= $(CACHEDIR)/bin
51c7b893 » mehl
1998-06-29 updated lib->share
49 SHARECACHE= $(CACHEDIR)/share
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
50
51 ######################################################################
52 # programs
53 ######################################################################
c4b0b275 » mehl
1998-01-23 global configure
54
aceb872a » duchier
1998-09-10 set MAKE in top level file to the GNU make we found. this way, even if
55 MAKE= @MAKE@
c4b0b275 » mehl
1998-01-23 global configure
56 INSTALL= @INSTALL@
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
57 INSTALL_BIN= $(INSTALL) -m 555
58 INSTALL_FILE= $(INSTALL) -m 444
59 INSTALL_DIR= @INSTALL_DIR@
c4b0b275 » mehl
1998-01-23 global configure
60
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
61 ######################################################################
62 # other variables
63 ######################################################################
c4b0b275 » mehl
1998-01-23 global configure
64
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
65 OZVERSION= $(SRCTOP)/OZVERSION
1ccfcdd2 » schulte
1999-02-17 Support to build dates (thanks a lot to Denys) started
66 OZBUILD= @OZBUILDDATE@
a652d32a » schulte
1999-01-21 We have to have this
67 FILES= README LICENSE LICENSE.html
d376a056 » mehl
1998-02-17 only use PREFIX (no OZHOME)
68 ALLFILES= $(FILES:%=$(PREFIX)/%)
c4b0b275 » mehl
1998-01-23 global configure
69
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
70 # sub directories for recursive makes
f4482b22 » mehl
1998-07-27 -enable-subdirs
71 SUBDIRS= @oz_subdirs@
1fd0f6a0 » mehl
1998-03-11 demo are not in common
72
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
73 ######################################################################
74 # common targets
75 ######################################################################
c4b0b275 » mehl
1998-01-23 global configure
76
2c0bd2e0 » mehl
1998-07-20 3rd: target platform to generate only platform dependent stuff
77 .PHONY: all bootstrap install clean veryclean distclean check
c4b0b275 » mehl
1998-01-23 global configure
78
1f9ba3c5 » scheidhr
1999-03-08 make all does not point to make bootstrap anymore; nevertheless make …
79 bootstrap::
c4b0b275 » mehl
1998-01-23 global configure
80
1f9ba3c5 » scheidhr
1999-03-08 make all does not point to make bootstrap anymore; nevertheless make …
81 all bootstrap clean veryclean depend distclean check install::
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
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=
c4b0b275 » mehl
1998-01-23 global configure
95
608fba90 » duchier
1998-04-12 changes to configure the whole tree
96 distclean::
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
97 $(MAKE) veryclean SUBDIRS=
98 -rm -f Makefile config.cache config.log config.status
99
8eb3d1ba » schulte
1998-12-01 Packing targets started
100 install:: $(PREFIX)
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
101
8eb3d1ba » schulte
1998-12-01 Packing targets started
102 $(PREFIX):
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
103 $(INSTALL_DIR) $@
104
105 all:: Makefile
c4b0b275 » mehl
1998-01-23 global configure
106
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
107 Makefile: Makefile.in ./config.status
108 ./config.status
109
110 ./config.status: ./configure
111 ./config.status --recheck
112
608fba90 » duchier
1998-04-12 changes to configure the whole tree
113 install:: $(ALLFILES)
c4b0b275 » mehl
1998-01-23 global configure
114
62180378 » mehl
1998-07-07 install files works
115 $(ALLFILES): $(PREFIX)/% : % $(PREFIX)
116 $(INSTALL_FILE) $< $@
2d6b53ad » mehl
1998-04-22 first steps to cleanup Makefiles (see mozart/README.Makefiles)
117
8eb3d1ba » schulte
1998-12-01 Packing targets started
118 ######################################################################
119 # other targets
120 ######################################################################
121
6e4d8753 » schulte
1999-02-02 Use YYMMDD as date (Thanks to Lars)
122 PLATFORMS= solaris-sparc aix3-rs600 freebsd-i486 hpux-700 \
123 irix6-mips linux-i486 netbsd-i486 netbsd-m68k netbsd-sparc \
cd0d4638 » scheidhr
1999-03-02 more targets for Winodws
124 osf1-alpha solaris-i486 sunos-sparc
6e4d8753 » schulte
1999-02-02 Use YYMMDD as date (Thanks to Lars)
125 PLATFORMFILES= README LICENSE LICENSE.html \
126 bin cache contrib examples include share
8eb3d1ba » schulte
1998-12-01 Packing targets started
127 COMPRESS= gzip -9
128 TAR= tar
5ac90d48 » scheidhr
1998-12-04 Windows installation
129 WINCACHEDIR= oz3/cache/$(HOMECACHE)
44383cb7 » schulte
1998-12-01 Imporved packing
130 PACKDIR= /tmp/pack
cf3608c9 » schulte
1999-10-18 Windows packing: not yet finished
131 MPD= $(PACKDIR)/mozart
132 WIN32CACHEDIR= $(MPD)/cache/$(HOMECACHE)
c4b0b275 » mehl
1998-01-23 global configure
133
108cdf97 » schulte
1998-12-01 Imporved
134 .PHONY: src doc $(PLATFORMS)
c4b0b275 » mehl
1998-01-23 global configure
135
108cdf97 » schulte
1998-12-01 Imporved
136 src: $(PACKDIR)
8eb3d1ba » schulte
1998-12-01 Packing targets started
137 (cd $(PACKDIR); \
138 (cd $(SRCTOP)/..; \
139 $(TAR) -cf - mozart) | $(TAR) -xf - ; \
a69d398f » schulte
1998-12-01 Packaging complete
140 find mozart -name CVS -type d -exec rm -rf '{}' ';' 2>/dev/null ; \
141 find mozart -name '.cvsignore' -type f -exec rm -f '{}' ';' ; \
44383cb7 » schulte
1998-12-01 Imporved packing
142 $(TAR) -cf - mozart ) | \
1ccfcdd2 » schulte
1999-02-17 Support to build dates (thanks a lot to Denys) started
143 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-src.tar.gz
44383cb7 » schulte
1998-12-01 Imporved packing
144 rm -rf $(PACKDIR)/mozart
c4b0b275 » mehl
1998-01-23 global configure
145
8dbc0445 » schulte
1999-10-15 Be more accurate which belongs to which package
146 doc: $(PACKDIR) $(PACKDIR)/mozart
147 rm -f files.doc
148 $(MAKE) files.doc
149 rm -rf $(PACKDIR)/mozart
150 $(INSTALL_DIR) $(PACKDIR)/mozart
151 ( (cd $(PREFIX); \
152 $(TAR) -cf - -T $(BUILDTOP)/files.doc ) | \
153 (cd $(PACKDIR)/mozart; $(TAR) -xf - ) )
154 (cd $(PACKDIR); $(TAR) -cf - mozart ) | \
1ccfcdd2 » schulte
1999-02-17 Support to build dates (thanks a lot to Denys) started
155 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-doc.tar.gz
a69d398f » schulte
1998-12-01 Packaging complete
156 rm -rf $(PACKDIR)/mozart
8dbc0445 » schulte
1999-10-15 Be more accurate which belongs to which package
157 rm -f files.doc
a69d398f » schulte
1998-12-01 Packaging complete
158
159 $(PLATFORMS): $(PACKDIR) $(PACKDIR)/mozart
8dbc0445 » schulte
1999-10-15 Be more accurate which belongs to which package
160 rm -f files.base files.base-$@ files.contrib files.contrib-$@
161 $(MAKE) files.base files.base-$@ files.contrib files.contrib-$@
162 cat files.base files.base-$@ > files.base-all
163 cat files.contrib files.contrib-$@ > files.contrib-all
164 rm -rf $(PACKDIR)/mozart
165 $(INSTALL_DIR) $(PACKDIR)/mozart
166 ( (cd $(PREFIX); \
167 $(TAR) -cf - -T $(BUILDTOP)/files.base-all ) | \
168 (cd $(PACKDIR)/mozart; $(TAR) -xf - ) )
a69d398f » schulte
1998-12-01 Packaging complete
169 (cd $(PACKDIR); $(TAR) -cf - mozart ) | \
8dbc0445 » schulte
1999-10-15 Be more accurate which belongs to which package
170 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-$@.tar.gz
a69d398f » schulte
1998-12-01 Packaging complete
171 rm -rf $(PACKDIR)/mozart
8dbc0445 » schulte
1999-10-15 Be more accurate which belongs to which package
172 $(INSTALL_DIR) $(PACKDIR)/mozart
173 ( (cd $(PREFIX); \
174 $(TAR) -cf - -T $(BUILDTOP)/files.contrib-all ) | \
175 (cd $(PACKDIR)/mozart; $(TAR) -xf - ) )
176 (cd $(PACKDIR); $(TAR) -cf - mozart ) | \
177 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-$@-contrib.tar.gz
178 rm -rf $(PACKDIR)/mozart
179 rm -f files.base files.base-$@ files.contrib files.contrib-$@
180 rm -f files.base-all files.contrib-all
c4b0b275 » mehl
1998-01-23 global configure
181
cf3608c9 » schulte
1999-10-18 Windows packing: not yet finished
182 $(PACKDIR) $(PACKDIR)/mozart:
8eb3d1ba » schulte
1998-12-01 Packing targets started
183 $(INSTALL_DIR) $@
c4b0b275 » mehl
1998-01-23 global configure
184
cf3608c9 » schulte
1999-10-18 Windows packing: not yet finished
185 oz3:
b9b1d478 » scheidhr
1999-02-04 removed contribs that do not work on Windows
186 rm -rf oz3
5ac90d48 » scheidhr
1998-12-04 Windows installation
187 $(INSTALL_DIR) oz3
188 ( cd $(PREFIX); \
189 $(TAR) cf - \
f5d810f7 » scheidhr
1999-02-18 pack more things under windows
190 $(FILES) \
5ac90d48 » scheidhr
1998-12-04 Windows installation
191 include share \
281d5f44 » schulte
1999-09-22 Added examples for to windows build
192 contrib doc examples \
974d64c1 » scheidhr
1999-02-18 winstuff
193 winbin platform/win32-i486 \
5ac90d48 » scheidhr
1998-12-04 Windows installation
194 ) | (cd oz3; $(TAR) xf -)
51c7b893 » mehl
1998-06-29 updated lib->share
195 $(INSTALL_DIR) $(WINCACHEDIR)/share
61e1d077 » scheidhr
1998-12-01 fix cache dir problems on Windows
196 $(INSTALL_DIR) $(WINCACHEDIR)/doc/demo
a570b9ca » scheidhr
1999-02-04 pack contribs for Windows
197 find oz3 -name '*.so-*' -not -name '*.so-win32-i486' -exec rm -f '{}' ';'
5ac90d48 » scheidhr
1998-12-04 Windows installation
198 mv oz3/share/images oz3/share/?*.ozf $(WINCACHEDIR)/share
a570b9ca » scheidhr
1999-02-04 pack contribs for Windows
199 mv oz3/share/*.so-win32-i486 $(WINCACHEDIR)/share || true
c6e0795d » scheidhr
1998-12-04 windows installation
200 cp -r oz3/doc/demo/applets $(WINCACHEDIR)/doc/demo
b9b1d478 » scheidhr
1999-02-04 removed contribs that do not work on Windows
201 (cd oz3/contrib;\
974d64c1 » scheidhr
1999-02-18 winstuff
202 rm -rf text os/io.ozf os/process.ozf os/open.ozf;\
203 rm -rf LP.ozf Psql.ozf RI.ozf Reflect.ozf DaVinci.ozf)
a570b9ca » scheidhr
1999-02-04 pack contribs for Windows
204 mv oz3/contrib $(WINCACHEDIR)
00d7f482 » scheidhr
1998-12-04 windows installation
205 rm -rf oz3/share/doc oz3/platform/win32-i486/oztool.sh
5ac90d48 » scheidhr
1998-12-04 Windows installation
206 mv $(WINCACHEDIR)/share/Init.ozf oz3/share
79077677 » scheidhr
1998-11-17 Windows
207 for i in ozc ozd ozl; do \
974d64c1 » scheidhr
1999-02-18 winstuff
208 cat oz3/winbin/ozwrapper.exe \
209 $(PREFIX)/bin/$$i > oz3/winbin/$$i.exe;\
79077677 » scheidhr
1998-11-17 Windows
210 done
5ac90d48 » scheidhr
1998-12-04 Windows installation
211 i386-mingw32-strip oz3/platform/win32-i486/*.exe
974d64c1 » scheidhr
1999-02-18 winstuff
212 mv oz3/winbin oz3/bin
213
8dbc0445 » schulte
1999-10-15 Be more accurate which belongs to which package
214
cf3608c9 » schulte
1999-10-18 Windows packing: not yet finished
215 win32-i486: $(PACKDIR) $(PACKDIR)/mozart
216 ( cd $(PREFIX); \
217 $(TAR) cf - \
218 $(FILES) \
219 include share \
220 contrib doc examples \
221 winbin platform/win32-i486 \
222 ) | (cd $(MPD); $(TAR) xf -)
223 $(INSTALL_DIR) $(WIN32CACHEDIR)/share
224 find $(MPD) -name '*.so-*' -not -name '*.so-win32-i486' \
225 -exec rm -f '{}' ';'
226 mv $(MPD)/share/images $(WIN32CACHEDIR)/share
227 mv $(MPD)/share/?*.ozf $(WIN32CACHEDIR)/share
228 mv $(MPD)/share/*.so-win32-i486 $(WIN32CACHEDIR)/share || true
229 (cd $(MPD)/contrib;\
230 rm -rf text os/io.ozf os/process.ozf os/open.ozf;\
231 rm -rf LP.ozf Psql.ozf RI.ozf Reflect.ozf DaVinci.ozf)
232 mv $(MPD)/contrib $(WIN32CACHEDIR)
233 rm -rf $(MPD)/share/doc \
234 $(MPD)/platform/win32-i486/oztool.sh
235 mv $(WIN32CACHEDIR)/share/Init.ozf $(MPD)/share
236 for i in ozc ozd ozl; do \
237 cat $(MPD)/winbin/ozwrapper.exe \
238 $(PREFIX)/bin/$$i > $(MPD)/winbin/$$i.exe;\
239 done
240 mv $(MPD)/winbin $(MPD)/bin
241 chmod -R a+x $(MPD)/bin
a6381656 » schulte
1999-10-18 Okay! target win32-i486 creates three subdirs
242 rm -rf mozart-win32
243 $(INSTALL_DIR) mozart-win32
244 $(INSTALL_DIR) mozart-win32/contrib
245 (cd $(MPD); \
246 $(TAR) cf - cache/$(HOMECACHE)/contrib) | \
247 (cd mozart-win32/contrib; $(TAR) xf -)
248 $(INSTALL_DIR) mozart-win32/doc
249 (cd $(MPD); \
250 $(TAR) cf - doc examples share/gump) | \
251 (cd mozart-win32/doc; $(TAR) xf -)
252 $(INSTALL_DIR) mozart-win32/base
253 (cd $(MPD); \
254 $(TAR) cf - $(FILES) bin cache/$(HOMECACHE)/share \
255 include share/Init.ozf share/elisp platform) | \
256 (cd mozart-win32/base; $(TAR) xf -)
cf3608c9 » schulte
1999-10-18 Windows packing: not yet finished
257
8dbc0445 » schulte
1999-10-15 Be more accurate which belongs to which package
258 files.base:
259 (cd $(PREFIX); \
260 find . \( -type f -or -type l \) -and \( \
261 -not -path './platform/*' -and \
262 -not -path './contrib/*' -and \
263 -not -path './doc/*' -and \
264 -not -path './examples/*' -and \
265 -not -path './share/gump/examples/*' -and \
266 -not -path './share/doc/*' -and \
267 -not -path './bin/ozdoc' -and \
268 -not -path './bin/convertTextPickle' -and \
269 -not -name '*.so-*' \
270 \) ) > $@
271
272 files.base-%:
273 (cd $(PREFIX); \
274 find . \( -type f -or -type l \) -and \
275 \( -path './platform/$*/*' -or \
276 -path './share/*.so-$*' \) \
277 ) > $@
278
279 files.contrib:
280 (cd $(PREFIX); \
281 find . \( -type f -or -type l \) -and \( \
282 \( -path './contrib/*' -and -not -name '*.so-*' \) -or \
283 -path './bin/ozdoc' -or \
284 -path './bin/convertTextPickle' -or \
285 -path './share/doc/*' \
286 \) ) > $@
287
288 files.contrib-%:
289 (cd $(PREFIX); \
290 find . \( -type f -or -type l \) -and \
291 -path './contrib/*' -and \
292 -name '*.so-$*' \
293 ) > $@
294
295 files.doc:
296 (cd $(PREFIX); \
297 find . \( -type f -or -type l \) -and \( \
298 -path './doc/*' -or \
299 -path './share/gump/examples/*' -or \
300 -path './examples/*' \
301 \) ) > $@
302
Something went wrong with that request. Please try again.