diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-02-14 20:33:57 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-02-14 20:33:57 +0000 |
commit | 6616a3770c6ba8f0154e9887f5179af59a8f4b2c (patch) | |
tree | 97ab3ed42dd7c943f067a2cb2243b19f8978aff5 /epan | |
parent | b4b5a4776fb35f7a4431055a1295f5f162e7b355 (diff) |
Make the "maintainer-clean" rules get rid of some additional generated
files. Do this with GENERATED_HEADER_FILES, GENERATED_C_FILES, and
GENERATED_FILES macros in Makefile.common files, along the lines of what
wiretap/Makefile.common has.
Clean up "*~" files with "make clean" rather than only "make distclean"
in some additional places.
Add "maintainer-clean" rules to the Makefile.nmake files, paralelling
the ones in the automake-generated Makefile.in files, using the
GENERATED_FILES macros from Makefile.common files. In some cases, move
the cleanup of files from "make distclean" to "make maintainer-clean",
and in other cases, put in a comment indicating why we're not doing that
(because some files that are distributed in the source tarballs, namely
Flex output, were built with a UN*X Flex and won't compile on Windows,
so we get rid of them with "make distclean" so you can clean up stuff
that *has* to be re-generated for Windows).
Clean up some *CLEANFILES definitions - get rid of ones that no longer
apply as files were moved or that add to the definition a name that's
already there.
svn path=/trunk/; revision=13402
Diffstat (limited to 'epan')
-rw-r--r-- | epan/Makefile.am | 4 | ||||
-rw-r--r-- | epan/Makefile.nmake | 9 | ||||
-rw-r--r-- | epan/dfilter/Makefile.nmake | 11 | ||||
-rw-r--r-- | epan/dissectors/Makefile.am | 8 | ||||
-rw-r--r-- | epan/dissectors/Makefile.common | 33 | ||||
-rw-r--r-- | epan/dissectors/Makefile.nmake | 5 | ||||
-rw-r--r-- | epan/ftypes/Makefile.nmake | 3 |
7 files changed, 50 insertions, 23 deletions
diff --git a/epan/Makefile.am b/epan/Makefile.am index 374a88e303..04fc221af7 100644 --- a/epan/Makefile.am +++ b/epan/Makefile.am @@ -61,10 +61,6 @@ CLEANFILES = \ libethereal.la \ *~ -MAINTAINERCLEANFILES = \ - register.c \ - ../packet-ncp2222.c - # # Add the object files for missing routines, if any. # diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake index 3c09327b2b..96a0335cca 100644 --- a/epan/Makefile.nmake +++ b/epan/Makefile.nmake @@ -93,6 +93,15 @@ distclean: clean $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean cd .. +maintainer-clean: distclean + cd ftypes + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean + cd ../dfilter + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean + cd ../dissectors + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean + cd .. + ftypes:: ..\config.h cd ftypes $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake diff --git a/epan/dfilter/Makefile.nmake b/epan/dfilter/Makefile.nmake index 21038114aa..8593e39dbe 100644 --- a/epan/dfilter/Makefile.nmake +++ b/epan/dfilter/Makefile.nmake @@ -47,9 +47,20 @@ $(OBJECTS): ..\..\config.h clean: rm -f $(OBJECTS) dfilter.lib $(PDB_FILE) +# +# We remove the generated files with "distclean" because one of them, +# "scanner.c", needs different #includes for UN*X and Windows +# (UN*X versions of Flex make it include <unistd.h>, but that's a +# UN*X-only header), so if you're going to build from source, you need +# to build "scanner.c" from "scanner.l" with Flex. +# This might not be necessary for "grammar.{c,h}", but we handle them +# the same for now. +# distclean: clean rm -f scanner.c grammar.c grammar.h grammar.out +maintainer-clean: distclean + scanner.c : scanner.l $(LEX) -Pdf_ -oscanner.c scanner.l diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am index 84c9b7513c..12a7a8f17b 100644 --- a/epan/dissectors/Makefile.am +++ b/epan/dissectors/Makefile.am @@ -105,13 +105,11 @@ register.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc $(srcdir)/mak #dist-hook: # @rm -f $(distdir)/register.c - -MAINTAINERCLEANFILES = \ - register.c \ - packet-ncp2222.c - CLEANFILES = \ libdissectors.a \ libdissectors.la \ $(GENERATED_HEADER_FILES) \ *~ + +MAINTAINERCLEANFILES = \ + $(GENERATED_FILES) diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common index 284f0b61fd..e486490dd0 100644 --- a/epan/dissectors/Makefile.common +++ b/epan/dissectors/Makefile.common @@ -23,13 +23,28 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# Generated header files that we want in the distribution. -# -GENERATED_HEADER_FILES = \ +# "BUILT_SOURCES" are built before any "make all" or "make check" targets. +BUILT_HEADER_FILES = \ x11-declarations.h \ x11-register-info.h +BUILT_C_FILES = \ + register.c + +BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_HEADER_FILES) + +# Header files generated from source files. +GENERATED_HEADER_FILES = \ + $(BUILT_HEADER_FILES) + +# C source files generated from source files. +GENERATED_C_FILES = \ + $(BUILT_C_FILES) \ + packet-ncp2222.c + +# All the generated files. +GENERATED_FILES = $(GENERATED_HEADER_FILES) $(GENERATED_C_FILES) + # the dissector sources (without any helpers) DISSECTOR_SRC = \ packet-3g-a11.c \ @@ -791,17 +806,13 @@ DISSECTOR_INCLUDES = \ packet-ypxfr.h \ $(GENERATED_HEADER_FILES) -# dissector helpers (needed from the dissectors, but not a dissector itself) +# Dissector helpers. They're included in the source files in this +# directory, but they're not dissectors themselves, i.e. they're not +# used to generate "register.c"). DISSECTOR_SUPPORT_SRC = \ packet-dcerpc-nt.c \ register.c -# "BUILT_SOURCES" are built before any "make all" or "make check" targets. -BUILT_SOURCES = \ - register.c \ - x11-declarations.h \ - x11-register-info.h - # this target needed for distribution only noinst_HEADERS = \ $(DISSECTOR_INCLUDES) diff --git a/epan/dissectors/Makefile.nmake b/epan/dissectors/Makefile.nmake index 28dd4562c3..d606401ad9 100644 --- a/epan/dissectors/Makefile.nmake +++ b/epan/dissectors/Makefile.nmake @@ -39,7 +39,6 @@ packet-x11.obj : packet-x11.c x11-declarations.h x11-register-info.h x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl $(PERL) process-x11-fields.pl <x11-fields - # # Build "register.c", which contains a function "register_all_protocols()" # that calls the register routines for all protocols. @@ -98,4 +97,6 @@ clean: $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) distclean: clean - rm -f $(BUILT_SOURCES) packet-ncp2222.c register.c + +maintainer-clean: distclean + rm -f $(GENERATED_FILES) diff --git a/epan/ftypes/Makefile.nmake b/epan/ftypes/Makefile.nmake index e64f9695e8..9408c4fba6 100644 --- a/epan/ftypes/Makefile.nmake +++ b/epan/ftypes/Makefile.nmake @@ -32,8 +32,9 @@ OBJECTS = \ ftypes.lib : $(OBJECTS) link /lib /out:ftypes.lib $(OBJECTS) - clean: rm -f $(OBJECTS) ftypes.lib $(PDB_FILE) distclean: clean + +maintainer-clean: distclean |