From 3811995e8c58a431ee03b75a7f30a760df327519 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Tue, 26 Sep 2006 16:06:54 +0000 Subject: [PATCH] added SRC parameter to makefile (the one placed in the root of a development) to specify the set of files to handle (if omitted all files reachable from the root dir of the development are used). --- matita/matitamakeLib.ml | 3 +++ matita/template_makefile_devel.in | 22 +++++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/matita/matitamakeLib.ml b/matita/matitamakeLib.ml index 75c7e742d..47dbdb22b 100644 --- a/matita/matitamakeLib.ml +++ b/matita/matitamakeLib.ml @@ -186,6 +186,7 @@ let call_make ?matita_flags development target make = already_defined ^ if Helm_registry.get_bool "matita.bench" then "-bench" else "" in + let csc = try ["SRC=" ^ Sys.getenv "SRC"] with Not_found -> [] in rebuild_makefile development; let makefile = makefile_for_development development in let nodb = @@ -197,6 +198,7 @@ let call_make ?matita_flags development target make = try flags @ [ sprintf "MATITA_FLAGS=\"%s\"" matita_flags ] with Not_found -> flags in + let flags = flags @ csc in let args = ["--no-print-directory"; "-s"; "-k"; "-f"; makefile; target] @ flags in @@ -296,6 +298,7 @@ let destroy_development_aux development clean_development = unlink (pool () ^ development.name ^ rootfile); unlink (pool () ^ development.name ^ "/depend"); unlink (pool () ^ development.name ^ "/depend.errors"); + unlink (pool () ^ development.name ^ "/depend.dot"); rmdir (pool () ^ development.name); developments := List.filter (fun d -> d.name <> development.name) !developments diff --git a/matita/template_makefile_devel.in b/matita/template_makefile_devel.in index e0307bbf7..59aefa16d 100644 --- a/matita/template_makefile_devel.in +++ b/matita/template_makefile_devel.in @@ -9,25 +9,29 @@ CLEANO=$(RT_BASEDIR)matitaclean.opt $(OPTIONS) devel:=$(shell basename `pwd`) +ifneq "$(SRC)" "" + XXX="SRC=$(SRC)" +endif + all: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) build $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) build $(devel) clean: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) clean $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) clean $(devel) cleanall: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEAN) all + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEAN) all all.opt opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) build $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) build $(devel) clean.opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) clean $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) clean $(devel) cleanall.opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEANO) all + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEANO) all %.mo: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) $@ + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) $@ %.mo.opt: preall - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) $@ + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) $@ preall: - $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) init $(devel) + $(H)$(XXX) MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) init $(devel) -- 2.39.2