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 <20> :boot:camlp4
|
|||
|
for i in {DIRS}
|
|||
|
directory {i}
|
|||
|
domake all
|
|||
|
directory ::
|
|||
|
end
|
|||
|
|
|||
|
:boot:camlp4 <20>
|
|||
|
domake clean_cold library_cold compile_cold
|
|||
|
domake promote_cold
|
|||
|
domake clean_cold clean_hot library
|
|||
|
|
|||
|
clean_hot <EFBFBD>
|
|||
|
for i in {DIRS}
|
|||
|
directory {i}
|
|||
|
domake clean
|
|||
|
directory ::
|
|||
|
end
|
|||
|
|
|||
|
depend <EFBFBD>
|
|||
|
for i in {DIRS}
|
|||
|
directory {i}
|
|||
|
domake depend
|
|||
|
directory ::
|
|||
|
end
|
|||
|
|
|||
|
install <EFBFBD>
|
|||
|
for i in {DIRS}
|
|||
|
directory {i}
|
|||
|
domake install
|
|||
|
directory ::
|
|||
|
end
|
|||
|
|
|||
|
scratch <EFBFBD> clean
|
|||
|
delete -i :boot:<3A>.cm[oi] || set status 0
|
|||
|
delete -i :boot:camlp4<70> || set status 0
|
|||
|
delete -y -i :boot:SAVED
|
|||
|
|
|||
|
clean <EFBFBD> clean_hot clean_cold
|
|||
|
|
|||
|
# Normal bootstrap
|
|||
|
|
|||
|
bootstrap <EFBFBD> backup promote clean_hot all compare
|
|||
|
|
|||
|
backup <EFBFBD>
|
|||
|
newfolder :boot.new
|
|||
|
domake mv_cvs -d FROM=:boot: -d TO=:boot.new:
|
|||
|
move :boot :boot.new:SAVED
|
|||
|
move :boot.new :boot
|
|||
|
|
|||
|
restore <EFBFBD>
|
|||
|
move :boot:SAVED :boot.new
|
|||
|
domake mv_cvs -d FROM=:boot: -d TO=:boot.new:
|
|||
|
delete -y -i :boot
|
|||
|
rename :boot.new :boot
|
|||
|
|
|||
|
promote <EFBFBD>
|
|||
|
for i in {FDIRS}
|
|||
|
directory {i}
|
|||
|
domake promote
|
|||
|
directory ::
|
|||
|
end
|
|||
|
|
|||
|
compare <EFBFBD>
|
|||
|
set failures 0
|
|||
|
set exit 0
|
|||
|
for i in {FDIRS}
|
|||
|
directory {i}
|
|||
|
domake compare <20> 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 <EFBFBD>
|
|||
|
delete -i -y :boot:SAVED:SAVED
|
|||
|
|
|||
|
|
|||
|
# Fast bootstrap
|
|||
|
|
|||
|
bootstrap_fast <EFBFBD> backup promote clean_hot fast compare
|
|||
|
|
|||
|
fast <20> :boot:camlp4
|
|||
|
for i in {FDIRS}
|
|||
|
directory {i}
|
|||
|
domake all
|
|||
|
directory ::
|
|||
|
end
|
|||
|
|
|||
|
clean_fast <EFBFBD>
|
|||
|
for i in {FDIRS}
|
|||
|
directory {i}
|
|||
|
domake clean
|
|||
|
directory ::
|
|||
|
end
|
|||
|
|
|||
|
|
|||
|
# The very beginning
|
|||
|
|
|||
|
world <EFBFBD>
|
|||
|
domake clean_cold library_cold compile_cold
|
|||
|
domake promote_cold
|
|||
|
domake clean_cold clean_hot library all
|
|||
|
|
|||
|
library <EFBFBD>
|
|||
|
directory lib
|
|||
|
domake all promote
|
|||
|
directory ::
|
|||
|
|
|||
|
# Cold start using pure Objective Caml sources
|
|||
|
|
|||
|
library_cold <EFBFBD>
|
|||
|
directory :ocaml_src:lib
|
|||
|
domake all promote
|
|||
|
directory :::
|
|||
|
|
|||
|
compile_cold <EFBFBD>
|
|||
|
directory ocaml_src
|
|||
|
for i in {FDIRS}
|
|||
|
directory {i}
|
|||
|
domake all
|
|||
|
directory ::
|
|||
|
end
|
|||
|
directory ::
|
|||
|
|
|||
|
promote_cold <EFBFBD>
|
|||
|
for i in {FDIRS}
|
|||
|
directory :ocaml_src:{i}
|
|||
|
domake promote
|
|||
|
directory :::
|
|||
|
end
|
|||
|
|
|||
|
clean_cold <EFBFBD>
|
|||
|
for i in {FDIRS}
|
|||
|
directory :ocaml_src:{i}
|
|||
|
domake clean
|
|||
|
directory :::
|
|||
|
end
|
|||
|
|
|||
|
# Bootstrap the sources
|
|||
|
|
|||
|
#bootstrap_sources <20>
|
|||
|
# 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 <EFBFBD>
|
|||
|
if "`exists "{FROM}CVS"`"; move "{FROM}CVS" "{TO}"; end
|
|||
|
if "`exists "{FROM}.cvsignore"`"; move "{FROM}.cvsignore" "{TO}"; end
|