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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13402
f5534014-38df-0310-8fa8-
9805f1628bb7
dftest_LDFLAGS = -export-dynamic
-CLEANFILES = \
- svnversion.h \
- @rdps_bin@ \
- idl2eth
+#
+# XXX - "svnversion.h" is distributed in the release tarball; should
+# we be deleting it with "make clean", or should we only do that with
+# "make maintainer-clean"?
+#
+CLEANFILES = \
+ svnversion.h \
+ @rdps_bin@ \
+ idl2eth \
+ *~
+#
+# XXX - "ps.c" is distributed in the source tarballs; why is it in the
+# list of files removed by "make distclean"? (It's deliberately
+# included in that list.)
+#
DISTCLEANFILES = \
- ps.c \
- *~
+ ps.c
MAINTAINERCLEANFILES = \
- ps.c
+ $(GENERATED_FILES)
EXTRA_DIST = \
AUTHORS-SHORT \
x264_prt_id.h
# "BUILT_SOURCES" are built before any "make all" or "make check" targets.
-BUILT_SOURCES = \
- svnversion.h \
+BUILT_HEADER_FILES = \
+ svnversion.h
+
+BUILT_C_FILES = \
ps.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) \
+ tethereal-tap-register.c
+
+# All the generated files.
+GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
+
# sources common for ethereal and tethereal
ETHEREAL_COMMON_SRC = \
$(PLATFORM_SRC) \
include Makefile.common
-BUILT_SOURCES = $(BUILT_SOURCES) \
- svnversion.h
-
ethereal_OBJECTS = $(ethereal_SOURCES:.c=.obj)
tethereal_OBJECTS = $(tethereal_SOURCES:.c=.obj)
dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../..
-# Call distclean only, if you would like to remove ALL generated files.
-# Be sure to have python and perl installed to regenerate them.
+# "distclean" removes all files not part of the distribution.
+# It does not remove generated files that are part of the distribution.
distclean: clean gtk2_distclean
- rm -f $(BUILT_SOURCES) \
- tethereal-tap-register.c
+ rm -f config.h $(BUILT_SOURCES)
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../gtk
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../..
+# Make "maintainer-clean" only if you would like to remove ALL generated
+# files.
+# Be sure to have python and perl installed to regenerate them.
+maintainer-clean: distclean
+ rm -f $(GENERATED_FILES)
+ cd wiretap
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../gtk
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../epan
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../plugins
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../tools
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../image
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../doc
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../help
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../packaging/nsis
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../..
+
tools::
cd tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake xyzzy
cd ..
-
rm -f pod2htm*
distclean: clean
+
+maintainer-clean: distclean
libethereal.la \
*~
-MAINTAINERCLEANFILES = \
- register.c \
- ../packet-ncp2222.c
-
#
# Add the object files for missing routines, if any.
#
$(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
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
#dist-hook:
# @rm -f $(distdir)/register.c
-
-MAINTAINERCLEANFILES = \
- register.c \
- packet-ncp2222.c
-
CLEANFILES = \
libdissectors.a \
libdissectors.la \
$(GENERATED_HEADER_FILES) \
*~
+
+MAINTAINERCLEANFILES = \
+ $(GENERATED_FILES)
# 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 \
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)
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.
$(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS)
distclean: clean
- rm -f $(BUILT_SOURCES) packet-ncp2222.c register.c
+
+maintainer-clean: distclean
+ rm -f $(GENERATED_FILES)
ftypes.lib : $(OBJECTS)
link /lib /out:ftypes.lib $(OBJECTS)
-
clean:
rm -f $(OBJECTS) ftypes.lib $(PDB_FILE)
distclean: clean
+
+maintainer-clean: distclean
libui.a \
*~
+MAINTAINERCLEANFILES = \
+ $(GENERATED_FILES)
+
ethereal-tap-register.c: $(ETHEREAL_TAP_SRC) $(top_srcdir)/make-tapreg-dotc
@echo Making ethereal-tap-register.c
@$(top_srcdir)/make-tapreg-dotc ethereal-tap-register.c $(srcdir) $(ETHEREAL_TAP_SRC)
# 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.
+# (None, so far.)
+GENERATED_HEADER_FILES =
+
+# Generated C source files that we want in the distribution.
+GENERATED_C_FILES = \
+ ethereal-tap-register.c
+
+# All the generated files we want in the distribution.
+GENERATED_FILES = $(GENERATED_HEADER_FILES) $(GENERATED_C_FILES)
#
# ethclist.obj is not in here because it is currently gtk+-1.2-only
clean:
rm -f $(ETHEREAL_WIN32_GTK_OBJECTS) $(ETHEREAL_TAP_OBJECTS) libui.lib $(PDB_FILE) doxygen.cfg html/*.*
- if exist html rmdir html
+ if exist html rmdir html
distclean: clean
- rm -f ethereal-tap-register.c
+
+maintainer-clean: distclean
+ rm -f $(GENERATED_FILES)
# convert doxygen.cfg.in to doxygen.cfg with stamped version info
doxygen.cfg: ..\config.nmake doxygen.cfg.in
clean:
distclean: clean
+
+maintainer-clean: distclean
rm -f $(ALL_RC)
distclean: clean
+
+maintainer-clean: distclean
distclean: clean
+maintainer-clean: distclean
+
$(DOC):
cd ../../doc
$(MAKE) -f makefile.nmake
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ..
+maintainer-clean: distclean
+ cd acn
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../artnet
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../asn1
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../ciscosm
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../docsis
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../enttec
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../giop
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../gryphon
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../irda
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../lwres
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../mate
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../megaco
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../mgcp
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../opsi
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../pcli
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../rdm
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../rlm
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../rtnet
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../rudp
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../v5ua
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ..
rm -f $(OBJECTS) acn.dll acn.exp acn.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) agentx.dll agentx.exp agentx.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) artnet.dll artnet.exp artnet.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) asn1.dll asn1.exp asn1.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) ciscosm.dll ciscosm.exp ciscosm.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) docsis.dll docsis.exp docsis.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) enttec.dll enttec.exp enttec.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
coseventcomm.dll coseventcomm.exp coseventcomm.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) gryphon.dll gryphon.exp gryphon.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) irda.dll irda.exp irda.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) lwres.dll lwres.exp lwres.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) mate.dll mate.exp mate.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) megaco.dll megaco.exp megaco.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) mgcp.dll mgcp.exp mgcp.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) opsi.dll opsi.exp opsi.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) pcli.dll pcli.exp pcli.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) rdm.dll rdm.exp rdm.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) rlm.dll rlm.exp rlm.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) rtnet.dll rtnet.exp rtnet.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) rudp.dll rudp.exp rudp.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
rm -f $(OBJECTS) v5ua.dll v5ua.exp v5ua.lib *.pdb
distclean: clean
+
+maintainer-clean: distclean
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ..
+maintainer-clean: distclean
+ cd lemon
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ..
+
lemon::
cd lemon
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
rm -f lemon.obj lemon.exe lemon.ilk $(PDB_FILE) lemon.pdb
distclean: clean
+
+maintainer-clean: distclean
wiretap-$(WTAP_VERSION).dll \
$(PDB_FILE)
+#
+# We remove the generated files with "distclean" because one of them,
+# "ascend-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 "ascend-scanner.c" from "ascend-scanner.l" with Flex.
+# This might not be necessary for "ascend-grammar.{c,h}", but as
+# long as you need Flex, you might as well get Bison....
+#
distclean: clean
- rm -f config.h ascend-grammar.c ascend-grammar.h ascend-scanner.c
+ rm -f config.h $(GENERATED_FILES)
+
+maintainer-clean: distclean