File: Makefile

package info (click to toggle)
frown 0.6.1-14
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,956 kB
  • ctags: 271
  • sloc: haskell: 35,132; makefile: 228; csh: 35; yacc: 23
file content (49 lines) | stat: -rw-r--r-- 1,482 bytes parent folder | download | duplicates (12)
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
ifeq ($(hc),nhc98)
main :=	hmake -nhc -c -M120M -K32M +CTS -H32M -CTS -ILib -LLib Main; mv Main a.out
else
ifeq ($(hc),ghc)
#main :=	ghc --make -iLib -LLib Main.lhs +RTS -c -M120M
main :=	ghc --make -iLib -LLib Main.lhs
else
#main :=	ghc --make -package text -package util Main.lhs +RTS -c -M120M
main :=	ghc --make -package text -package util Main.lhs
endif
endif

define run
	$(main)
	./a.out Input/Big.hs | diff Input/Big.out -
	./a.out Input/Generate.hs | diff Input/Generate.out -	
	./a.out Test/Small1.hs | diff Test/Small1.out -	
	./a.out Test/Small2.hs | diff Test/Small2.out -	
	./a.out Test/Small3.hs | diff Test/Small3.out -	
	./a.out Test/Small4.hs | diff Test/Small4.out -	
	./a.out Test/Small5.hs | diff Test/Small5.out -	
	./a.out Test/Small6.hs | diff Test/Small6.out -	
endef

INPUTS          := $(wildcard Input/*.hs)
HC_OPTIONS	= -O
FROWN_OPTIONS	= --optimize

.PHONY: test clean distclean

test:
	@echo "*** standard"
	../../frown --lexer --expected --signature $(FROWN_OPTIONS) --code=standard HsParser.lg
	$(run)
	@echo "*** compact"
	../../frown --lexer --expected --signature $(FROWN_OPTIONS) --code=compact HsParser.lg
	$(run)
	@echo "*** stackless"
	../../frown --lexer --expected --signature $(FROWN_OPTIONS) --code=stackless HsParser.lg
	$(run)
#	@echo "*** gvstack"
#	../../frown --lexer --expected --signature $(FROWN_OPTIONS) --code=gvstack HsParser.lg
#	$(run)

clean:
	@rm -f *~ *.o *.hi Lib/*.o Lib/*.hi

distclean: clean
	@rm -f HsParser.hs* a.out