File: Makefile

package info (click to toggle)
hugs98 98.200609.21-6
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 43,136 kB
  • sloc: haskell: 118,978; xml: 61,802; ansic: 46,695; sh: 8,750; cpp: 6,033; makefile: 2,663; yacc: 1,111; cs: 883; sed: 10
file content (51 lines) | stat: -rw-r--r-- 1,675 bytes parent folder | download | duplicates (6)
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
LIBRARY	= cpphs
VERSION	= 1.2

DIRS	= Language/Preprocessor/Cpphs \
	  Text/ParserCombinators

SRCS	= Language/Preprocessor/Cpphs.hs \
          Language/Preprocessor/Cpphs/CppIfdef.hs \
          Language/Preprocessor/Cpphs/HashDefine.hs \
          Language/Preprocessor/Cpphs/MacroPass.hs \
          Language/Preprocessor/Cpphs/Options.hs \
          Language/Preprocessor/Cpphs/Position.hs \
          Language/Preprocessor/Cpphs/ReadFirst.hs \
          Language/Preprocessor/Cpphs/RunCpphs.hs \
          Language/Preprocessor/Cpphs/SymTab.hs \
          Language/Preprocessor/Cpphs/Tokenise.hs \
          Language/Preprocessor/Unlit.hs \
          Text/ParserCombinators/HuttonMeijer.hs \
          cpphs.hs

AUX	= README LICENCE* CHANGELOG $(LIBRARY).cabal Setup.hs Makefile \
	  cpphs.hugs cpphs.compat \
	  tests/[A-BD-Z]* tests/[a-np-z]* \
	  docs/[a-z]*

all: $(LIBRARY)
package:
	tar cf tmp.tar $(SRCS) $(AUX)
	mkdir $(LIBRARY)-$(VERSION)
	cd $(LIBRARY)-$(VERSION); tar xf ../tmp.tar
	tar zcf $(LIBRARY)-$(VERSION).tar.gz $(LIBRARY)-$(VERSION)
	zip -r $(LIBRARY)-$(VERSION).zip $(LIBRARY)-$(VERSION)
	rm -r tmp.tar $(LIBRARY)-$(VERSION)
haddock: $(SRCS)
	mkdir -p docs/$(LIBRARY)
	for dir in $(DIRS); do mkdir -p docs/$(LIBRARY)/$$dir; done
	for file in $(SRCS); \
	    do HsColour -anchorHTML $$file \
	          >docs/$(LIBRARY)/`dirname $$file`/`basename $$file .hs`.html;\
	    done
	haddock --html --title=$(LIBRARY) \
	    --odir=docs/$(LIBRARY) --package=$(LIBRARY) \
	    --source-module="%{MODULE/.//}.html" \
	    --source-entity="%{MODULE/.//}.html#%{NAME}" \
	    $(SRCS)



$(LIBRARY): $(SRCS)
	$(HC) $(HFLAGS) $(HEAP) -o $@  $(SRCS)
	$(STRIP) $@