Browse code

backported from stable: - make proper deletes also cfg.tab.h - make tar excludes the auto generated files

Andrei Pelinescu-Onciul authored on 02/11/2005 17:56:42
Showing 2 changed files
... ...
@@ -31,7 +31,8 @@
31 31
 #               referred in the man pages
32 32
 #
33 33
 
34
-auto_gen=lex.yy.c cfg.tab.c   #lexx, yacc etc
34
+auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
35
+auto_gen_others=cfg.tab.h  # auto generated, non-c
35 36
 
36 37
 #include  source related defs
37 38
 include Makefile.sources
... ...
@@ -113,6 +114,8 @@ export PREFIX LOCALBASE
113 113
 #export INSTALL INSTALL-CFG INSTALL-BIN INSTALL-MODULES INSTALL-DOC INSTALL-MAN 
114 114
 #export INSTALL-TOUCH
115 115
 
116
+tar_extra_args+=$(addprefix --exclude=$(notdir $(CURDIR))/, \
117
+					$(auto_gen) $(auto_gen_others))
116 118
 ifneq ($(TLS),)
117 119
 	tar_extra_args+=
118 120
 else
... ...
@@ -6,8 +6,8 @@
6 6
 #
7 7
 
8 8
 #
9
-# Uses: NAME, ALLDEP, CC, CFLAGS, DEFS, LIBS, MKDEP, auto_gen, depends, objs,
10
-# extra_objs, static_modules, static_modules_path
9
+# Uses: NAME, ALLDEP, CC, CFLAGS, DEFS, LIBS, MKDEP, auto_gen, auto_gen_others,
10
+# depends, objs, extra_objs, static_modules, static_modules_path
11 11
 # (all this must  be defined previously!,  see Makefile.defs & Makefile)
12 12
 #
13 13
 
... ...
@@ -55,7 +55,7 @@ clean:
55 55
 .PHONY: distclean
56 56
 .PHONY: realclean
57 57
 proper realclean distclean: clean 
58
-	-@rm -f $(depends) $(auto_gen) 2>/dev/null
58
+	-@rm -f $(depends) $(auto_gen) $(auto_gen_others) 2>/dev/null
59 59
 	-@for r in $(modules) "" ; do \
60 60
 		if [ -d "$$r" ]; then \
61 61
 			 $(MAKE) -C $$r proper ; \