Browse code

- don't try to build dependencies or lex/yacc stuff unless it's really necessary (makefile target != clean,doc,modules, a.s.o ; for the complete long list see Makefile.targets)

Andrei Pelinescu-Onciul authored on 26/06/2008 09:07:35
Showing 2 changed files
... ...
@@ -210,10 +210,15 @@ clean_doxygen:
210 210
 TAGS:
211 211
 	$(MKTAGS) 
212 212
 	
213
+	
214
+	
213 215
 ifeq (,$(MAKECMDGOALS))
214 216
 -include $(depends)
217
+else
218
+ifeq (,$(strip $(nodep_targets)))
219
+include Makefile.targets
215 220
 endif
216
-ifneq (,$(filter-out clean proper distclean realclean mantainer-clean TAGS \
217
-		tar modules, $(MAKECMDGOALS)))
221
+ifneq (,$(filter-out $(nodep_targets),$(MAKECMDGOALS)))
218 222
 -include $(depends)
219 223
 endif
224
+endif # ifeq (,$(MAKECMDGOALS))
220 225
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+
1
+#
2
+# $Id$
3
+#
4
+#
5
+# Makefile targets that should be treated specially, 
6
+# e.g.:  non obj/executable affecting targets => don't build dependencies for
7
+#  them or don't try any action that would be useful only for generating
8
+#  actual code
9
+#
10
+# History:
11
+# --------
12
+#  2008-06-26  initial version (andrei) 
13
+#
14
+
15
+clean_targets:=	clean proper distclean realclean mantainer-clean clean_libs
16
+doc_targets:=	modules-doc modules-readme README modules-man man \
17
+		install-doc install-modules-doc install-man
18
+# auxiliary: maintance, debugging, etc. (don't affect code/objects)
19
+aux_targets:=	TAGS tar dist print-modules dbg dbinstall \
20
+		librpath.lst makecfg.lst
21
+# other targets that don't produce code in the current directory ("external")
22
+ext_targets:=	modules libs utils \
23
+		install-cfg install-modules install-utils  install-modules-all \
24
+		install-share 
25
+
26
+# all the targets that don't require code dependecies in the current dir.
27
+nodep_targets:=	$(clean_targets) $(doc_targets) $(aux_targets) $(ext_targets)
28
+