Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 303 lines (262 sloc) 8.652 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@
a652d32 We have to have this
schulte authored
67 FILES= README LICENSE LICENSE.html
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 boo...
scheidhr authored
79 bootstrap::
c4b0b27 global configure
mehl authored
80
1f9ba3c make all does not point to make bootstrap anymore; nevertheless make boo...
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 \
cd0d463 more targets for Winodws
scheidhr authored
124 osf1-alpha solaris-i486 sunos-sparc
6e4d875 Use YYMMDD as date (Thanks to Lars)
schulte authored
125 PLATFORMFILES= README LICENSE LICENSE.html \
126 bin cache contrib examples include share
8eb3d1b Packing targets started
schulte authored
127 COMPRESS= gzip -9
128 TAR= tar
5ac90d4 Windows installation
scheidhr authored
129 WINCACHEDIR= oz3/cache/$(HOMECACHE)
44383cb Imporved packing
schulte authored
130 PACKDIR= /tmp/pack
cf3608c Windows packing: not yet finished
schulte authored
131 MPD= $(PACKDIR)/mozart
132 WIN32CACHEDIR= $(MPD)/cache/$(HOMECACHE)
c4b0b27 global configure
mehl authored
133
108cdf9 Imporved
schulte authored
134 .PHONY: src doc $(PLATFORMS)
c4b0b27 global configure
mehl authored
135
108cdf9 Imporved
schulte authored
136 src: $(PACKDIR)
8eb3d1b Packing targets started
schulte authored
137 (cd $(PACKDIR); \
138 (cd $(SRCTOP)/..; \
139 $(TAR) -cf - mozart) | $(TAR) -xf - ; \
a69d398 Packaging complete
schulte authored
140 find mozart -name CVS -type d -exec rm -rf '{}' ';' 2>/dev/null ; \
141 find mozart -name '.cvsignore' -type f -exec rm -f '{}' ';' ; \
44383cb Imporved packing
schulte authored
142 $(TAR) -cf - mozart ) | \
1ccfcdd Support to build dates (thanks a lot to Denys) started
schulte authored
143 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-src.tar.gz
44383cb Imporved packing
schulte authored
144 rm -rf $(PACKDIR)/mozart
c4b0b27 global configure
mehl authored
145
8dbc044 Be more accurate which belongs to which package
schulte authored
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 ) | \
1ccfcdd Support to build dates (thanks a lot to Denys) started
schulte authored
155 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-doc.tar.gz
a69d398 Packaging complete
schulte authored
156 rm -rf $(PACKDIR)/mozart
8dbc044 Be more accurate which belongs to which package
schulte authored
157 rm -f files.doc
a69d398 Packaging complete
schulte authored
158
159 $(PLATFORMS): $(PACKDIR) $(PACKDIR)/mozart
8dbc044 Be more accurate which belongs to which package
schulte authored
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 - ) )
a69d398 Packaging complete
schulte authored
169 (cd $(PACKDIR); $(TAR) -cf - mozart ) | \
8dbc044 Be more accurate which belongs to which package
schulte authored
170 $(COMPRESS) > mozart-`$(OZVERSION)`.$(OZBUILD)-$@.tar.gz
a69d398 Packaging complete
schulte authored
171 rm -rf $(PACKDIR)/mozart
8dbc044 Be more accurate which belongs to which package
schulte authored
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
c4b0b27 global configure
mehl authored
181
cf3608c Windows packing: not yet finished
schulte authored
182 $(PACKDIR) $(PACKDIR)/mozart:
8eb3d1b Packing targets started
schulte authored
183 $(INSTALL_DIR) $@
c4b0b27 global configure
mehl authored
184
cf3608c Windows packing: not yet finished
schulte authored
185 oz3:
b9b1d47 removed contribs that do not work on Windows
scheidhr authored
186 rm -rf oz3
5ac90d4 Windows installation
scheidhr authored
187 $(INSTALL_DIR) oz3
188 ( cd $(PREFIX); \
189 $(TAR) cf - \
f5d810f pack more things under windows
scheidhr authored
190 $(FILES) \
5ac90d4 Windows installation
scheidhr authored
191 include share \
281d5f4 Added examples for to windows build
schulte authored
192 contrib doc examples \
974d64c winstuff
scheidhr authored
193 winbin platform/win32-i486 \
5ac90d4 Windows installation
scheidhr authored
194 ) | (cd oz3; $(TAR) xf -)
51c7b89 updated lib->share
mehl authored
195 $(INSTALL_DIR) $(WINCACHEDIR)/share
61e1d07 fix cache dir problems on Windows
scheidhr authored
196 $(INSTALL_DIR) $(WINCACHEDIR)/doc/demo
a570b9c pack contribs for Windows
scheidhr authored
197 find oz3 -name '*.so-*' -not -name '*.so-win32-i486' -exec rm -f '{}' ';'
5ac90d4 Windows installation
scheidhr authored
198 mv oz3/share/images oz3/share/?*.ozf $(WINCACHEDIR)/share
a570b9c pack contribs for Windows
scheidhr authored
199 mv oz3/share/*.so-win32-i486 $(WINCACHEDIR)/share || true
c6e0795 windows installation
scheidhr authored
200 cp -r oz3/doc/demo/applets $(WINCACHEDIR)/doc/demo
b9b1d47 removed contribs that do not work on Windows
scheidhr authored
201 (cd oz3/contrib;\
974d64c winstuff
scheidhr authored
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)
a570b9c pack contribs for Windows
scheidhr authored
204 mv oz3/contrib $(WINCACHEDIR)
00d7f48 windows installation
scheidhr authored
205 rm -rf oz3/share/doc oz3/platform/win32-i486/oztool.sh
5ac90d4 Windows installation
scheidhr authored
206 mv $(WINCACHEDIR)/share/Init.ozf oz3/share
7907767 Windows
scheidhr authored
207 for i in ozc ozd ozl; do \
974d64c winstuff
scheidhr authored
208 cat oz3/winbin/ozwrapper.exe \
209 $(PREFIX)/bin/$$i > oz3/winbin/$$i.exe;\
7907767 Windows
scheidhr authored
210 done
5ac90d4 Windows installation
scheidhr authored
211 i386-mingw32-strip oz3/platform/win32-i486/*.exe
974d64c winstuff
scheidhr authored
212 mv oz3/winbin oz3/bin
213
8dbc044 Be more accurate which belongs to which package
schulte authored
214
cf3608c Windows packing: not yet finished
schulte authored
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
a638165 Okay! target win32-i486 creates three subdirs
schulte authored
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 -)
cf3608c Windows packing: not yet finished
schulte authored
257
8dbc044 Be more accurate which belongs to which package
schulte authored
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.