#
# $Id: IsaMakefile,v 1.52 2005/09/03 14:45:43 wenzelm Exp $
#
# IsaMakefile for HOLCF
#

## targets

default: HOLCF
images: HOLCF IOA
test: HOLCF-IMP HOLCF-ex HOLCF-FOCUS \
      IOA-ABP IOA-NTP IOA-Modelcheck IOA-Storage IOA-ex
all: images test


## global settings

SRC = $(ISABELLE_HOME)/src
OUT = $(ISABELLE_OUTPUT)
LOG = $(OUT)/log


## HOLCF

HOLCF: HOL $(OUT)/HOLCF

HOL:
	@cd $(SRC)/HOL; $(ISATOOL) make HOL

$(OUT)/HOLCF: $(OUT)/HOL Adm.thy Cfun.ML Cfun.thy \
  Cont.ML Cont.thy Cprod.ML Cprod.thy \
  Discrete.thy Domain.thy Fix.ML Fix.thy Fixrec.thy \
  Ffun.ML Ffun.thy HOLCF.ML HOLCF.thy Lift.ML \
  Lift.thy One.ML One.thy Pcpo.ML Pcpo.thy Porder.ML Porder.thy \
  ROOT.ML Sprod.ML Sprod.thy \
  Ssum.ML Ssum.thy \
  Tr.ML Tr.thy Up.ML \
  Pcpodef.thy pcpodef_package.ML \
  Up.thy adm_tac.ML cont_consts.ML cont_proc.ML fixrec_package.ML \
  domain/axioms.ML domain/extender.ML domain/interface.ML \
  domain/library.ML domain/syntax.ML domain/theorems.ML holcf_logic.ML \
  ex/Stream.thy document/root.tex
	@$(ISATOOL) usedir -b -g true -r $(OUT)/HOL HOLCF


## HOLCF-IMP

HOLCF-IMP: HOLCF $(LOG)/HOLCF-IMP.gz

$(LOG)/HOLCF-IMP.gz: $(OUT)/HOLCF IMP/HoareEx.thy \
  IMP/Denotational.thy IMP/ROOT.ML IMP/document/root.tex
	@$(ISATOOL) usedir $(OUT)/HOLCF IMP


## HOLCF-ex

HOLCF-ex: HOLCF $(LOG)/HOLCF-ex.gz

$(LOG)/HOLCF-ex.gz: $(OUT)/HOLCF ex/Dagstuhl.ML ex/Dagstuhl.thy \
  ex/Dnat.thy ex/Fix2.ML ex/Fix2.thy ex/Focus_ex.ML \
  ex/Focus_ex.thy ex/Hoare.ML ex/Hoare.thy ex/Loop.ML ex/Loop.thy \
  ex/ROOT.ML ex/loeckx.ML ex/Fixrec_ex.thy \
  ../HOL/Library/Nat_Infinity.thy 
	@$(ISATOOL) usedir $(OUT)/HOLCF ex


## HOLCF-FOCUS

HOLCF-FOCUS: HOLCF $(LOG)/HOLCF-FOCUS.gz

$(LOG)/HOLCF-FOCUS.gz: $(OUT)/HOLCF FOCUS/Fstreams.thy \
  FOCUS/Fstream.thy FOCUS/Fstream.ML \
  FOCUS/FOCUS.thy FOCUS/FOCUS.ML \
  FOCUS/Stream_adm.thy FOCUS/Stream_adm.ML  ../HOL/Library/Continuity.thy \
  FOCUS/Buffer.thy FOCUS/Buffer.ML FOCUS/Buffer_adm.thy FOCUS/Buffer_adm.ML
	@$(ISATOOL) usedir $(OUT)/HOLCF FOCUS

## IOA

IOA: HOLCF $(OUT)/IOA

$(OUT)/IOA: $(OUT)/HOLCF IOA/ROOT.ML IOA/meta_theory/Traces.thy \
  IOA/meta_theory/Asig.ML IOA/meta_theory/Asig.thy \
  IOA/meta_theory/CompoScheds.thy IOA/meta_theory/CompoExecs.ML \
  IOA/meta_theory/CompoTraces.thy IOA/meta_theory/CompoScheds.ML \
  IOA/meta_theory/CompoTraces.ML IOA/meta_theory/Sequence.ML \
  IOA/meta_theory/Seq.thy IOA/meta_theory/RefCorrectness.thy \
  IOA/meta_theory/Automata.thy IOA/meta_theory/Traces.ML \
  IOA/meta_theory/Seq.ML IOA/meta_theory/RefMappings.ML \
  IOA/meta_theory/ShortExecutions.thy IOA/meta_theory/ShortExecutions.ML \
  IOA/meta_theory/IOA.thy \
  IOA/meta_theory/Sequence.thy IOA/meta_theory/Automata.ML \
  IOA/meta_theory/CompoExecs.thy IOA/meta_theory/RefMappings.thy \
  IOA/meta_theory/RefCorrectness.ML IOA/meta_theory/Compositionality.ML \
  IOA/meta_theory/Compositionality.thy \
  IOA/meta_theory/TL.thy IOA/meta_theory/TL.ML IOA/meta_theory/TLS.thy \
  IOA/meta_theory/TLS.ML IOA/meta_theory/LiveIOA.thy IOA/meta_theory/LiveIOA.ML \
  IOA/meta_theory/Pred.thy IOA/meta_theory/Abstraction.thy \
  IOA/meta_theory/Abstraction.ML \
  IOA/meta_theory/Simulations.thy IOA/meta_theory/Simulations.ML \
  IOA/meta_theory/SimCorrectness.thy IOA/meta_theory/SimCorrectness.ML \
  IOA/meta_theory/ioa_syn.ML IOA/meta_theory/ioa_package.ML 
	@cd IOA; $(ISATOOL) usedir -b $(OUT)/HOLCF IOA


