?prevdifflink? - Blame
###############################################################################
#
# Environment for makerules
#
top = .
subdirs = syn test haskell
version = ${shell cat VERSION}
# Global variable required for generic clean rules
CLEAN = *.log
###############################################################################
#
# Create awareness of different checking options
#
all:
@echo
@echo " Check Options:"
@echo " Enter \"${MAKE} check\" to check all tests"
@echo " Enter \"${MAKE} check-testsuite\" for a single testsuite"
@echo " Enter \"${MAKE} check1-testsuite TEST=n\" for checking the N test"
@echo " Enter \"${MAKE} check1amb-testsuite TEST=n\" for checking the N test w/ ambtracker"
@echo " in which testsuite can be: generics expressions functiontypes"
@echo
@echo " Haskell front-end:"
@echo " Enter \"${MAKE} VDMhparser\" for generating the haskell front-end"
@echo " Enter \"${MAKE} haddock\" for generating docs in doc/html"
@echo
@echo " Clean options:"
@echo " Enter \"${MAKE} clean\" to clean all compiled files"
@echo " Enter \"${MAKE} very-clean\" to clean all generated files"
@echo
###############################################################################
#
# Rules for checking the grammar against the testsuites
#
check: syn test
check-%: syn
@${MAKE} -C test $*.runtestsuite
check1-%: syn
@${MAKE} -C test $*.runtest TEST=$(TEST)
check1amb-%: syn
@${MAKE} -C test $*.runambtest TEST=$(TEST)
###############################################################################
#
# Generate the VDMhparser (Haskell front-end for VDM-SL)
#
VDMhparser: syn haskell
###############################################################################
#
# Generate Haddock documentation to docs/html folder
#
haddock:
@rm -rf doc/html
@mkdir doc/html
haddock -h -o doc/html -t "VDM-SL Front-end" \
`find . -iname "*.hs" -or -iname "*.lhs"` 2> haddock.log
###############################################################################
#
# Create a distribution package with the version number
#
dist: clean release
@echo "Creating file ../vdm-front-$(version).tgz"
@find . -name .cvsignore -print -delete
( cd ..; \
tar -zcvf vdm-front-$(version).tgz vdm-front-$(version); \
)
@echo "done"
###############################################################################
#
# Alternates between development version and release configurations.
# Release configuration generates all source code dependencies and copy them
# to the contrib folder.
#
development: scripts/makerules.configuration.dev
@echo "Switching to development configuration"
@mv scripts/makerules.configuration scripts/makerules.configuration.rel
@mv scripts/makerules.configuration.dev scripts/makerules.configuration
@rm -rf contrib
release: scripts/makerules.configuration.rel
@echo "Creating dependencies"
@( cd haskell; \
rm -rf .depend*; \
make dependencies; \
)
@echo "Copy dependencies to the contrib directory"
@( cd scripts; \
perl genrelease.pl < ../haskell/.depend \
)
@echo "Switching to release configuration"
@mv scripts/makerules.configuration scripts/makerules.configuration.dev
@mv scripts/makerules.configuration.rel scripts/makerules.configuration
###############################################################################
#
# Reusable includes
#
include $(top)/scripts/makerules.clean
include $(top)/scripts/makerules.recurse
|