[project @ 2004-09-21 17:39:08 by panne]
[ghc-hetmet.git] / Makefile
1 ############################################################################
2 #
3 #                       fptools/Makefile
4 #
5 #               This is the main Makefile for fptools.
6 #
7 ############################################################################
8
9 TOP=.
10 include $(TOP)/mk/boilerplate.mk
11
12 # find the projects that actually exist...
13 ProjectsThatExist = $(filter $(patsubst %/, %, $(wildcard */)), $(AllProjects))
14
15 # and filter only those that the user requested, if necessary
16 ifeq "$(ProjectsToBuild)" ""
17 SUBDIRS = $(ProjectsThatExist)
18 else
19 SUBDIRS = $(filter $(ProjectsToBuild), $(ProjectsThatExist))
20 endif
21
22 ifneq "$(Project)" ""
23    ifeq "$(Project)" "GreenCard"
24        ProjectDirectory=greencard
25    else
26         ifeq "$(Project)" "HaskellDirect"
27                 ProjectDirectory=hdirect
28         else
29                 ProjectDirectory=$(Project)
30         endif
31    endif
32    include $(shell echo $(ProjectDirectory) | tr A-Z a-z)/mk/config.mk
33 endif
34
35 # -----------------------------------------------------------------------------
36 # Certain targets require that Project is set from the command line.
37
38 CURRENT_TARGET = $(MAKECMDGOALS)
39 project-check :
40         @if [ "$(Project)" = "" ]; then \
41                 echo "  You need to set \"Project\" in order to make $(CURRENT_TARGET)"; \
42                 echo "  eg. make $(CURRENT_TARGET) Project=Ghc"; \
43                 exit 1; \
44         fi
45
46 # -----------------------------------------------------------------------------
47 # Targets: all, stage1, stage2, stage3
48
49 DIST_CLEAN_FILES += config.cache config.status
50
51 extraclean::
52         $(RM) -rf autom4te.cache
53
54 #
55 # If you've ended up using an in-place version of Happy,
56 # make sure it gets built early on.
57 #
58 ifeq "$(HAPPY)" "$(FPTOOLS_TOP_ABS)/happy/src/happy-inplace"
59 build :: $(FPTOOLS_TOP_ABS)/happy/src/happy-inplace
60
61 $(FPTOOLS_TOP_ABS)/happy/src/happy-inplace : glafp-utils
62         $(MAKE) -C happy boot all
63 endif
64
65 # Build all projects that we know about
66 build ::
67         @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
68         for i in $(SUBDIRS); do \
69            if [ -d $$i ]; then \
70               $(MAKE) -C $$i boot; \
71               if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ;  then true; else exit 1; fi; \
72               $(MAKE) -C $$i all; \
73               if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ;  then true; else exit 1; fi; \
74               fi; \
75         done
76
77 ifeq "$(findstring ghc, $(SUBDIRS))" "ghc"
78
79 stage1 : build
80
81 stage2 :
82         $(MAKE) -C ghc/compiler boot stage=2
83         $(MAKE) -C ghc/compiler stage=2
84
85 stage3 :
86         $(MAKE) -C ghc/compiler boot stage=3
87         $(MAKE) -C ghc/compiler stage=3
88
89 bootstrap  : bootstrap2
90 bootstrap2 : stage1 stage2
91 bootstrap3 : stage1 stage2 stage3
92
93 all :: bootstrap
94
95 # We want to install the stage 2 bootstrapped compiler by default, but we let
96 # the user override this by saying 'make install stage=1', for example.
97 ifeq "$(stage)" ""
98 INSTALL_STAGE = stage=2
99 else
100 INSTALL_STAGE =
101 endif
102
103 else # Not building GHC
104
105 all :: build
106
107 INSTALL_STAGE =
108
109 endif
110
111 boot ::
112         @echo "Please use \`make all' only from the top-level, or \`make boot' followed"
113         @echo "by \`make all' in an individual project subdirectory (ghc, hslibs etc.)."
114
115 install ::
116         @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
117         for i in $(filter-out $(ProjectsDontInstall), $(SUBDIRS)); do \
118            if [ -d $$i ]; then \
119               $(MAKE) -C $$i $(INSTALL_STAGE) install; \
120               if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ;  then true; else exit 1; fi; \
121               fi; \
122         done
123
124 # If installing on Windows with MinGW32, copy the gcc compiler, headers and libs
125 # and the perl interpreter and dll into the GHC prefix directory.
126 # Gcc and Perl source locations derived from configuration data.
127 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
128 ifneq "$(WhatGccIsCalled)" ""
129 install ::
130         -mkdir $(prefix)/gcc-lib
131         -mkdir $(prefix)/include
132         -mkdir $(prefix)/include/mingw
133         -cp -rp $(GccDir)../include/* $(prefix)/include/mingw
134         -cp -rp $(GccDir)../lib/gcc-lib/mingw32/$(GccVersion)/* $(prefix)/gcc-lib
135         -cp $(GccDir)../lib/*.* $(prefix)/gcc-lib
136         -cp $(GccDir)gcc.exe $(prefix)
137         -cp $(GccDir)as.exe $(prefix)/gcc-lib
138         -cp $(GccDir)ld.exe $(prefix)/gcc-lib
139         -cp $(GccDir)dllwrap.exe $(prefix)/gcc-lib
140         -cp $(GccDir)dlltool.exe $(prefix)/gcc-lib
141         -cp $(GhcDir)../perl.exe $(prefix)
142         -cp $(GhcDir)../perl56.dll $(prefix)
143 endif
144 endif
145
146 install-docs ::
147         @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
148         for i in $(filter-out $(ProjectsDontInstall), $(SUBDIRS)); do \
149            if [ -d $$i ]; then \
150               $(MAKE) -C $$i $(INSTALL_STAGE) install-docs; \
151               if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ;  then true; else exit 1; fi; \
152               fi; \
153         done
154
155 # -----------------------------------------------------------------------------
156 # Making a binary distribution
157 #
158 # To make a particular binary distribution: 
159 # set $(Project) to the name of the project, capitalised (eg. Ghc or Happy).
160
161 # `dist' `binary-dist'
162 #      Create a distribution tar file for this program. The tar file
163 #      should be set up so that the file names in the tar file start with
164 #      a subdirectory name which is the name of the package it is a
165 #      distribution for. This name can include the version number.
166 #
167 #      For example, the distribution tar file of GCC version 1.40 unpacks
168 #      into a subdirectory named `gcc-1.40'.
169
170 #      The easiest way to do this is to create a subdirectory
171 #      appropriately named, use ln or cp to install the proper files in
172 #      it, and then tar that subdirectory.
173
174 #      The dist target should explicitly depend on all non-source files
175 #      that are in the distribution, to make sure they are up to date in
176 #      the distribution. See Making Releases.
177 #
178 #       binary-dist is an FPtools addition for binary distributions
179
180
181 binary-dist :: project-check
182
183 BIN_DIST_TMPDIR=$(FPTOOLS_TOP_ABS)
184 BIN_DIST_NAME=$(ProjectNameShort)-$(ProjectVersion)
185
186 #
187 # list of toplevel directories to include in binary distrib.
188 #
189 BIN_DIST_MAIN_DIR=$($(Project)MainDir)
190 BIN_DIST_DIRS=$($(Project)BinDistDirs)
191
192 binary-dist:: binary-dist-pre
193
194 BIN_DIST_TOP= distrib/Makefile-bin.in \
195               distrib/configure-bin.ac \
196               distrib/INSTALL \
197               $(BIN_DIST_MAIN_DIR)/ANNOUNCE \
198               $(BIN_DIST_MAIN_DIR)/VERSION \
199               $(BIN_DIST_MAIN_DIR)/LICENSE \
200               $(BIN_DIST_MAIN_DIR)/README \
201               glafp-utils/mkdirhier/mkdirhier \
202               install-sh \
203               config.guess \
204               config.sub   \
205               aclocal.m4
206
207 #
208 # binary-dist creates a binary bundle, set BIN_DIST_NAME
209 # to package name and do `make binary-dist Project=<project-name>'
210 # (normally this just a thing you would do from the toplevel of fptools)
211 #
212 .PHONY: binary-dist-pre binary-dist binary-pack
213
214 BIN_DIST_NAME=$(ProjectNameShort)-$(ProjectVersion)
215 BIN_DIST_TMPDIR=$(FPTOOLS_TOP_ABS)
216
217 binary-dist-pre::
218 ifeq "$(BIN_DIST)" ""
219         @echo "WARNING: To run the binary-dist target, you need to set BIN_DIST=1 in your build.mk" && exit 1
220 endif
221         -rm -rf $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)
222         -$(RM) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME).tar.gz
223         -echo "BIN_DIST_DIRS = $(BIN_DIST_DIRS)"
224         @for i in $(BIN_DIST_DIRS); do                   \
225           if test -d "$$i"; then                         \
226            echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM); \
227            $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM); \
228            echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM); \
229            $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM); \
230            echo $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
231            $(MKDIRHIER) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
232            echo $(MAKE) -C $$i $(MFLAGS) $(INSTALL_STAGE) install \
233                 prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
234                 exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
235                 bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
236                 libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
237                 libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
238                 datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
239            $(MAKE) -C $$i $(MFLAGS) $(INSTALL_STAGE) install \
240                 prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
241                 exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
242                 bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
243                 libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
244                 libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
245                 datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
246           fi; \
247         done
248
249 binary-dist::
250         @for i in $(BIN_DIST_TOP); do \
251           if test -f "$$i"; then \
252              echo cp $$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME); \
253              cp $$i $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME); \
254           fi; \
255         done;
256         @echo "Configuring the Makefile for this project..."
257         touch $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
258         echo "package = $(ProjectNameShort)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
259         echo "version = $(ProjectVersion)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
260         echo "PACKAGE_SH_SCRIPTS = $($(Project)BinDistShScripts)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
261         echo "PACKAGE_PRL_SCRIPTS = $($(Project)BinDistPrlScripts)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
262         echo "PACKAGE_LIB_PRL_SCRIPTS = $($(Project)BinDistLibPrlScripts)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
263         echo "PACKAGE_BINS = $($(Project)BinDistBins)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
264         echo "PACKAGE_LINKS = $($(Project)BinDistLinks)" >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
265         cat $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile-bin.in >> $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/Makefile.in
266         @echo "Generating a shippable configure script.."
267         $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/configure-bin.ac $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/configure.ac
268         ( cd $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME); autoconf )
269         if test -x $(BIN_DIST_MAIN_DIR)/mk/post-install-script ; then \
270                 cp $(BIN_DIST_MAIN_DIR)/mk/post-install-script \
271                         $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) ; \
272         fi
273         if test -x $(BIN_DIST_MAIN_DIR)/mk/post-inplace-script ; then \
274                 cp $(BIN_DIST_MAIN_DIR)/mk/post-inplace-script \
275                         $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) ; \
276         fi
277 #
278 # binary dist'ing the documentation.  
279 # Which documentation to build/install is hardcoded below.
280 #
281
282 BINDIST_DOC_WAYS = html ps
283 # BINDIST_DOC_WAYS =
284
285 binary-dist ::
286 ifneq "$(DOCBOOK_CATALOG)" ""
287         @for i in $(BIN_DIST_DIRS); do                          \
288           if test -d "$$i"; then                                \
289             $(MAKE) -C $$i $(MFLAGS) $(BINDIST_DOC_WAYS);       \
290             echo $(MAKE) -C $$i $(MFLAGS) install-docs XMLDocWays="$(BINDIST_DOC_WAYS)" \
291                 prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)      \
292                 exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
293                 bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
294                 libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
295                 libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
296                 datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
297             $(MAKE) -C $$i $(MFLAGS) install-docs XMLDocWays="$(BINDIST_DOC_WAYS)" \
298                 prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)      \
299                 exec_prefix=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) \
300                 bindir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM) \
301                 libdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
302                 libexecdir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM) \
303                 datadir=$(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/share; \
304           fi \
305         done
306 endif
307
308 # Rename scripts to $i.prl and $i.sh where necessary.
309 # ToDo: do this in a cleaner way...
310
311 ifneq "$($(Project)BinDistPrlScripts)" ""
312 binary-dist::
313         @for i in $($(Project)BinDistPrlScripts); do \
314              echo "Renaming $$i to $$i.prl"; \
315             $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i  $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i.prl; \
316         done
317 endif
318
319 ifneq "$($(Project)BinDistLibPrlScripts)" ""
320 binary-dist::
321         @for i in $($(Project)BinDistLibPrlScripts); do \
322              echo "Renaming $$i to $$i.prl"; \
323             $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$$i  $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/lib/$(TARGETPLATFORM)/$$i.prl; \
324         done
325 endif
326
327 ifneq "$($(Project)BinDistShScripts)" ""
328 binary-dist::
329         @for i in $($(Project)BinDistShScripts); do \
330              echo "Renaming $$i to $$i.sh"; \
331             $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i  $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/bin/$(TARGETPLATFORM)/$$i.sh; \
332         done
333 endif
334
335 #
336 # Do this separately for now
337
338 binary-pack::
339         ( cd $(BIN_DIST_TMPDIR); $(TAR) chzf $(BIN_DIST_NAME).tar.gz $(BIN_DIST_NAME) )
340
341 ifneq "$(way)" ""
342 .PHONY: package-way-dist
343 package-way-dist::
344         ( 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 )
345         gzip $(BIN_DIST_TMPDIR)/ghc-$(ProjectVersion)-$(way)-$(TARGETPLATFORM).tar
346 endif
347
348 ifneq "$(way)" ""
349 remove-way-dist::
350         ( cd $(BIN_DIST_TMPDIR); $(FIND) $(BIN_DIST_NAME)/ \( -name "*$(_way).a" -o -name "*.$(way_)hi" \) -print -exec $(RM) {} \; )
351 endif
352
353 binary-dist::
354         @echo "Mechanical and super-natty! Inspect the result and *if* happy; freeze, sell and get some sleep!"
355
356 # -----------------------------------------------------------------------------
357 # Building source distributions
358 #
359 # Do it like this: 
360 #
361 #       $ make
362 #       $ make dist Project=Ghc
363 #
364 # WARNING: `make dist' calls `make distclean' before tarring up the tree.
365 #
366
367 .PHONY: dist
368
369 #
370 # Directory in which we're going to build the src dist
371 #
372 SRC_DIST_DIR=$(shell pwd)/$(SRC_DIST_NAME)
373
374 #
375 # Files to include in source distributions
376 #
377 SRC_DIST_DIRS += docs distrib $(filter-out docs distrib,$(SUBDIRS))
378 SRC_DIST_FILES += \
379         configure.ac config.guess config.sub configure \
380         aclocal.m4 README Makefile install-sh \
381         mk/bootstrap.mk \
382         mk/boilerplate.mk mk/config.h.in mk/config.mk.in mk/opts.mk \
383         mk/paths.mk mk/package.mk mk/suffix.mk mk/target.mk
384
385 dist dist-manifest dist-package :: project-check
386
387 # clean the tree first, leaving certain extra files in place (eg. configure)
388 dist :: distclean
389
390 dist ::
391         -rm -rf $(SRC_DIST_DIR)
392         -$(RM) $(SRC_DIST_NAME).tar.gz
393         mkdir $(SRC_DIST_DIR)
394         mkdir $(SRC_DIST_DIR)/mk
395         $(FIND) $(SRC_DIST_DIRS) -type d \( -name CVS -prune -o -name SRC -prune -o -name "autom4te*" -prune -o -print \) | sed -e 's!.*!mkdir "$(SRC_DIST_DIR)/&"!' | sh
396         $(FIND) $(SRC_DIST_DIRS) $(SRC_DIST_FILES) -name CVS -prune -o -name SRC -prune -o -name "autom4te*" -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
397
398 # Automatic generation of a MANIFEST file for a source distribution
399 # tree that is ready to go.
400 dist-manifest ::
401         cd $(SRC_DIST_DIR); $(FIND) . \( -type l -o -type f \) -exec ls -lLG {} \; | sed -e 's/\.\///' > MANIFEST
402
403 dist-package :: dist-package-tar-gz
404
405 SRC_DIST_PATHS = $(patsubst %, $(SRC_DIST_NAME)/%, $(SRC_DIST_FILES) $(SRC_DIST_DIRS))
406
407 dist-package-tar-gz ::
408         $(TAR) chzf $(SRC_DIST_NAME)-src.tar.gz $(SRC_DIST_NAME)
409
410 dist-package-zip ::
411         cd ..; $(LN_S) $(FPTOOLS_TOP_ABS) $(SRC_DIST_NAME) && \
412                $(ZIP) $(ZIP_OPTS) -r $(SRC_DIST_NAME)-src.zip $(SRC_DIST_PATHS)
413
414 # -----------------------------------------------------------------------------
415 # HC file bundles
416
417 hc-file-bundle : project-check
418         $(RM) -r $(ProjectNameShort)-$(ProjectVersion)
419         $(LN_S) . $(ProjectNameShort)-$(ProjectVersion)
420         $(FIND) $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler \
421              $(ProjectNameShort)-$(ProjectVersion)/ghc/utils \
422              $(ProjectNameShort)-$(ProjectVersion)/libraries -follow \
423           \( -name "*.hc" -o -name "*_hsc.[ch]" -o -name "*_stub.[ch]" \) -print > hc-files-to-go
424         for f in `$(FIND) $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler $(ProjectNameShort)-$(ProjectVersion)/ghc/utils $(ProjectNameShort)-$(ProjectVersion)/libraries -name "*.hsc" -follow -print` ""; do \
425              if test "x$$f" != "x" && test -e `echo "$$f" | sed 's/hsc$$/hs/g'`; then \
426                 echo `echo "$$f" | sed 's/hsc$$/hs/g' ` >> hc-files-to-go ; \
427              fi; \
428         done;
429         echo $(ProjectNameShort)-$(ProjectVersion)/ghc/rts/AutoApply.hc >> hc-files-to-go
430         echo $(ProjectNameShort)-$(ProjectVersion)/libraries/base/GHC/PrimopWrappers.hs >> hc-files-to-go
431         echo $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler/parser/Parser.hs >> hc-files-to-go
432         echo $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler/parser/ParserCore.hs >> hc-files-to-go
433         echo $(ProjectNameShort)-$(ProjectVersion)/ghc/compiler/main/ParsePkgConf.hs >> hc-files-to-go
434         echo $(ProjectNameShort)-$(ProjectVersion)/libraries/haskell-src/Language/Haskell/Parser.hs >> hc-files-to-go
435         tar czf $(ProjectNameShort)-$(ProjectVersion)-$(TARGETPLATFORM)-hc.tar.gz `cat hc-files-to-go`
436
437 CLEAN_FILES += hc-files-to-go *-hc.tar.gz
438
439 # -----------------------------------------------------------------------------
440
441 # Turn off target.mk's rules for 'all', 'boot' and 'install'.
442 NO_BOOT_TARGET=YES
443 NO_ALL_TARGET=YES
444 NO_INSTALL_TARGET=YES
445
446 include $(TOP)/mk/target.mk
447
448 # -----------------------------------------------------------------------------
449