Added test for existence in the dtor
[u/mrichter/AliRoot.git] / Makefile
CommitLineData
fe4da5cc 1############################### Main Makefile #################################
2
3# Include machine specific definitions
4
5include $(ALICE_ROOT)/conf/GeneralDef
6include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
7
08301132 8MAKEFLAGS += -s
fe4da5cc 9
10##### MACROS #####
11
12PACKAGE = Main
13
47b969ba 14DOTS = " ................................................................................"
15
16PRETTY = awk '{print $$0 substr($(DOTS),1,79-length($$0))}'
17
fe4da5cc 18##### Module libraries #####
19
09898eb4 20ALIROOT_DIRS = STEER TGeant3 TRD PHOS TPC ZDC MUON PMD FMD TOF ITS \
44c62722 21 CASTOR RICH START STRUCT EVGEN RALICE
fe4da5cc 22
23##### TARGETS #####
24
25default: lib bin alilibs aliroot
26
27lib bin:
28 @mkdir $@
29
30alilibs: lib
47b969ba 31 for i in $(ALIROOT_DIRS) ; do \
32 echo "Making headers in $$i" | $(PRETTY); \
31ccd13b 33 ${MAKE} -C $$i headers ; \
47b969ba 34 done
31ccd13b 35 @for i in $(ALIROOT_DIRS) ; do \
47b969ba 36 echo "Making dependencies in $$i" | $(PRETTY); \
fe4da5cc 37 ${MAKE} -C $$i depend ; \
38 done
39 @for i in $(ALIROOT_DIRS) ; do \
47b969ba 40 echo "Making in $$i" | $(PRETTY); \
fe4da5cc 41 ${MAKE} -C $$i ; \
42 done
43
47b969ba 44aliroot geant321 minicern pdf pythia: bin
45 @DIR=`echo $@ | awk '{print toupper($$0)}'` ; \
46 echo "Making dependencies in $$DIR" | $(PRETTY); \
47 ${MAKE} -C $$DIR depend;\
48 echo "Making in $$DIR" | $(PRETTY); \
49 ${MAKE} -C $$DIR
fe4da5cc 50
51cernlibs: geant321 pythia minicern pdf
52
b83f95da 53all: cernlibs default
fe4da5cc 54
55FORCE:
56
57############################### General Macros ################################
58
59include $(ALICE_ROOT)/conf/GeneralMacros
60
61############################### Specific Macros ###############################
62
63STRUCT_DIRS = html conf macros data share include Euclid picts \
4bff45ae 64 doc etc Makefile .rootrc
fe4da5cc 65
66LIBRARY_DIRS = MINICERN GEANT321 PYTHIA PDF
67
6ac62af5 68dist: AliRoot$(VERSION).tar.gz
fe4da5cc 69
6ac62af5 70AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
fe4da5cc 71
6ac62af5 72distall: AliOffline$(VERSION).tar.gz
fe4da5cc 73
6ac62af5 74AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
fe4da5cc 75
6ac62af5 76distlib: AliLibs$(VERSION).tar.gz
fe4da5cc 77
6ac62af5 78AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
fe4da5cc 79
6ac62af5 80AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
fe4da5cc 81 @rm -f $(ALICE)/$@
82 @rm -f `find . -name '*~' -print` \
83 `find . -name '*.bak' -print` \
cec56ef0 84 `find . -name '.*~' -print` \
18778aed 85 `find . -name '*\#*' -print`
fe4da5cc 86 @rm -f /tmp/saves
87 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
88 @cd $(ALICE) ; \
89 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
e9fe1fae 90 --exclude 'roothtml' --exclude 'CVS' \
ce7c8058 91 --exclude Make-depend --exclude '*html/gif' \
ee854967 92 --exclude "*tgt_*" --exclude check \
ce7c8058 93 `cat /tmp/saves`
fe4da5cc 94
fe4da5cc 95htmldocnew: FORCE
96 @for i in $(ALIROOT_DIRS) ; do \
97 echo "Making HTML doc for $$i" ; \
98 rm -rf $(ALICE_ROOT)/$$i/html ; \
99 cd $(ALICE_ROOT)/$$i ; \
100 aliroot -b -q mkhtml.C > /dev/null; \
101 for j in `ls *.C` ; do \
102 echo $$j ; \
103 aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
104 done \
105 done
106
107
108htmldoc: FORCE
109 @rm -rf html/roothtml
e95543bd 110 @rm -f html/picts
fe4da5cc 111 @rm -f /tmp/macros
112 @cd html ;\
113 aliroot -q -b "mkhtml.C(0,1)" ;\
114 ls ../macros/*.C > /tmp/macros ;\
115 for i in $(ALIROOT_DIRS) ; do \
116 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
117 done ;\
118 for i in `cat /tmp/macros` ; do \
119 echo $$i ; \
120 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
121 done ;\
122 ./makeExampleList ;
1439f98e 123 @ln -s ../picts html/picts
124 @ln -s ../../picts html/roothtml/picts
125 @ln -s ../../../picts html/roothtml/src/picts
126 @ln -s ../../../picts html/roothtml/examples/picts
fe4da5cc 127
128clean: FORCE
129 @rm -f *~ \#*
8881bdd2 130 @for i in $(ALIROOT_DIRS) ALIROOT ; do \
fe4da5cc 131 ${MAKE} -C $$i macroclean ; \
132 done
133
134libclean: FORCE
135 @rm -f *~ \#*
136 @for i in $(LIBRARY_DIRS) ; do \
137 ${MAKE} -C $$i macroclean ; \
138 done
139
140allclean: libclean clean
41f6cf69 141
142# IRST coding rule check
143CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT
144check:
145 @for i in $(CHECK_DIRS) ; do \
146 echo "Checking $$i" ; \
147 ${MAKE} -C $$i check ; \
148 done
149
150
151
152
153
154
155
156