2005-07-06 04:49:07 +00:00
|
|
|
GHCFLAGS= -Onot $(GHC_EXTRA_OPTS)
|
2005-08-19 02:08:35 +00:00
|
|
|
PKGFLAGS= -package posix
|
2005-06-19 12:05:49 +00:00
|
|
|
PKGFLAGS+= -package plugins
|
2005-04-24 08:51:33 +00:00
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
build:
|
|
|
|
@$(GHC) $(GHCFLAGS) $(PKGFLAGS) $(EXTRAFLAGS) Main.hs -o runplugs
|
|
|
|
include ../../../config.mk
|
|
|
|
check: build
|
|
|
|
@(if [ -f "expected" ] ;\
|
|
|
|
then \
|
|
|
|
actual_out="/tmp/hs-plugins-actual.out.$$$$" ;\
|
|
|
|
diff_out="/tmp/hs-plugins.diff.$$$$" ;\
|
|
|
|
cat test.in | ./runplugs > $$actual_out 2>&1 || true ;\
|
|
|
|
diff -u expected $$actual_out > $$diff_out || true ;\
|
|
|
|
if [ -s "$$diff_out" ] ; then \
|
|
|
|
echo "failed with:" ;\
|
|
|
|
cat "$$diff_out" | sed '1,3d' ;\
|
|
|
|
else \
|
|
|
|
echo "ok." ;\
|
|
|
|
fi ;\
|
|
|
|
rm $$actual_out ;\
|
|
|
|
else \
|
|
|
|
cat test.in | ./runplugs 2>&1 || true ;\
|
|
|
|
fi)
|
|
|
|
clean:
|
|
|
|
rm -rf *.hi *.o *~ *.dep ./runplugs
|
|
|
|
|
|
|
|
include ../../../config.mk
|