From 1092afeaacf33c69f639314cba5046e594bd0a51 Mon Sep 17 00:00:00 2001 From: hristov Date: Wed, 14 Nov 2001 19:20:05 +0000 Subject: [PATCH] Updated version of the flat makefiles (J.-E.Revsbech) --- Makefile.flat | 62 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a/Makefile.flat b/Makefile.flat index af12e697cae..f2f7acd5795 100644 --- a/Makefile.flat +++ b/Makefile.flat @@ -21,7 +21,7 @@ EXPORTDIR = $(ALICE_ROOT)/include ################################################################## # include machine dependent macros -include build/Makefile.$(ALICE_TARGET) +-include build/Makefile.$(ALICE_TARGET) ################################################################## ################################################################## @@ -41,19 +41,24 @@ endif # Modules to build # COMMENTED OUT FOR TEST PURPOSES -MODULES:=PDF PYTHIA PYTHIA6 GEANT321 MINICERN STEER HIJING\ + +ALIROOTMODULES:= STEER \ TGeant3 PHOS TRD TPC ZDC MUON PMD FMD TOF ITS \ CASTOR RICH START STRUCT EVGEN RALICE ALIFAST \ THijing CONTAINERS MEVSIM TMEVSIM THbtp HBTP EMCAL -# MODULES:=STEER HBTP PHOS +#ALIROOTMODULES:= HBTP + +CERNMODULES:= PDF PYTHIA PYTHIA6 GEANT321 MINICERN HIJING + + +MODULES:=$(ALIROOTMODULES) $(CERNMODULES) ################################################################## MODULES += ALIROOT MODDIRS := MODULES - ############################################################# # @@ -105,7 +110,7 @@ EXPORTFILES := BINLIBDIRS := -L$(ALICE_ROOT)/$(LIBPATH) -.PHONY: alilibs aliroot makedistr headers + #Dependencies of module.mk files @@ -124,42 +129,54 @@ include build/module.dep # If cleaning, do not include # dependencies or module.mk files. -ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) +ifeq ($(findstring $(MAKECMDGOALS), clean clean-all clean-dicts clean-modules clean-depend clean-objects clean-libs clean-bins),) +#ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) # If makeing modules, not not include # anything ifneq ($(findstring modules,$(MAKECMDGOALS)),modules) - ############################################################# # # Include the modules -include $(patsubst %,%/module.mk,$(MODULES)) +-include $(patsubst %,%/module.mk,$(MODULES)) ############################################################# ############################################################# # # include dependencies if not making them! -ifneq ($(MAKECMDGOALS),depend) +ifneq ($(MAKECMDGOALS),depend ) +# Don't include if cleaning of any sort +ifneq ($(findstring clean,$(MAKECMDGOALS)),clean) include $(INCLUDEFILES) endif +endif ############################################################# endif endif # ************************************************************************** +############################################################# +# +# include dummy dependency file +# *MUST* be last includefile +include build/dummy.d +############################################################# + # targets +.PHONY: alilibs aliroot makedistr clean + modules: $(patsubst %,%/module.mk,$(MODULES)) -aliroot: $(BINPATH) $(ALLEXECS) alilibs bin headers +aliroot: $(BINPATH) $(ALLEXECS) alilibs bin -headers: $(EXPORTFILES) +#haders: $(EXPORTFILES) -alilibs: $(LIBPATH) $(ALLLIBS) lib headers modules +alilibs: $(LIBPATH) $(ALLLIBS) lib modules # Single Makefile "distribution": Makefile + modules + mkdepend scripts makedistr: $(MODULES) @@ -193,8 +210,21 @@ $(LIBPATH): @echo "***** Making $@ *****" mkdir -p $@ - -cleanall: clean-modules +build/dummy.d: $(EXPORTFILES) + @(if [ ! -f $@ ] ; then \ + touch $@; \ + fi) + +clean: + @echo "***** No targen clean, use on of these *****" + @echo " clean-aliroot : Clean up all aliroot libraries" + @echo " clean-MODULENAME : Clean everything from module MODULENAME" + @echo " clean-all : Cleans up everything, including cern libraires" + @echo " clean-modules : Clean all module.mk file in all modules" + @echo " clean-libs : Clean all libraries (not object files)" + @echo "********************************************" + +clean-all: clean-modules @echo "***** Cleaning up everything ****" rm -rf $(patsubst %,%/module.mk,$(MODULES)) rm -rf $(patsubst %,%/tgt_$(ALICE_TARGET),$(MODULES)) @@ -202,7 +232,9 @@ cleanall: clean-modules rm -rf bin/tgt_$(ALICE_TARGET) rm -rf $(EXPORTDIR) -clean: clean-modules clean-objects clean-libs clean-bins clean-ditcs +#This cleans only libraries that are not CERN-libraries + +clean-aliroot: $(patsubst %,%/module.mk,$(ALIROOTMODULES)) $(patsubst %,clean-%,$(ALIROOTMODULES)) clean-dicts: @echo "***** Cleaning up G__ files *****" -- 2.43.0