205 lines
4.7 KiB
Makefile
205 lines
4.7 KiB
Makefile
#######################################################################
|
|
# #
|
|
# Camlp4 #
|
|
# #
|
|
# Damien Doligez, projet Para, INRIA Rocquencourt #
|
|
# #
|
|
# Copyright 1999 Institut National de Recherche en Informatique et #
|
|
# en Automatique. Distributed only by permission. #
|
|
# #
|
|
#######################################################################
|
|
|
|
# $Id$
|
|
|
|
DIRS = odyl camlp4 meta etc top ocpp lib man
|
|
FDIRS = odyl camlp4 meta lib
|
|
|
|
all Ä :boot:camlp4
|
|
for i in {DIRS}
|
|
directory {i}
|
|
domake all
|
|
directory ::
|
|
end
|
|
|
|
:boot:camlp4 Ä
|
|
domake clean_cold library_cold compile_cold
|
|
domake promote_cold
|
|
domake clean_cold clean_hot library
|
|
|
|
clean_hot Ä
|
|
for i in {DIRS}
|
|
directory {i}
|
|
domake clean
|
|
directory ::
|
|
end
|
|
|
|
depend Ä
|
|
for i in {DIRS}
|
|
directory {i}
|
|
domake depend
|
|
directory ::
|
|
end
|
|
|
|
install Ä
|
|
for i in {DIRS}
|
|
directory {i}
|
|
domake install
|
|
directory ::
|
|
end
|
|
|
|
scratch Ä clean
|
|
delete -i :boot:Å.cm[oi] || set status 0
|
|
delete -i :boot:camlp4Å || set status 0
|
|
delete -y -i :boot:SAVED
|
|
|
|
clean Ä clean_hot clean_cold
|
|
|
|
# Normal bootstrap
|
|
|
|
bootstrap Ä backup promote clean_hot all compare
|
|
|
|
backup Ä
|
|
newfolder :boot.new
|
|
domake mv_cvs -d FROM=:boot: -d TO=:boot.new:
|
|
move :boot :boot.new:SAVED
|
|
move :boot.new :boot
|
|
|
|
restore Ä
|
|
move :boot:SAVED :boot.new
|
|
domake mv_cvs -d FROM=:boot: -d TO=:boot.new:
|
|
delete -y -i :boot
|
|
rename :boot.new :boot
|
|
|
|
promote Ä
|
|
for i in {FDIRS}
|
|
directory {i}
|
|
domake promote
|
|
directory ::
|
|
end
|
|
|
|
compare Ä
|
|
set failures 0
|
|
set exit 0
|
|
for i in {FDIRS}
|
|
directory {i}
|
|
domake compare ³ dev:null
|
|
evaluate failures += {status}
|
|
directory ::
|
|
end
|
|
if {failures}
|
|
echo "Fixpoint not reached, try one more bootstrapping cycle."
|
|
else
|
|
echo "Fixpoint reached, bootstrap succeeded."
|
|
end
|
|
|
|
cleanboot Ä
|
|
delete -i -y :boot:SAVED:SAVED
|
|
|
|
|
|
# Fast bootstrap
|
|
|
|
bootstrap_fast Ä backup promote clean_hot fast compare
|
|
|
|
fast Ä :boot:camlp4
|
|
for i in {FDIRS}
|
|
directory {i}
|
|
domake all
|
|
directory ::
|
|
end
|
|
|
|
clean_fast Ä
|
|
for i in {FDIRS}
|
|
directory {i}
|
|
domake clean
|
|
directory ::
|
|
end
|
|
|
|
|
|
# The very beginning
|
|
|
|
world Ä
|
|
domake clean_cold library_cold compile_cold
|
|
domake promote_cold
|
|
domake clean_cold clean_hot library all
|
|
|
|
library Ä
|
|
directory lib
|
|
domake all promote
|
|
directory ::
|
|
|
|
# Cold start using pure Objective Caml sources
|
|
|
|
library_cold Ä
|
|
directory :ocaml_src:lib
|
|
domake all promote
|
|
directory :::
|
|
|
|
compile_cold Ä
|
|
directory ocaml_src
|
|
for i in {FDIRS}
|
|
directory {i}
|
|
domake all
|
|
directory ::
|
|
end
|
|
directory ::
|
|
|
|
promote_cold Ä
|
|
for i in {FDIRS}
|
|
directory :ocaml_src:{i}
|
|
domake promote
|
|
directory :::
|
|
end
|
|
|
|
clean_cold Ä
|
|
for i in {FDIRS}
|
|
directory :ocaml_src:{i}
|
|
domake clean
|
|
directory :::
|
|
end
|
|
|
|
# Bootstrap the sources
|
|
|
|
#bootstrap_sources Ä
|
|
# cd etc; make pr_o.cmo
|
|
# mkdir ocaml_src.new
|
|
# @-for i in $(FDIRS); do \
|
|
# (mkdir ocaml_src.new/$$i; cd ocaml_src.new/$$i; \
|
|
# sed 's/# $$Id.*\$$/# Id/' ../../$$i/Makefile | \
|
|
# sed 's-include ../config-include ../../config-g' | \
|
|
# sed 's-../boot-../../boot-g' > Makefile; \
|
|
# cp ../../$$i/.depend .) \
|
|
# done
|
|
# @-for i in $(FDIRS); do \
|
|
# for j in $$i/*.ml*; do \
|
|
# echo ============================================; \
|
|
# echo ocaml_src.new/$$j; \
|
|
# ./tools/conv.sh $$j | \
|
|
# sed 's/$$Id.*\$$/Id/' > ocaml_src.new/$$j; \
|
|
# done; \
|
|
# done
|
|
|
|
#promote_sources:
|
|
# make mv_cvs FROM=ocaml_src TO=ocaml_src.new
|
|
# for i in $(FDIRS); do \
|
|
# make mv_cvs FROM=ocaml_src/$$i TO=ocaml_src.new/$$i; \
|
|
# done
|
|
# mv ocaml_src/tools ocaml_src.new/.
|
|
# mv ocaml_src ocaml_src.new/SAVED
|
|
# mv ocaml_src.new ocaml_src
|
|
|
|
#unpromote_sources:
|
|
# mv ocaml_src ocaml_src.new
|
|
# mv ocaml_src.new/SAVED ocaml_src
|
|
# mv ocaml_src.new/tools ocaml_src/.
|
|
# for i in $(FDIRS); do \
|
|
# make mv_cvs FROM=ocaml_src.new/$$i TO=ocaml_src/$$i; \
|
|
# done
|
|
# make mv_cvs FROM=ocaml_src.new TO=ocaml_src
|
|
|
|
#clean_sources:
|
|
# rm -rf ocaml_src/SAVED/SAVED
|
|
|
|
mv_cvs Ä
|
|
if "`exists "{FROM}CVS"`"; move "{FROM}CVS" "{TO}"; end
|
|
if "`exists "{FROM}.cvsignore"`"; move "{FROM}.cvsignore" "{TO}"; end
|