Makefile revision 69555d5968539c209b9b414c6ca8339e8e4765e0
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# hetcats/Makefile
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# $Header$
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Year: 2004
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# This Makefile will compile the new hetcats system and provides also
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# targets for test programs during implementation phases.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# !!! Note: This makefile is written for GNU make !!!
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# (gmake on solaris ; make on linux)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe####################################################################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## Some varibles, which control the compilation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweINCLUDE_PATH = ghc:hetcats
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCLEAN_PATH = utils/DrIFT-src:utils/GenerateRules:utils/inlineAxioms:Common:Logic:CASL:CASL/CCC:Syntax:Static:GUI:HasCASL:Haskell:Modal:CoCASL:COL:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:Isabelle:$(INCLUDE_PATH):Haskell/Hatchet
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## set ghc imports properly for your system
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}'
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# override on commandline for other architectures
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDRIFT_deps = utils/DrIFT-src/*hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweINLINEAXIOMS_deps = utils/InlineAxioms/*hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHC = ghc
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowePERL = perl
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHAPPY = happy
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDRIFT = $(DRIFT_ENV) utils/DrIFT
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweINLINEAXIOMS = utils/outlineAxioms
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHADDOCK = haddock
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCPPP = cpp
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHC_FLAGS = -Wall -fglasgow-exts
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# -fglasgow-exts comes in via ../uni/uni-package.conf
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# but added it here in case of compilation without uni
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHC_INCLUDE = -i$(INCLUDE_PATH)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe -package uni-server -DUNI_PACKAGE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### Profiling (only for debugging)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### Attention every module must be compiled with profiling or the linker
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### cannot link the various .o files properly. So after switching on
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### Profiling, do an 'gmake real_clean; gmake'
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### and comment out HC_PACKAGE variable definition above.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### Comment in the following line for switching on profiling.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#HC_PROF = -prof -auto-all
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHCI_OPTS = $(HC_FLAGS) $(HC_PACKAGE) $(HC_INCLUDE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHC_OPTS = $(HCI_OPTS) $(HC_PROF)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweDRIFT_OPTS = +RTS -K10m -RTS
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### list of directories to run checks in
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweTESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples ToHaskell/test
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe####################################################################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## sources for hetcats (semi - manually produced with a perl script)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),clean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),bin_clean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),d_clean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),real_clean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),distclean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),genRules)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),utils/genRules)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),hets-opt)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),hets-optimized)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),derivedSources)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),$(INLINEAXIOMS))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),release)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),check)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),apache_doc)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),clean_genRules)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),atctest2)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),hetana)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude sources_hetcats.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweobjects = $(patsubst %.lhs,%.o,$(sources:%.hs=%.o))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowedrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(gendrifted_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowegenrule_header_files = $(wildcard ATC/*.header.hs)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowegenrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Common/AS_Annotation.der.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CASL/Sublogic.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CASL/Morphism.hs CASL/Sign.hs CASL/AS_Basic_CASL.der.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe HasCASL/As.hs HasCASL/Le.hs HasCASL/Morphism.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe HasCASL/Sublogic.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Modal/AS_Modal.hs Modal/ModalSign.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe COL/AS_COL.hs COL/COLSign.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Static/DevGraph.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Haskell/Hatchet/AnnotatedHsSyn.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Haskell/Hatchet/MultiModuleBasics.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Haskell/Hatchet/HsSyn.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Haskell/Hatchet/Representation.hs\
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Haskell/Hatchet/Env.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Isabelle/IsaSign.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowegendrifted_files = ATC/Graph.hs ATC/Id.hs ATC/Result.hs ATC/AS_Annotation.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ATC/AS_Library.hs ATC/GlobalAnnotations.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ATC/AS_Structured.hs ATC/AS_Architecture.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ATC/DevGraph.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe CASL/ATC_CASL.hs Haskell/ATC_Haskell.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe HasCASL/ATC_HasCASL.hs CspCASL/ATC_CspCASL.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe Modal/ATC_Modal.hs CoCASL/ATC_CoCASL.hs COL/ATC_COL.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ATC/IsaSign.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowegenerated_rule_files = $(patsubst %.hs,%.der.hs,$(gendrifted_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs Comorphisms/Modal2CASL.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowegen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehappy_files = Haskell/Hatchet/HsParser.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# this variable holds the modules that should be documented
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# the imported parsec library is not included!
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecpp_sources = ./Isabelle/IsaProve.hs ./Isabelle/Logic_Isabelle.hs ./Proofs/Proofs.hs hets.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowedoc_sources = $(filter-out ./Isabelle/IsaSign.hs $(cpp_sources) ,$(sources)) \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(patsubst %.hs, %.hspp, $(cpp_sources))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe####################################################################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### targets
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe.PHONY : clean d_clean real_clean bin_clean check hetana hetpa hetdg \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe clean_genRules genRules
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#.PRECIOUS: sources_hetcats.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweall: hets
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehets: $(sources)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehets-opt: hetcats/Version.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MAKE) distclean
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MAKE) derivedSources
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MAKE) real_clean
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MAKE) hets-optimized
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehets-optimized:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe strip hets
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehets-old: $(objects)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) -o hets $(HC_OPTS) $(objects)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehets.cgi: $(sources) GUI/hets_cgi.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ghc --make -package-conf /home/luettich/ghc-pkg/package.conf -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_OPTS) -O
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehetcats-make: hets.hs utils/create_sources.pl $(drifted_files) $(happy_files) $(inline_axiom_files) Modal/ModalSystems.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) hetcats-make sources_hetcats.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o hets $< $(HC_OPTS) 2>&1 | tee hetcats-make
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe###############################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### TAGS files for (x)emacs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# load them with "M-x" "visit-tags-table" from
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# "HetCATS/hetcats/hetcats.TAGS"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# use "M-." to search for a tag
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# !!Beware this is somewhat instable, because it uses an absolute path!!
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehetcats.TAGS: $(sources)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(sources); mv TAGS $@; mv tags hetcats.tags
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe###############################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### count lines of code
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecount: $(sources)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe wc -l $(sources)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe###############################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### Documentation via haddock
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowedoc: docs/index.html
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# index for prelude is missing
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowedocs/index.html: $(doc_sources)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HADDOCK) $(doc_sources) -o docs -h \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe -i docs/base.haddock \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe -t 'hets -- a heterogenous Specification (CASL) tool set'
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweapache_doc:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) docs/*.*
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe cvs up -d
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MAKE) hets-opt
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MAKE) doc
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MAKE) post_doc4apache
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowepost_doc4apache:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(PERL) utils/post_process_docs.pl docs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe 'Common.Lib.Map.html:Common.Lib._Map.html'
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe cp docs/*.* a-docs/
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe###############################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### release management
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowederivedSources: $(drifted_files) $(happy_files) hetcats/Version.hs $(inline_axiom_files) Modal/ModalSystems.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweutils/DrIFT: $(DRIFT_deps)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe strip ../DrIFT)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweutils/genRules: $(GENERATERULES_deps)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (cd utils/GenerateRules; \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make '-i../..:../DrIFT-src' -package text GenerateRules.hs -o ../genRules && \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe strip ../genRules)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make utils/InlineAxioms/InlineAxioms.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC_OPTS) -o $(INLINEAXIOMS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe strip $(INLINEAXIOMS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowerelease:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) -r HetCATS
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository co HetCATS
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) -r uni
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ln -s ../uni uni
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (cd HetCATS; $(MAKE) derivedSources; ./clean.sh; \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) clean.*; mv Makefile Makefile.orig; \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe mv ReleaseMakefile Makefile)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe tar cvf HetCATS.tar HetCATS
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinstall-hets:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe chmod g+w hets
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe cp -p version_nr $(INSTALLDIR)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (cd $(INSTALLDIR); $(RM) hets; \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinstall: hets-opt install-hets
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#############################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### ATC DrIFT-rule generation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LowegenRules: $(generated_rule_files) utils/genRules
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(generated_rule_files): $(genrule_files) utils/genRules #$(genrule_header_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MAKE) clean_genRules
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(foreach file,$(atc_files),$(gen_atc_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe utils/genRules -r $(rule) -o CASL $(casl_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe utils/genRules -r $(rule) -o HasCASL $(hascasl_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe utils/genRules -r $(rule) -o Modal $(modal_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe utils/genRules -r $(rule) -o CoCASL $(cocasl_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe utils/genRules -r $(rule) -o COL $(col_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe utils/genRules -r $(rule) -o CspCASL $(cspcasl_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(haskell_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowerule = ShATermConvertible
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowegen_atc_files = if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; then \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe else \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe utils/genRules -r $(rule) -o ATC $(file); \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe fi ;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweatc_files := $(filter-out CASL/% HasCASL/% Modal/% CoCASL/% COL/% CspCASL/% Haskell/% ,$(genrule_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecasl_files := $(filter CASL/% ,$(genrule_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehascasl_files := $(filter HasCASL/% ,$(genrule_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowemodal_files := $(filter Modal/% ,$(genrule_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecocasl_files := $(filter CoCASL/% ,$(genrule_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecol_files := $(filter COL/% ,$(genrule_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecspcasl_files := $(filter CspCASL/% ,$(genrule_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehaskell_files := $(filter Haskell/%,$(genrule_files))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweclean_genRules:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $(generated_rule_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe###############
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### clean up
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### removes *.hi and *.o in all include directories
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweclean: bin_clean
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (cd $$p ; $(RM) *.hi *.o *.hspp) ; done
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### remove binaries
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowebin_clean:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) hets
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) test_parser
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) CASL/capa
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) HasCASL/hacapa
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) Haskell/hapa
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) Haskell/hana
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) Haskell/wrap
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) Syntax/hetpa
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) Static/hetana
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) Static/hetana
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) GUI/hetdg
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) hetpa
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) hetana
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) hetdg
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) atctest2
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) atctest
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) Common/annos
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### additonally removes *.d (dependency files) in every include directory
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### also delete *.d.bak (dependency file backups)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowed_clean: clean
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (cd $$p ; $(RM) *.d *.d.bak) ; done
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### remove files also in own libraries
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowelib_clean: clean
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for p in $(subst :, ,$(COMMONLIB_PATH)) . ; do \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe (cd $$p ; $(RM) *.hi *.d *.o) ; done
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### additionally removes the files that define the sources-variable
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowereal_clean: bin_clean lib_clean
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) hetcats-make sources_hetcats.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### additionally removes files not in CVS tree
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowedistclean: real_clean clean_genRules d_clean
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) hetcats/Version.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $(drifted_file) $(inline_axiom_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# $(RM) $(happy_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe####################################################################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### test targets
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe####################################################################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### a parser to test annotation parser and Id parsers
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowetest_parser: Common/test_parser
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### interactive
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweghci:
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC)i $(HCI_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### christian's target
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### CASL parser
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecapa: CASL/capa
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### HasCASL parser
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehacapa: HasCASL/hacapa
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### Haskell parser
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehapa: Haskell/hapa
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHaskell/hapa: Haskell/hapa.hs Haskell/Hatchet/*.hs $(happy_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### Haskell analysis
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehana: Haskell/hana
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/Hatchet/*.hs $(happy_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### HetCASL parser
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehetpa: Syntax/hetpa.hs Syntax/*.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### HetCASL parser
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehetana: Static/hetana.hs Static/*.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### ATC test system
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweatctest: ATC/ATCTest.hs ATC/*.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweatctest2: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs Common/ATerm/*.hs Common/Lib/*.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### ATerm.Lib test system
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweatermlibtest: Common/ATerm/ATermLibTest.hs Common/ATerm/*.hs Common/SimpPretty.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### HetCASL with dev graph
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehetdg: GUI/hetdg.hs $(drifted_files) *.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(RM) $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe### run tests in other directories
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowecheck: hetcats
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe####################################################################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## Preparing the version of HetCATS
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehetcats/Version.hs: hetcats/Version.in version_nr
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## two hardcoded dependencies for a correct generation of Version.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehetcats/Options.hs hetcats/WriteFn.hs hetcats/ReadFn.hs: hetcats/Version.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowehets.hs: hetcats/Version.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe####################################################################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## rules for DrIFT
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe%.hs: %.ly
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HAPPY) $<
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe%.hs: %.der.hs utils/DrIFT
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(DRIFT) $(DRIFT_OPTS) $< > $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## rules for inlineAxioms
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe%.hs: %.inline.hs $(INLINEAXIOMS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(INLINEAXIOMS) $< > $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## rule for cpp and haddock
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe%.hspp: %.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) -E -cpp -DUNI_PACKAGE -optP -P $<
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## compiling rules for object and interface files
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe%.o %.hi: %.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) -c $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe%.o %.hi: %.lhs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) -c $< $(HC_OPTS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## compiling rules for dependencies
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe%.d : %.hs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe%.d : %.lhs
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in utils/genTransMFormFunc.pl $(INLINEAXIOMS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(PERL) utils/genTransMFormFunc.pl $< $@
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe####################################################################
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## Setting a global search path (for dependency files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),clean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),real_clean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),d_clean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),real_clean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),distclean)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),genRules)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),utils/genRules)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),derivedSources)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),release)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(MAKECMDGOALS),clean_genRules)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifeq ($(MAKECMDGOALS),hets-old)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe## include every .d file in INCLUDE_PATH
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe-include $(objects:.o=.d)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowesources_hetcats.mk: hetcats-make hetcats/Version.hs hets.hs utils/create_sources.pl $(drifted_files) $(happy_files)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(PERL) utils/create_sources.pl hetcats-make sources_hetcats.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweendif
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe