]>
Commit | Line | Data |
---|---|---|
8356cc1d | 1 | #/************************************************************************** |
2 | # * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | # * * | |
4 | # * Author: Artur Szostak * | |
5 | # * Email: artur@alice.phy.uct.ac.za * | |
6 | # * * | |
7 | # * Permission to use, copy, modify and distribute this software and its * | |
8 | # * documentation strictly for non-commercial purposes is hereby granted * | |
9 | # * without fee, provided that the above copyright notice appears in all * | |
10 | # * copies and that both the copyright notice and this permission notice * | |
11 | # * appear in the supporting documentation. The authors make no claims * | |
12 | # * about the suitability of this software for any purpose. It is * | |
13 | # * provided "as is" without express or implied warranty. * | |
14 | # **************************************************************************/ | |
15 | ||
16 | include build/config.mk | |
17 | ||
18 | .PHONY : all debug verbose depend doc clean clean-all incmajor incminor incbuild dist debug-dist | |
19 | ||
20 | MODULES = $(wildcard $(BUILD_DIR)/*.module.mk) | |
21 | ||
22 | ############################################################################ | |
23 | ||
24 | all : $(MODULES) | |
25 | $(VERBOSE) for MODULE in $(MODULES) ; do $(MAKE) -f $$MODULE ; done | |
26 | ||
27 | ############################################################################ | |
28 | ||
29 | debug : | |
30 | @echo "---------- Entering debug build mode ----------" | |
31 | @$(MAKE) DEBUGGING=ON all | |
32 | ||
33 | ############################################################################ | |
34 | ||
35 | verbose : | |
36 | @echo "---------- Entering verbose build mode ----------" | |
37 | @$(MAKE) VERBOSE_MAKE=ON all | |
38 | ||
39 | ############################################################################ | |
40 | ||
41 | depend : $(MODULES) | |
42 | $(VERBOSE) for MODULE in $(MODULES) ; do $(MAKE) -f $$MODULE depend ; done | |
43 | ||
44 | ############################################################################ | |
45 | ||
46 | doc : | |
47 | ifndef VERBOSE_MAKE | |
48 | @echo "making source code documentation" | |
49 | endif | |
50 | $(VERBOSE) mkdir -p srcdoc/html/ | |
51 | $(VERBOSE) cp doc/doxygen/footer.html doc/doxygen/header.html doc/doxygen/style.css srcdoc/html/ | |
52 | $(VERBOSE) doxygen doc/doxygen/dHLTconfig | |
53 | ||
54 | ############################################################################ | |
55 | ||
56 | clean : | |
57 | ifndef VERBOSE_MAKE | |
58 | @echo "cleaning up $(OUTPUT_DIR)" | |
59 | endif | |
60 | $(VERBOSE) rm -f -r $(OUTPUT_DIR) | |
61 | ||
62 | ############################################################################ | |
63 | ||
64 | clean-all : clean | |
65 | ifndef VERBOSE_MAKE | |
66 | @echo "cleaning up $(BIN_DIR)" | |
67 | endif | |
68 | $(VERBOSE) rm -f -r $(BIN_DIR) | |
69 | ifndef VERBOSE_MAKE | |
70 | @echo "cleaning up $(LIB_DIR)" | |
71 | endif | |
72 | $(VERBOSE) rm -f -r $(LIB_DIR) | |
73 | ifndef VERBOSE_MAKE | |
74 | @echo "cleaning up $(INCLUDE_DIR)" | |
75 | endif | |
76 | $(VERBOSE) rm -f -r $(INCLUDE_DIR) | |
77 | $(VERBOSE) rm -f $(TOP_DIR)/core $(BIN_DIR)/core $(MACRO_DIR)/core | |
78 | ||
79 | ############################################################################ | |
80 | ||
81 | incmajor : | |
82 | ifndef VERBOSE_MAKE | |
83 | @echo Incrementing major version number. | |
84 | endif | |
85 | $(VERBOSE) let NUM=`cat $(SRC_DIR)/Version/major.number`+1 && echo $$NUM > $(SRC_DIR)/Version/major.number | |
86 | ||
87 | ############################################################################ | |
88 | ||
89 | incminor : | |
90 | ifndef VERBOSE_MAKE | |
91 | @echo Incrementing minor version number. | |
92 | endif | |
93 | $(VERBOSE) let NUM=`cat $(SRC_DIR)/Version/minor.number`+1 && echo $$NUM > $(SRC_DIR)/Version/minor.number | |
94 | ||
95 | ############################################################################ | |
96 | ||
97 | incbuild : $(MODULES) | |
98 | $(VERBOSE) for MODULE in $(MODULES) ; do \ | |
99 | $(MAKE) -q -f $$MODULE ; \ | |
100 | if test $$? -eq 1 ; then \ | |
101 | $(MAKE) -f $$MODULE incbuild ; \ | |
102 | fi; \ | |
103 | done | |
104 | ||
105 | ############################################################################ | |
106 | ||
107 | dist : incbuild | |
108 | @echo "Making distribution $(DISTRIBUTION_FILE)" | |
109 | $(VERBOSE) mkdir -p $(DISTRIBUTION_SUBDIR) | |
110 | $(VERBOSE) for MODULE in $(MODULES) ; do $(MAKE) -f $$MODULE create-distrib ; done | |
111 | $(VERBOSE) cp -r $(INCLUDE_DIR) $(DISTRIBUTION_SUBDIR)/ | |
112 | $(VERBOSE) cd $(DISTRIBUTION_DIR) && tar -czf $(TOP_DIR)/$(DISTRIBUTION_FILE) $(DISTRIBUTION_DIRNAME) | |
113 | ||
114 | ############################################################################ | |
115 | ||
116 | debug-dist : | |
117 | @$(MAKE) DEBUGGING=ON dist | |
118 |