File: Makefile

package info (click to toggle)
hugs98 98.200311-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 12,964 kB
  • ctags: 8,084
  • sloc: ansic: 67,521; haskell: 61,497; xml: 4,566; sh: 3,264; cpp: 1,936; yacc: 1,094; makefile: 915; cs: 883; sed: 10
file content (51 lines) | stat: -rw-r--r-- 1,398 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# A (GNU) Makefile for checking out libraries + buildings RPMs
#
include Defs.mk

all: fptools pp-fptools src/Makefile
	cd src; make

src/Makefile:
	cd src/unix; make config EXTRA_CONFIGURE_OPTS=$(EXTRA_CONFIGURE_OPTS)

#
# Utilities needed to check out and process fptools. To override
# these, set them on the command-line when invoking 'make':
#
#  foo$ make FIND=/usr/bin/find HAPPY=c:/happy/happy-1.15/bin/happy ...
#
# (You'll find 'hsc2hs' included in a GHC distribution.)
#
FIND=find
HAPPY=happy
HSC2HS=hsc2hs
CVS=cvs

fptools:
	-mkdir fptools
	$(CVS) -d ${CVSROOT} export -r${HSLIBSTAG} $(addprefix fptools/hslibs/,${HSLIBSDIRS})
	$(CVS) -d ${CVSROOT} export -r${LIBRARIESTAG} $(addprefix fptools/libraries/,${LIBRARIESDIRS})

.PHONY: pp-fptools

# Preprocess fptools checkout, so the package can be built
# without happy & ghc changes here should be reflected also
# in RPM.mk (sorry)
pp-fptools: fptools fptools/stamp-fptools

fptools/stamp-fptools:
	$(FIND) fptools/libraries -name "*.ly" -o -name "*.y" |\
		xargs -l $(HAPPY)
ifneq "$(USING_AN_OLDER_HSC2HS)" "YES"
	$(FIND) fptools/libraries -name "*.hsc" |\
		xargs -l $(HSC2HS) --no-compile --template=template-hsc.h
else
	$(FIND) fptools/libraries -name "*.hsc" |\
		xargs -l $(HSC2HS) --no-compile
	$(FIND) fptools/libraries -name "*_hsc_make.c" |\
		xargs src/unix/hsc_kludge
endif
	@touch fptools/stamp-fptools

include RPM.mk