~ubuntu-branches/ubuntu/jaunty/alex/jaunty

« back to all changes in this revision

Viewing changes to alex/tests/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Ian Lynagh (wibble)
  • Date: 2003-10-01 12:31:01 UTC
  • Revision ID: james.westby@ubuntu.com-20031001123101-yquo14mvjqh3e0sk
Tags: upstream-2.0
ImportĀ upstreamĀ versionĀ 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
TOP = ..
 
2
include $(TOP)/mk/boilerplate.mk
 
3
 
 
4
.PRECIOUS: .hs .o .bin
 
5
 
 
6
TESTS = simple.x tokens.x tokens_posn.x tokens_gscan.x
 
7
 
 
8
ALEX=../src/alex-inplace
 
9
 
 
10
%.n.hs : %.x
 
11
        $(ALEX) $(TEST_ALEX_OPTS) $< -o $@
 
12
 
 
13
%.g.hs : %.x
 
14
        $(ALEX) $(TEST_ALEX_OPTS) -g $< -o $@
 
15
 
 
16
CLEAN_FILES += *.n.hs *.g.hs *.info *.hi *.bin
 
17
 
 
18
ALL_TEST_HS = $(shell echo $(TESTS) | sed -e 's/\([^\. ]*\)\.\(l\)\{0,1\}x/\1.n.hs \1.g.hs/g')
 
19
 
 
20
ALL_TESTS = $(patsubst %.hs, %.run, $(ALL_TEST_HS))
 
21
 
 
22
HC_OPTS += -fglasgow-exts -package lang
 
23
 
 
24
%.run : %.bin
 
25
        ./$<
 
26
 
 
27
%.bin : %.o
 
28
        $(HC) $(HC_OPTS) $($*_LD_OPTS) $< -o $@
 
29
 
 
30
all :: $(ALL_TESTS)
 
31
 
 
32
include $(TOP)/mk/target.mk