-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (23 loc) · 1012 Bytes
/
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
GHCFLAGS = -W
Perl5Parser_HS = Perl5Parser/Common.hs Perl5Parser/Types.hs Perl5Parser/Serialize.hs Perl5Parser/ParserHelper.hs Perl5Parser/Prototype.hs Perl5Parser/Env.hs Perl5Parser/Token/Number.hs Perl5Parser/Token/Quote.hs Perl5Parser/Token/QuoteLike.hs Perl5Parser/Token/Regexp.hs Perl5Parser/Token/HereDoc.hs Perl5Parser/Token.hs Perl5Parser/Term.hs Perl5Parser/Expr.hs Perl5Parser/Lines.hs Perl5Parser/Document.hs
Perl5Parser_O = $(Perl5Parser_HS:%.hs=%.o)
all: TAGS test
./test /tmp/t.pl
test: $(Perl5Parser_O) test.o
ghc $(GHCFLAGS) $^ -o $@ -package parsec
%.o: %.hs
ghc $(GHCFLAGS) -c $<
test.o: test.hs
ghc $(GHCFLAGS) -c $<
%.o-boot: %.hs-boot
ghc $(GHCFLAGS) -c $<
clean:
find -name "*.o" | xargs rm -f
find -name "*.hi" | xargs rm -f
find -name "*.o-boot" | xargs rm -f
find -name "*.hi-boot" | xargs rm -f
rm -f TAGS test
TAGS: $(Perl5Parser_HS)
hasktags -e $^
Perl5Parser/Term.o: Perl5Parser/Expr.o-boot Perl5Parser/Lines.o-boot
Perl5Parser/Expr.o: Perl5Parser/Lines.o-boot