This repository was archived by the owner on Nov 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
51 lines (44 loc) · 1.64 KB
/
Makefile
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) $@