File: Makefile

package info (click to toggle)
hugs98 98.200609.21-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 41,884 kB
  • ctags: 8,913
  • sloc: haskell: 118,978; xml: 61,802; ansic: 46,695; sh: 8,750; cpp: 6,033; makefile: 2,661; yacc: 1,111; cs: 883; sed: 10
file content (153 lines) | stat: -rw-r--r-- 4,810 bytes parent folder | download | duplicates (5)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Top-level Makefile for Hugs
# (this should be a POSIX 1003.2-1992 Makefile)

# Start of general settings (leave this line unchanged)

NAME = hugs98

# Set to 0 if a snapshot release.
MAJOR_RELEASE = 1

# Release number of RPM.
RELEASE = 1

TAG = HEAD
HSLIBSTAG = HEAD

CVS_ROOT = :pserver:anoncvs@cvs.haskell.org:/cvs
HSLIBSDIRS = concurrent data hssource lang net text util posix

DARCS_ROOT = http://darcs.haskell.org
LIBRARIESDIRS = base haskell98 haskell-src mtl network parsec QuickCheck unix \
	Cabal OpenGL GLUT OpenAL ALUT fgl X11 HGL HaXml HUnit Win32 time stm \
	xhtml
DARCS_CPPHS = http://www.cs.york.ac.uk/fp/darcs/cpphs

# End of general settings (leave this line unchanged)

PACKAGES	= packages/base/base.cabal
DARCS_GET	= darcs get --partial

# General targets:
#
# all:		(default) build a system that can be run in-place.
# install:	all + install in $(prefix) as supplied to configure.
# clean:	delete files generated in building, except those needed
#		for in-place use.
# distclean:	delete files created by configuring or building.
# veryclean:	delete most things that can be regenerated (though this
#		will require additional tools).
# check:	run regression tests

# Note: we have to build in src before building in libraries, as the
# latter uses the binaries in src.  See libraries/Makefile.in for
# details of the bootstrapping of the libraries.

all: $(PACKAGES) src/Makefile
	cd src; $(MAKE) all
	cd libraries; $(MAKE) all
	cd docs; $(MAKE) all

# We install the standard libraries and the simple demos.
# We don't install things which don't work on Unix (e.g. Win32).

install: install_all_but_docs
	cd docs; $(MAKE) install

# Install everything except documentation, which is installed differently
# by some packagers (e.g. rpm)

install_all_but_docs: $(PACKAGES) src/Makefile
	cd src; $(MAKE) install
	cd libraries; $(MAKE) install
	cd demos; $(MAKE) install

clean: clean_root
	cd src; if test -f Makefile; then $(MAKE) clean; fi
	cd libraries; if test -f Makefile; then $(MAKE) clean; fi
	cd docs; if test -f Makefile; then $(MAKE) clean; fi
	cd demos; if test -f Makefile; then $(MAKE) clean; fi

distclean: distclean_root
	cd src; if test -f Makefile; then $(MAKE) distclean; fi
	cd libraries; if test -f Makefile; then $(MAKE) distclean; fi
	cd docs; if test -f Makefile; then $(MAKE) distclean; fi
	cd demos; if test -f Makefile; then $(MAKE) distclean; fi

veryclean: veryclean_root
	cd src; if test -f Makefile; then $(MAKE) veryclean; fi
	cd libraries; if test -f Makefile; then $(MAKE) veryclean; fi
	cd docs; if test -f Makefile; then $(MAKE) veryclean; fi
	cd demos; if test -f Makefile; then $(MAKE) veryclean; fi

clean_root:
	$(RM) *.tar.gz *.rpm Defs.mk
	$(RM) *~

distclean_root: clean_root
	$(RM) -r config.status config.log config.cache autom4te.cache
	$(RM) MkDefs tests/config

veryclean_root: distclean_root
	cd debian; $(RM) control hugs.copyright libhugs-*-bundled.*

################################################################
# Regression tests (Unix only)
#
# Uses runstdtest (from ghc-0.26/ghc/glafp-utils/scripts), perl 5
# and /bin/sh (Bourne shell).
#
# "make verbosecheck" generates a lot of output to explain what is going on
# and reassure you that progress is being made.  This is great if you've
# never run these tests before - but if you just want to reassure yourself
# that nothing has broken since the last release, you might prefer to
# run "make check" which removes all the explanations and success
# stories - leaving just the errors (if any).
#
################################################################

check: all
	cd tests && sh testScript | if egrep -v '^--( |-----)'; then false; else true; fi

verbosecheck: all
	cd tests && sh testScript

# Building distributions

tarplus: Defs.mk
	$(MAKE) -f RPM.mk tar

tar: Defs.mk
	$(MAKE) PKGNAME=$(NAME) LIBRARIESDIRS='base haskell98 Cabal' -f RPM.mk tar

rpm: Defs.mk
	$(MAKE) -f RPM.mk rpm

Defs.mk: Makefile
	( echo '# Automatically extracted from Makefile (so edit that instead)';\
	  sed -n '/^# Start of general settings/,/^# End of general settings/p' Makefile;\
	) >$@

# Build phases:

# configuration

src/Makefile: configure
	$(RM) -r config.cache autom4te.cache
	LIBS=$(GNULIBS) ./configure $(EXTRA_CONFIGURE_OPTS)

configure: configure.ac aclocal.m4 $(PACKAGES)
	for dir in packages/*; do if test -f $$dir/configure.ac; \
		then (cd $$dir; autoreconf); fi; done
	-autoreconf

# fetching library sources and utility programs

$(PACKAGES):
	echo "not fetching library sources."

debian/control: debian/control.in debian/make-control.hs
	cp License debian/hugs.copyright
# We need runhugs to build a Debian source package from CVS,
# but don't complain if it's unavailable.
	runghc -ipackages/Cabal:: debian/make-control.hs `ls packages/*/*.cabal | grep -v Win32 `