31 lines
792 B
Makefile
Raw Normal View History

GHCFLAGS= -O $(GHC_EXTRA_OPTS)
2005-07-04 03:36:38 +00:00
PKGFLAGS= -package posix -package-conf $(TOP)/plugins.conf.inplace
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