Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 345 lines (293 sloc) 13.251 kb
6c76fdf [project @ 1998-08-27 09:14:38 by simonm]
simonm authored
1 ############################################################################
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
2 #
3 # fptools/Makefile
4 #
5 # This is the main Makefile for fptools.
6 #
6c76fdf [project @ 1998-08-27 09:14:38 by simonm]
simonm authored
7 ############################################################################
02b6015 [project @ 1996-11-21 16:45:53 by simonm]
simonm authored
8
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
9 TOP=.
10 include $(TOP)/mk/boilerplate.mk
02b6015 [project @ 1996-11-21 16:45:53 by simonm]
simonm authored
11
e8efbfa [project @ 2001-01-17 10:08:10 by simonmar]
simonmar authored
12 # find the projects that actually exist...
a0813f9 [project @ 2001-04-03 15:38:51 by simonmar]
simonmar authored
13 ProjectsThatExist = $(filter $(patsubst %/, %, $(wildcard */)), $(AllProjects))
e8efbfa [project @ 2001-01-17 10:08:10 by simonmar]
simonmar authored
14
15 # and filter only those that the user requested, if necessary
16 ifeq "$(ProjectsToBuild)" ""
a0813f9 [project @ 2001-04-03 15:38:51 by simonmar]
simonmar authored
17 SUBDIRS = $(ProjectsThatExist)
e8efbfa [project @ 2001-01-17 10:08:10 by simonmar]
simonmar authored
18 else
a0813f9 [project @ 2001-04-03 15:38:51 by simonmar]
simonmar authored
19 SUBDIRS = $(filter $(ProjectsToBuild), $(ProjectsThatExist))
e8efbfa [project @ 2001-01-17 10:08:10 by simonmar]
simonmar authored
20 endif
f7f5384 [project @ 1998-08-14 13:20:56 by sof]
sof authored
21
6c76fdf [project @ 1998-08-27 09:14:38 by simonm]
simonm authored
22 ifneq "$(Project)" ""
6c734cd [project @ 1998-08-20 15:42:01 by sof]
sof authored
23 include $(shell echo $(Project) | tr A-Z a-z)/mk/config.mk
24 endif
02b6015 [project @ 1996-11-21 16:45:53 by simonm]
simonm authored
25
5002727 [project @ 2001-03-23 16:36:20 by simonmar]
simonmar authored
26 # -----------------------------------------------------------------------------
27 # Certain targets require that Project is set from the command line.
28
29 CURRENT_TARGET = $(MAKECMDGOALS)
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
30 project-check :
31 @if [ "$(Project)" = "" ]; then \
32 echo " You need to set \"Project\" in order to make $(CURRENT_TARGET)"; \
33 echo " eg. make $(CURRENT_TARGET) Project=Ghc"; \
34 exit 1; \
35 fi
02b6015 [project @ 1996-11-21 16:45:53 by simonm]
simonm authored
36
67fe852 [project @ 1999-10-05 10:30:26 by simonmar]
simonmar authored
37 # -----------------------------------------------------------------------------
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
38 # Making a binary distribution
39 #
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
40 # To make a particular binary distribution:
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
41 # set $(Project) to the name of the project, capitalised (eg. Ghc or Happy).
42
43 # `dist' `binary-dist'
44 # Create a distribution tar file for this program. The tar file
45 # should be set up so that the file names in the tar file start with
46 # a subdirectory name which is the name of the package it is a
47 # distribution for. This name can include the version number.
48 #
49 # For example, the distribution tar file of GCC version 1.40 unpacks
50 # into a subdirectory named `gcc-1.40'.
51 #
52 # The easiest way to do this is to create a subdirectory
53 # appropriately named, use ln or cp to install the proper files in
54 # it, and then tar that subdirectory.
55 #
56 # The dist target should explicitly depend on all non-source files
57 # that are in the distribution, to make sure they are up to date in
58 # the distribution. See Making Releases.
59 #
60 # binary-dist is an FPtools addition for binary distributions
61 #
62
63 binary-dist :: project-check
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
64
67fe852 [project @ 1999-10-05 10:30:26 by simonmar]
simonmar authored
65 BIN_DIST_TMPDIR=$(FPTOOLS_TOP_ABS)
66 BIN_DIST_NAME=$(ProjectNameShort)-$(ProjectVersion)
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
67
68 #
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
69 # list of toplevel directories to include in binary distrib.
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
70 #
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
71 BIN_DIST_MAIN_DIR=$($(Project)MainDir)
72 BIN_DIST_DIRS=$($(Project)BinDistDirs)
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
73
74 binary-dist:: binary-dist-pre
75
76 BIN_DIST_TOP= distrib/Makefile-bin.in \
77 distrib/configure-bin.in \
78 distrib/INSTALL \
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
79 $(BIN_DIST_MAIN_DIR)/ANNOUNCE \
347936f [project @ 1999-10-05 11:36:27 by simonmar]
simonmar authored
80 $(BIN_DIST_MAIN_DIR)/VERSION \
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
81 $(BIN_DIST_MAIN_DIR)/RELEASE \
c1c03f0 [project @ 1999-06-24 14:10:18 by simonmar]
simonmar authored
82 $(BIN_DIST_MAIN_DIR)/LICENSE \
78d385b [project @ 2000-07-13 15:45:55 by simonmar]
simonmar authored
83 $(BIN_DIST_MAIN_DIR)/README \
ee7250f [project @ 1997-03-24 06:51:48 by sof]
sof authored
84 glafp-utils/mkdirhier/mkdirhier \
85 install-sh \
86 config.guess \
fdc02fd [project @ 1997-10-09 10:48:00 by sof]
sof authored
87 config.sub \
88 aclocal.m4
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
89
67fe852 [project @ 1999-10-05 10:30:26 by simonmar]
simonmar authored
90 #
91 # binary-dist creates a binary bundle, set BIN_DIST_NAME
92 # to package name and do `make binary-dist Project=<project-name>'
93 # (normally this just a thing you would do from the toplevel of fptools)
94 #
95 .PHONY: binary-dist-pre binary-dist binary-pack
96
97 BIN_DIST_NAME=$(ProjectNameShort)-$(ProjectVersion)
98 BIN_DIST_TMPDIR=$(FPTOOLS_TOP_ABS)
99
100 binary-dist-pre::
101 -rm -rf $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)
102 -rm -f $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME).tar.gz
103 @for i in $(BIN_DIST_DIRS); do \
104 if test -d "$$i"; then \
105 echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM); \
106 $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM); \
107 echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM); \
108 $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM); \
109 echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
110 $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
111 echo $(MAKE) -C $$i $(MFLAGS) install \
112 prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
113 exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
114 bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
115 libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
116 libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
117 datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
118 $(MAKE) -C $$i $(MFLAGS) install \
119 prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
120 exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
121 bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
122 libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
123 libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
124 datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
125 fi; \
126 done
127
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
128 binary-dist::
129 @for i in $(BIN_DIST_TOP); do \
7a3b6ac [project @ 1997-12-22 15:10:58 by simonm]
simonm authored
130 if test -f "$$i"; then \
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
131 echo cp $$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME); \
132 cp $$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME); \
133 fi; \
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
134 done;
cd09a67 [project @ 2001-03-29 10:47:25 by simonmar]
simonmar authored
135 @echo "Configuring the Makefile for this project..."
136 touch $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
137 echo "package = $(ProjectNameShort)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
138 echo "version = $(ProjectVersion)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
139 echo "PACKAGE_SH_SCRIPTS = $($(Project)BinDistShScripts)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
140 echo "PACKAGE_PRL_SCRIPTS = $($(Project)BinDistPrlScripts)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
141 echo "PACKAGE_LIB_PRL_SCRIPTS = $($(Project)BinDistLibPrlScripts)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
142 echo "PACKAGE_BINS = $($(Project)BinDistBins)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
143 echo "PACKAGE_LINKS = $($(Project)BinDistLinks)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
144 cat $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile-bin.in >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
145 @echo "Generating a shippable configure script.."
146 $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/configure-bin.in $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/configure.in
147 ( cd $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME); autoconf )
0147f8c [project @ 2001-04-03 15:08:35 by sewardj]
sewardj authored
148 if test -x $(BIN_DIST_MAIN_DIR)/mk/post-install-script ; then \
149 cp $(BIN_DIST_MAIN_DIR)/mk/post-install-script \
150 $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) ; \
151 fi
152 if test -x $(BIN_DIST_MAIN_DIR)/mk/post-inplace-script ; then \
153 cp $(BIN_DIST_MAIN_DIR)/mk/post-inplace-script \
154 $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) ; \
155 fi
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
156 #
12b44c4 [project @ 1997-09-24 11:50:37 by simonm]
simonm authored
157 # binary dist'ing the documentation.
158 # Which documentation to build/install is hardcoded below.
ee7250f [project @ 1997-03-24 06:51:48 by sof]
sof authored
159 #
12b44c4 [project @ 1997-09-24 11:50:37 by simonm]
simonm authored
160
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
161 BINDIST_DOCS = $($(Project)BinDistDocs)
019d224 [project @ 1999-10-26 08:30:31 by simonmar]
simonmar authored
162 BINDIST_DOCS_WAYS = html ps
12b44c4 [project @ 1997-09-24 11:50:37 by simonm]
simonm authored
163
b48c10e [project @ 2001-04-19 15:58:56 by sewardj]
sewardj authored
164 ifeq "$(HOSTPLATFORM)" "i386-unknown-linux"
12b44c4 [project @ 1997-09-24 11:50:37 by simonm]
simonm authored
165 binary-dist ::
166 @for way in $(BINDIST_DOCS_WAYS); do \
019d224 [project @ 1999-10-26 08:30:31 by simonmar]
simonmar authored
167 $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way; \
12b44c4 [project @ 1997-09-24 11:50:37 by simonm]
simonm authored
168 for dir in $(BINDIST_DOCS); do \
6023ec6 [project @ 1997-10-13 10:32:58 by simonm]
simonm authored
169 echo Making $$way documentation in $$dir && \
40ba948 [project @ 2000-01-20 15:42:56 by simonmar]
simonmar authored
170 $(MAKE) -C $$dir --no-print-directory $(MFLAGS) $$way >.doclog 2>&1 && \
171 if [ "$$way" = "html" ]; then \
a61dd34 [project @ 2000-08-25 15:21:57 by simonmar]
simonmar authored
172 for subdir in `perl -n -e '/output will be in ([_\-A-Za-z0-9]*)/ && do { print "$$1 "; };' <.doclog`; do \
40ba948 [project @ 2000-01-20 15:42:56 by simonmar]
simonmar authored
173 echo Copying HTML docs from $$subdir...; \
174 cp -Rf $$dir/$$subdir $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way; \
175 done \
176 else \
177 cp -f $$dir/*.$$way $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/$$way; \
178 fi && \
12b44c4 [project @ 1997-09-24 11:50:37 by simonm]
simonm authored
179 echo "Done."; \
180 done; \
181 done
40ba948 [project @ 2000-01-20 15:42:56 by simonmar]
simonmar authored
182 @rm -f .doclog
b48c10e [project @ 2001-04-19 15:58:56 by sewardj]
sewardj authored
183 endif
ee7250f [project @ 1997-03-24 06:51:48 by sof]
sof authored
184
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
185 # Rename scripts to $i.prl and $i.sh where necessary.
186 # ToDo: do this in a cleaner way...
ee7250f [project @ 1997-03-24 06:51:48 by sof]
sof authored
187
d675cc5 [project @ 1998-01-07 12:32:08 by simonm]
simonm authored
188 ifneq "$($(Project)BinDistPrlScripts)" ""
ee7250f [project @ 1997-03-24 06:51:48 by sof]
sof authored
189 binary-dist::
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
190 @for i in $($(Project)BinDistPrlScripts); do \
ee7250f [project @ 1997-03-24 06:51:48 by sof]
sof authored
191 echo "Renaming $$i to $$i.prl"; \
67fe852 [project @ 1999-10-05 10:30:26 by simonmar]
simonmar authored
192 $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i.prl; \
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
193 done
d675cc5 [project @ 1998-01-07 12:32:08 by simonm]
simonm authored
194 endif
195
196 ifneq "$($(Project)BinDistLibPrlScripts)" ""
197 binary-dist::
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
198 @for i in $($(Project)BinDistLibPrlScripts); do \
199 echo "Renaming $$i to $$i.prl"; \
67fe852 [project @ 1999-10-05 10:30:26 by simonmar]
simonmar authored
200 $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$$i.prl; \
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
201 done
d675cc5 [project @ 1998-01-07 12:32:08 by simonm]
simonm authored
202 endif
203
204 ifneq "$($(Project)BinDistShScripts)" ""
205 binary-dist::
f5f6465 [project @ 1997-12-16 12:16:11 by simonm]
simonm authored
206 @for i in $($(Project)BinDistShScripts); do \
6458c0b [project @ 1997-12-16 11:53:12 by simonm]
simonm authored
207 echo "Renaming $$i to $$i.sh"; \
67fe852 [project @ 1999-10-05 10:30:26 by simonmar]
simonmar authored
208 $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i.sh; \
ee7250f [project @ 1997-03-24 06:51:48 by sof]
sof authored
209 done
d675cc5 [project @ 1998-01-07 12:32:08 by simonm]
simonm authored
210 endif
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
211
67fe852 [project @ 1999-10-05 10:30:26 by simonmar]
simonmar authored
212 #
213 # Do this separately for now
214 #
215 binary-pack::
216 ( cd $(BIN_DIST_TMPDIR); $(TAR) chzf $(BIN_DIST_NAME).tar.gz $(BIN_DIST_NAME) )
217
218 ifneq "$(way)" ""
219 package-way-dist::
220 ( cd $(BIN_DIST_TMPDIR); find $(BIN_DIST_NAME)/ \( -name "*$(_way).a" -o -name "*.$(way_)hi" \) -print | xargs tar cvf $(BIN_DIST_TMPDIR)/ghc-$(ProjectVersion)-$(way)-$(TARGETPLATFORM).tar )
221 gzip $(BIN_DIST_TMPDIR)/ghc-$(ProjectVersion)-$(way)-$(TARGETPLATFORM).tar
222 endif
223
224 ifneq "$(way)" ""
225 remove-way-dist::
226 ( cd $(BIN_DIST_TMPDIR); find $(BIN_DIST_NAME)/ \( -name "*$(_way).a" -o -name "*.$(way_)hi" \) -print -exec rm -f {} \; )
227 endif
228
229 binary-dist::
230 @echo "Mechanical and super-natty! Inspect the result and *if* happy; freeze, sell and get some sleep!"
231
232 # -----------------------------------------------------------------------------
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
233 # Building source distributions
234 #
235 # Do it like this:
236 #
f8b78fd [project @ 2001-01-17 10:14:40 by simonmar]
simonmar authored
237 # $ make
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
238 # $ make dist Project=Ghc
f8b78fd [project @ 2001-01-17 10:14:40 by simonmar]
simonmar authored
239 #
240 # WARNING: `make dist' calls `make distclean' before tarring up the tree.
241 #
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
242
243 .PHONY: dist
244
245 #
246 # Directory in which we're going to build the src dist
247 #
248 SRC_DIST_DIR=$(shell pwd)/$(SRC_DIST_NAME)
249
250 #
251 # Files to include in source distributions
252 #
a0813f9 [project @ 2001-04-03 15:38:51 by simonmar]
simonmar authored
253 SRC_DIST_DIRS += docs distrib $(SUBDIRS)
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
254 SRC_DIST_FILES += \
255 configure.in config.guess config.sub configure \
c481ebb [project @ 2001-04-30 10:08:14 by simonmar]
simonmar authored
256 aclocal.m4 acconfig.h README Makefile Makefile.config install-sh \
aac51d0 [project @ 2001-04-04 14:25:49 by sewardj]
sewardj authored
257 mk/bootstrap.mk \
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
258 mk/boilerplate.mk mk/config.h.in mk/config.mk.in mk/opts.mk \
259 mk/paths.mk mk/suffix.mk mk/target.mk
260
261 dist dist-manifest dist-package :: project-check
262
263 # clean the tree first, leaving certain extra files in place (eg. configure)
264 dist :: distclean
265
266 dist ::
267 -rm -rf $(SRC_DIST_DIR)
268 -rm -f $(SRC_DIST_NAME).tar.gz
269 mkdir $(SRC_DIST_DIR)
270 mkdir $(SRC_DIST_DIR)/mk
07cd658 [project @ 2001-09-25 10:39:21 by simonmar]
simonmar authored
271 ( cd $(FPTOOLS_TOP_ABS); $(FIND) $(SRC_DIST_DIRS) -type d \( -name CVS -prune -o -name SRC -prune -o -print \) | sed -e 's!.*!mkdir "$(SRC_DIST_DIR)/&"!' | sh )
272 ( cd $(FPTOOLS_TOP_ABS); $(FIND) $(SRC_DIST_DIRS) $(SRC_DIST_FILES) -name CVS -prune -o -name SRC -prune -o -name tests -prune -o -name "*~" -prune -o -name ".cvsignore" -prune -o -name "\#*" -prune -o -name ".\#*" -prune -o -name "log" -prune -o -name "*-SAVE" -prune -o -name "*.orig" -prune -o -name "*.rej" -prune -o ! -type d -print | sed -e 's!.*!$(LN_S) "$(FPTOOLS_TOP_ABS)/&" "$(SRC_DIST_DIR)/&"!' | sh )
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
273
274 # Automatic generation of a MANIFEST file for a source distribution
275 # tree that is ready to go.
276 dist-manifest ::
55daa69 [project @ 2001-03-14 10:14:13 by rrt]
rrt authored
277 cd $(SRC_DIST_DIR); $(FIND) . \( -type l -o -type f \) -exec ls -lLG {} \; | sed -e 's/\.\///' > MANIFEST.tmp ; mv MANIFEST.tmp MANIFEST
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
278
279 dist-package :: dist-package-tar-gz
280
281 SRC_DIST_PATHS = $(patsubst %, $(SRC_DIST_NAME)/%, $(SRC_DIST_FILES) $(SRC_DIST_DIRS))
282
283 dist-package-tar-gz ::
284 $(TAR) chzf $(SRC_DIST_NAME)-src.tar.gz $(SRC_DIST_NAME)
285
286 dist-package-zip ::
287 cd ..; $(LN_S) $(FPTOOLS_TOP_ABS) $(SRC_DIST_NAME) && \
288 $(ZIP) $(ZIP_OPTS) -r $(SRC_DIST_NAME)-src.zip $(SRC_DIST_PATHS)
289
290 # -----------------------------------------------------------------------------
c532ff6 [project @ 2001-05-22 10:34:07 by simonmar]
simonmar authored
291 # HC file bundles
292
293 hc-file-bundle : project-check
a9aad3a [project @ 2001-08-27 13:11:44 by simonmar]
simonmar authored
294 $(RM) -r $(ProjectNameShort)-$(ProjectVersion)
c532ff6 [project @ 2001-05-22 10:34:07 by simonmar]
simonmar authored
295 $(LN_S) . $(ProjectNameShort)-$(ProjectVersion)
296 find $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler \
297 $(ProjectNameShort)-$(ProjectVersion)/ghc/driver \
16ad3bc [project @ 2001-07-02 12:00:44 by simonmar]
simonmar authored
298 $(ProjectNameShort)-$(ProjectVersion)/ghc/lib \
299 $(ProjectNameShort)-$(ProjectVersion)/hslibs \
c532ff6 [project @ 2001-05-22 10:34:07 by simonmar]
simonmar authored
300 -name "*.hc" -o -name "*_hsc.[ch]" -o -name "*_stub.[ch]" > hc-files-to-go
16ad3bc [project @ 2001-07-02 12:00:44 by simonmar]
simonmar authored
301 find $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler \
302 $(ProjectNameShort)-$(ProjectVersion)/ghc/driver \
303 $(ProjectNameShort)-$(ProjectVersion)/ghc/lib \
304 $(ProjectNameShort)-$(ProjectVersion)/hslibs \
a9aad3a [project @ 2001-08-27 13:11:44 by simonmar]
simonmar authored
305 -name "*.hsc" | sed 's/hsc$$/hs/g' >> hc-files-to-go
21cbb72 [project @ 2001-05-22 11:03:47 by simonmar]
simonmar authored
306 tar czf $(ProjectNameShort)-$(ProjectVersion)-$(TARGETPLATFORM)-hc.tar.gz `cat hc-files-to-go`
307
308 CLEAN_FILES += hc-files-to-go *-hc.tar.gz
c532ff6 [project @ 2001-05-22 10:34:07 by simonmar]
simonmar authored
309
310 # -----------------------------------------------------------------------------
769e8c2 [project @ 2000-11-06 13:13:17 by simonmar]
simonmar authored
311
312 DIST_CLEAN_FILES += config.cache config.status
313
93bb2e2 [project @ 2001-01-16 17:47:10 by simonmar]
simonmar authored
314 all ::
315 @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
a0813f9 [project @ 2001-04-03 15:38:51 by simonmar]
simonmar authored
316 for i in $(SUBDIRS); do \
93bb2e2 [project @ 2001-01-16 17:47:10 by simonmar]
simonmar authored
317 if [ -d $$i ]; then \
318 $(MAKE) -C $$i boot all; \
319 if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ; then true; else exit 1; fi; \
320 fi; \
321 done
322
323 boot ::
324 @echo "Please use \`make all' only from the top-level, or \`make boot' followed"
325 @echo "by \`make all' in an individual project subdirectory (ghc, hslibs etc.)."
326
327 install ::
328 @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
a0813f9 [project @ 2001-04-03 15:38:51 by simonmar]
simonmar authored
329 for i in $(filter-out $(ProjectsDontInstall), $(SUBDIRS)); do \
93bb2e2 [project @ 2001-01-16 17:47:10 by simonmar]
simonmar authored
330 if [ -d $$i ]; then \
e8efbfa [project @ 2001-01-17 10:08:10 by simonmar]
simonmar authored
331 $(MAKE) -C $$i install; \
93bb2e2 [project @ 2001-01-16 17:47:10 by simonmar]
simonmar authored
332 if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ; then true; else exit 1; fi; \
333 fi; \
334 done
335
53ededd [project @ 2001-09-28 23:36:50 by sof]
sof authored
336 # Turn off target.mk's rules for 'all', 'boot' and 'install'.
337 NO_BOOT_TARGET=YES
338 NO_ALL_TARGET=YES
339 NO_INSTALL_TARGET=YES
340
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
341 include $(TOP)/mk/target.mk
342
93bb2e2 [project @ 2001-01-16 17:47:10 by simonmar]
simonmar authored
343 # -----------------------------------------------------------------------------
344
Something went wrong with that request. Please try again.