Ethereal-dev: [Ethereal-dev] Makefile.common (Was: cvs commit: ethereal Makefile.nmake)
On Sat, Jan 17, 2004 at 09:09:47PM -0800, Guy Harris wrote:
> On Sun, Jan 18, 2004 at 06:06:44AM +0100, Joerg Mayer wrote:
> > Just wondering: Is it possible to have a common Makefile.common that
> > declares the file lists common to both Windows and Unix and include
> > that into Makefile.nmake and Makefile.am?
>
> I don't know whether automake supports that sort of inclusion.
I've attached a sample patch for autoconf/automake. In case we required
GNU make, it could be done much simpler by adding "include Makefile.common"
to Makefile.am which would still be in Makefile, so no requirement to run
automake and configure again for new dissectors.
ciao
Jörg
--
Joerg Mayer <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/ethereal/Makefile.am,v
retrieving revision 1.697
diff -p -u -r1.697 Makefile.am
--- Makefile.am 18 Jan 2004 03:49:16 -0000 1.697
+++ Makefile.am 18 Jan 2004 13:36:36 -0000
@@ -69,6 +69,10 @@ man_MANS =
EXTRA_PROGRAMS = ethereal tethereal editcap mergecap dftest text2pcap
EXTRA_SCRIPTS = idl2eth
+# Include Makefile.common start
+@MAKE_COMMON@
+# Include Makefile.common end
+
#
# Ethereal configuration files are put in $(pkgdatadir). It currently
# contains the "manuf" file and a "diameter" directory.
Index: Makefile.common
===================================================================
RCS file: Makefile.common
diff -N Makefile.common
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Makefile.common 18 Jan 2004 13:36:36 -0000
@@ -0,0 +1,27 @@
+# Makefile.common
+# Contains the stuff from Makefile.am and Makefile.nmake that is
+# a) common to both files and
+# b) portable between both files
+#
+# $Id $
+#
+# Ethereal - Network traffic analyzer
+# By Gerald Combs <gerald@xxxxxxxxxxxx>
+# Copyright 1998 Gerald Combs
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Just an empty stub for now, testing only
+TEST = test
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/ethereal/configure.in,v
retrieving revision 1.244
diff -p -u -r1.244 configure.in
--- configure.in 10 Jan 2004 16:50:52 -0000 1.244
+++ configure.in 18 Jan 2004 13:36:37 -0000
@@ -868,6 +868,9 @@ then
fi
AC_SUBST(ENABLE_STATIC)
+MAKE_COMMON=Makefile.common
+AC_SUBST_FILE(MAKE_COMMON)
+
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SUBDIRS(epan wiretap)
AC_OUTPUT(