Makefile revision c70ef4c3b3a62764f715510c9fd67dde3acfe454
fa8ed9702ac1820f539365853f0671f3125b2d73nd# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
fa8ed9702ac1820f539365853f0671f3125b2d73nd# Year: 2004
fa8ed9702ac1820f539365853f0671f3125b2d73nd# This Makefile will compile the new hets system and provides also
fa8ed9702ac1820f539365853f0671f3125b2d73nd# targets for test programs during implementation phases.
fa8ed9702ac1820f539365853f0671f3125b2d73nd# !!! Note: This makefile is written for GNU make !!!
fa8ed9702ac1820f539365853f0671f3125b2d73nd# (gmake on solaris)
fa8ed9702ac1820f539365853f0671f3125b2d73nd####################################################################
fa8ed9702ac1820f539365853f0671f3125b2d73nd## Some varibles, which control the compilation
fa8ed9702ac1820f539365853f0671f3125b2d73ndHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
fa8ed9702ac1820f539365853f0671f3125b2d73nd Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
fa8ed9702ac1820f539365853f0671f3125b2d73nd Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
fa8ed9702ac1820f539365853f0671f3125b2d73nd utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
fa8ed9702ac1820f539365853f0671f3125b2d73nd Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
fa8ed9702ac1820f539365853f0671f3125b2d73nd Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
fa8ed9702ac1820f539365853f0671f3125b2d73nd CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
fa8ed9702ac1820f539365853f0671f3125b2d73nd# the 'replacing spaces' example was taken from the (GNU) Make info manual
fa8ed9702ac1820f539365853f0671f3125b2d73nd# override on commandline for other architectures
fa8ed9702ac1820f539365853f0671f3125b2d73nd /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
fa8ed9702ac1820f539365853f0671f3125b2d73ndGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
fa8ed9702ac1820f539365853f0671f3125b2d73nd Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
fa8ed9702ac1820f539365853f0671f3125b2d73ndGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
fa8ed9702ac1820f539365853f0671f3125b2d73ndSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
fa8ed9702ac1820f539365853f0671f3125b2d73nd ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
fa8ed9702ac1820f539365853f0671f3125b2d73nd# remove -fno-warn-orphans for older ghcs and add -ifgl
fa8ed9702ac1820f539365853f0671f3125b2d73nd $(HC_WARN) -fglasgow-exts -fallow-overlapping-instances \
fa8ed9702ac1820f539365853f0671f3125b2d73nd# -ddump-minimal-imports
fa8ed9702ac1820f539365853f0671f3125b2d73nd# uncomment to above line to generate .imports files for displayDependencyGraph
fa8ed9702ac1820f539365853f0671f3125b2d73ndHC_OPTS_MAC := $(if $(findstring Darwin,$(shell uname -s)), \
fa8ed9702ac1820f539365853f0671f3125b2d73nd -optl-F$(HOME)/Library/Frameworks -optl-framework -optlGNUreadline,)
fa8ed9702ac1820f539365853f0671f3125b2d73ndlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SoftFOL \
fa8ed9702ac1820f539365853f0671f3125b2d73ndTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73nd ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73nd Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73nd SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73nd SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73ndHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
fa8ed9702ac1820f539365853f0671f3125b2d73nd# some modules from uni for haddock
fa8ed9702ac1820f539365853f0671f3125b2d73nd# if uni/server is included also HaXml sources are needed
fa8ed9702ac1820f539365853f0671f3125b2d73nduni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
fa8ed9702ac1820f539365853f0671f3125b2d73nd### list of directories to run checks in
fa8ed9702ac1820f539365853f0671f3125b2d73ndhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73ndPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
fa8ed9702ac1820f539365853f0671f3125b2d73nd base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
fa8ed9702ac1820f539365853f0671f3125b2d73nd base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
fa8ed9702ac1820f539365853f0671f3125b2d73nd property/TI property/defs property/parse2 property/parse2/Parser
fa8ed9702ac1820f539365853f0671f3125b2d73ndhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
fa8ed9702ac1820f539365853f0671f3125b2d73ndprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73nd echo "of programatica package found"; else \
fa8ed9702ac1820f539365853f0671f3125b2d73nd echo "{-# OPTIONS -w #-}" > $@
fa8ed9702ac1820f539365853f0671f3125b2d73nd$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73ndderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73ndutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
fa8ed9702ac1820f539365853f0671f3125b2d73nd## rule for appendHaskellPreludeString
fa8ed9702ac1820f539365853f0671f3125b2d73ndHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73ndAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
fa8ed9702ac1820f539365853f0671f3125b2d73nd HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
fa8ed9702ac1820f539365853f0671f3125b2d73nd#files in base/TI/
fa8ed9702ac1820f539365853f0671f3125b2d73nd#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
fa8ed9702ac1820f539365853f0671f3125b2d73nd#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
fa8ed9702ac1820f539365853f0671f3125b2d73ndOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
fa8ed9702ac1820f539365853f0671f3125b2d73nd base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
fa8ed9702ac1820f539365853f0671f3125b2d73nd $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
fa8ed9702ac1820f539365853f0671f3125b2d73nd## rule for ATC generation
fa8ed9702ac1820f539365853f0671f3125b2d73ndTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
fa8ed9702ac1820f539365853f0671f3125b2d73nd### Profiling (only for debugging)
fa8ed9702ac1820f539365853f0671f3125b2d73nd### Attention every module must be compiled with profiling or the linker
fa8ed9702ac1820f539365853f0671f3125b2d73nd### cannot link the various .o files properly. So after switching on
fa8ed9702ac1820f539365853f0671f3125b2d73nd### Profiling, do an 'gmake real_clean; gmake'
fa8ed9702ac1820f539365853f0671f3125b2d73nd### Comment in the following line for switching on profiling.
fa8ed9702ac1820f539365853f0671f3125b2d73nd# HC_PROF = -prof -auto-all -fignore-asserts -osuf p_o +RTS -K100m -RTS
fa8ed9702ac1820f539365853f0671f3125b2d73ndHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
fa8ed9702ac1820f539365853f0671f3125b2d73nd####################################################################
fa8ed9702ac1820f539365853f0671f3125b2d73nd## sources for hets
fa8ed9702ac1820f539365853f0671f3125b2d73ndnon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73nd Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73nd CoCASL/AS_CoCASL.hs COL/AS_COL.hs ConstraintCASL/AS_ConstraintCASL.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73ndatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
fa8ed9702ac1820f539365853f0671f3125b2d73nd Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
cpp_sources = \
$(wildcard utils/GenerateRules/*.hs) \
$(wildcard utils/InlineAxioms/*.hs) \
$(RM) $@
cgi:
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules && strip ../genRules)
-i../.. -o $(INLINEAXIOMS)
if [ -d ../programatica ] ; then \
./clean.sh; \
### Common/LaTeX_maps.hs generation
strip $@
@echo -n "Generating pretty/LaTeX_maps.hs ... "
@(cd pretty >/dev/null; ../utils/genItCorrections \
$(GENRULES)
$(RM) $@
## two hardcoded dependencies for a correct generation of Version.hs
.SUFFIXES:
%.hs: %.y
$(RM) $@
$(RM) $@
$(INLINEAXIOMS) $< > $@
%.d : %.hs
%.d : %.lhs
$(RM) $@
$(RM) $@
$(PERL) $+ > $@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
$(RM) $@
@if [ -d $(INSTALLER_DIR) ] ; then \
sed "s/^\(SPASS_DIR_MAC=\).*/\1`ls utils/SPASS-ppc-mac/ | grep SPASS`/" Makefile.inst > Makefile.inst2 ;\
@echo Please do