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