~ubuntu-branches/debian/sid/c2hs/sid

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Ian Lynagh (wibble)
  • Date: 2003-11-18 21:24:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20031118212411-dp4vz3f1stpkxmk2
Tags: 0.12.0-1
* NMU (with maintainer's permission).
* New upstream version. Closes: #202458.
* Tarball is repacked to avoid problems with some files being in the
  tarball twice. Closes: #182548.
* Removed "Recommends: ghc | ghc5" (seems redundant as ghc5 is being
  depended on and no other GHC is useful).
* Force dependency to be on ghc5 rather than any other ghc (doesn't
  get ghc6 dependencies right currently).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#  Compiler Toolkit Toplevel: root makefile 
2
2
#
3
 
#  Author : Manuel M. T. Chakravarty
 
3
#  Author : Manuel M T Chakravarty
4
4
#  Created: 24 July 1998 (derived from HiPar root makefile)
5
5
#
6
 
#  Version $Revision: 1.62 $ from $Date: 2001/05/13 11:43:34 $
 
6
#  Version $Revision: 1.66 $ from $Date: 2002/03/12 12:39:12 $
7
7
#
8
 
#  Copyright (c) [1995..2000] Manuel M. T. Chakravarty
 
8
#  Copyright (c) [1995..2002] Manuel M T Chakravarty
9
9
#
10
10
#  This file is free software; you can redistribute it and/or modify
11
11
#  it under the terms of the GNU General Public License as published by
20
20
#  = DOCU =====================================================================
21
21
#
22
22
#  * This makefile handles the toplevel commands of the Compiler Toolkit.  
23
 
#    Compiler can be dropped in by setting up a `mk/<mycomp>.mk' makefile plus
24
 
#    a `<mycomp>' source directory.  The makefile contains compiler-specific 
25
 
#    definitions for the various `make' targets and the source directory 
26
 
#    contains the complete set of compiler-specific source files.
 
23
#    A new compiler can be dropped in by setting up a `<mycomp>' source 
 
24
#    directory plus a `<mycomp>/mk/<mycomp>.pck.mk' makefile.  The makefile 
 
25
#    contains compiler-specific definitions for the various `make' targets and
 
26
#    the source directory contains the complete set of compiler-specific 
 
27
#    source files.
27
28
#
28
 
#    It is important that the variables and targets defined in `mk/<mycomp>.mk'
29
 
#    are prefixed with a compiler-specific prefix.  This allows to have 
30
 
#    multiple compiler in a single Compiler Toolkit tree without conflicts.
 
29
#    It is important that the variables and targets defined in 
 
30
#    `<mycomp>/mk/<mycomp>.pck.mk' are prefixed with a compiler-specific 
 
31
#    prefix.  This allows to have multiple compiler in a single Compiler 
 
32
#    Toolkit tree without conflicts.
31
33
#
32
34
#    The main build target and the tar target of a package are defined 
33
 
#    `mk/<mycomp>.mk'.
 
35
#    `<mycomp>/mk/<mycomp>.pck.mk'.
34
36
#
35
37
#  * A build is performed below `build' in a directory named by the basename of
36
38
#    the used compiler (as given by $(HC)).  In this directory, shadow 
64
66
 
65
67
# files lists
66
68
#
 
69
# * need the `wildcard' in `BASEPARTSFILES', as the following `filter-out' 
 
70
#   wouldn't work otherwise
 
71
#
 
72
BASEPARTSFILES=$(wildcard base/*/Makefile base/*/*.hs\
 
73
                          base/*/tests/Makefile base/*/tests/*.hs)
67
74
BASEFILES =AUTHORS COPYING COPYING.LIB INSTALL Makefile README README.CTKlight\
68
75
           aclocal.m4 configure configure.in config.sub config.guess\
69
76
           install-sh\
70
 
           doc/base mk/common.mk mk/config.mk.in base
 
77
           mk/common.mk mk/config.mk.in\
 
78
           base/ChangeLog base/Makefile base/base.build.conf.in\
 
79
           base/base.build.config base/TODO\
 
80
           $(filter-out %/SysDep.hs %/SysDepPosix.hs, $(BASEPARTSFILES))\
 
81
           doc/base/Makefile doc/base/base.tex doc/base/base.bib
71
82
CTKLFILES =AUTHORS COPYING.LIB README.CTKlight\
72
83
           base/admin/BaseVersion.hs\
73
84
           base/admin/Config.hs\
115
126
# system configuration (has to be executed before building)
116
127
# ====================
117
128
#
118
 
# Remark: $(LNDIR)'s first argument is relative to the second.
119
 
#
120
129
.PHONY: config showconfig
121
130
 
122
131
config:
123
 
        @echo "*** Building shadow directories..."
124
 
        @for dir in mk base $(PCKS); do\
125
 
          echo mkdir -p $(BUILDDIR)/$$dir;\
126
 
          mkdir -p $(BUILDDIR)/$$dir;\
127
 
          echo $(LNDIR) ../../../$$dir $(BUILDDIR)/$$dir;\
128
 
          $(LNDIR) ../../../$$dir $(BUILDDIR)/$$dir;\
129
 
        done
130
 
        mkdir -p $(DOCBUILDDIR)
131
 
        $(LNDIR) ../../doc $(DOCBUILDDIR)
132
132
        @echo "*** Selecting system-dependent code..."
133
 
        $(MAKE) -C $(BUILDDIR)/base/sysdep $(MFLAGS) $@
 
133
        $(MAKE) -C base/sysdep $(MFLAGS) $@
134
134
        @echo "*** Configuration successfully finished."
135
135
 
136
136
showconfig:
140
140
        @echo "  Parser generator : $(HAPPY)"
141
141
        @echo "  Mkdepend         : $(MKDEPENDHS)"
142
142
        @echo "  Compiler packages: $(PCKS)"
143
 
        @if [ -d $(BUILDDIR) ]; then\
144
 
           echo "  Build dir.       : created";\
145
 
         else\
146
 
           echo "  Build dir.       : missing (do \`make config')";\
147
 
         fi
148
143
 
149
144
 
150
145
# preparations (run parser generators and compute dependencies)
159
154
parsers:
160
155
        @echo "*** Checking for the need to run a parser generator..."
161
156
        @for pck in $(PCKS); do\
162
 
          $(MAKE) -C $(BUILDDIR)/$$pck $(MFLAGS) $@;\
 
157
          $(MAKE) -C $$pck $(MFLAGS) $@;\
163
158
        done
164
159
 
165
160
# Compute dependcies within each package
167
162
depend:
168
163
        @echo "*** Building dependency databases..."
169
164
        @for pck in base $(PCKS); do\
170
 
          $(MAKE) -C $(BUILDDIR)/$$pck $(MFLAGS) $@;\
 
165
          $(MAKE) -C $$pck $(MFLAGS) $@;\
171
166
        done
172
167
 
173
168
 
181
176
build: base $(PCKS)
182
177
 
183
178
base:
184
 
        $(MAKE) -C $(BUILDDIR)/base $(MFLAGS) all
 
179
        $(MAKE) -C base $(MFLAGS) all
185
180
 
186
181
doc:
187
182
        @echo "*** Building documentation..."
188
183
        @for dir in base $(PCKS); do\
189
 
          $(MAKE) -C $(DOCBUILDDIR)/$$dir $(MFLAGS) all;\
 
184
          $(MAKE) -C doc/$$dir $(MFLAGS) all;\
190
185
        done
191
186
 
192
187
 
198
193
install:
199
194
        @echo "*** Installing packages..."
200
195
        @for pck in $(PCKS); do\
201
 
          $(MAKE) -C $(BUILDDIR)/$$pck $(MFLAGS) $@;\
 
196
          $(MAKE) -C $$pck $(MFLAGS) $@;\
202
197
        done
203
198
 
204
199
install-doc:
205
200
        @echo "*** Installing documentation..."
206
201
        @for pck in base $(PCKS); do\
207
 
          $(MAKE) -C $(DOCBUILDDIR)/$$pck $(MFLAGS) install;\
 
202
          $(MAKE) -C doc/$$pck $(MFLAGS) install;\
208
203
        done
209
204
 
210
205
 
218
213
#
219
214
clean:
220
215
        @for pck in base $(PCKS); do\
221
 
          $(MAKE) -C $(BUILDDIR)/$$pck $(MFLAGS) $@;\
222
 
          $(MAKE) -C $(DOCBUILDDIR)/$$pck $(MFLAGS) $@;\
 
216
          $(MAKE) -C $$pck $(MFLAGS) $@;\
 
217
          $(MAKE) -C doc/$$pck $(MFLAGS) $@;\
223
218
        done
224
219
 
225
220
# Remove generated interface files
226
221
#
227
222
cleanhi:
228
223
        @for pck in base $(PCKS); do\
229
 
          $(MAKE) -C $(BUILDDIR)/$$pck $(MFLAGS) $@;\
 
224
          $(MAKE) -C $$pck $(MFLAGS) $@;\
230
225
        done
231
226
 
232
 
# Remove all builds
 
227
# Remove all traces of a build
233
228
#
234
229
spotless:
235
 
        -$(RM) -rf build config.cache
 
230
        -$(RM) -rf config.cache
236
231
 
237
232
# Remove everything that is not in the source tar
238
233
#