## IOA-ABP

IOA-ABP: IOA $(LOG)/IOA-ABP.gz

$(LOG)/IOA-ABP.gz: $(OUT)/IOA IOA/ABP/Abschannel.thy \
  IOA/ABP/Abschannel_finite.thy IOA/ABP/Action.thy \
  IOA/ABP/Check.ML IOA/ABP/Correctness.ML IOA/ABP/Correctness.thy \
  IOA/ABP/Env.thy IOA/ABP/Impl.thy IOA/ABP/Impl_finite.thy \
  IOA/ABP/Lemmas.ML IOA/ABP/Lemmas.thy IOA/ABP/Packet.thy \
  IOA/ABP/ROOT.ML IOA/ABP/Receiver.thy IOA/ABP/Sender.thy \
  IOA/ABP/Spec.thy
	@cd IOA; $(ISATOOL) usedir $(OUT)/IOA ABP

## IOA-NTP

IOA-NTP: IOA $(LOG)/IOA-NTP.gz

$(LOG)/IOA-NTP.gz: $(OUT)/IOA IOA/NTP/Abschannel.ML \
  IOA/NTP/Abschannel.thy IOA/NTP/Action.thy \
  IOA/NTP/Correctness.ML IOA/NTP/Correctness.thy IOA/NTP/Impl.ML \
  IOA/NTP/Impl.thy IOA/NTP/Lemmas.ML IOA/NTP/Lemmas.thy \
  IOA/NTP/Multiset.ML IOA/NTP/Multiset.thy IOA/NTP/Packet.ML \
  IOA/NTP/Packet.thy IOA/NTP/ROOT.ML IOA/NTP/Receiver.ML \
  IOA/NTP/Receiver.thy IOA/NTP/Sender.ML IOA/NTP/Sender.thy \
  IOA/NTP/Spec.thy
	@cd IOA; $(ISATOOL) usedir $(OUT)/IOA NTP


## IOA-Modelcheck

IOA-Modelcheck: IOA $(LOG)/IOA-Modelcheck.gz

$(LOG)/IOA-Modelcheck.gz: $(OUT)/IOA IOA/Modelcheck/ROOT.ML IOA/Modelcheck/Cockpit.ML\
  IOA/Modelcheck/Cockpit.thy IOA/Modelcheck/MuIOA.ML IOA/Modelcheck/MuIOA.thy \
  IOA/Modelcheck/MuIOAOracle.ML IOA/Modelcheck/MuIOAOracle.thy \
  IOA/Modelcheck/Ring3.ML IOA/Modelcheck/Ring3.thy 
	@cd IOA; $(ISATOOL) usedir $(OUT)/IOA Modelcheck


## IOA-Storage

IOA-Storage: IOA $(LOG)/IOA-Storage.gz

$(LOG)/IOA-Storage.gz: $(OUT)/IOA IOA/Storage/Action.thy IOA/Storage/Correctness.ML \
  IOA/Storage/Correctness.thy IOA/Storage/Impl.thy \
  IOA/Storage/ROOT.ML IOA/Storage/Spec.thy
	@cd IOA; $(ISATOOL) usedir $(OUT)/IOA Storage


## IOA-ex

IOA-ex: IOA $(LOG)/IOA-ex.gz

$(LOG)/IOA-ex.gz: $(OUT)/IOA IOA/ex/ROOT.ML \
  IOA/ex/TrivEx.thy IOA/ex/TrivEx.ML \
  IOA/ex/TrivEx2.thy IOA/ex/TrivEx2.ML 
	@cd IOA; $(ISATOOL) usedir $(OUT)/IOA ex


## clean

clean:
	@rm -f $(OUT)/HOLCF $(LOG)/HOLCF.gz $(LOG)/HOLCF-IMP.gz \
	  $(LOG)/HOLCF-ex.gz $(LOG)/HOLCF-FOCUS.gz \
          $(OUT)/IOA $(LOG)/IOA.gz $(LOG)/IOA-ABP.gz \
	  $(LOG)/IOA-NTP.gz $(LOG)/IOA-Modelcheck.gz $(LOG)/IOA-Storage.gz
