Ethereal-dev: [Ethereal-dev] [PATCH][CYGWIN]Default binaries targets

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Loïc Minier <lool+ethereal@xxxxxxxxxx>
Date: Mon, 17 Nov 2003 14:58:34 +0100
   Continuing on Cygwin's, the build feels better and better, thanks
 Olivier and Guy! However, compiling with "make" fails because:
 make[2]: *** No rule to make target `ethereal', needed by `all-am'.  Stop.

 Chain of rules is:
 (default)
 all: all-redirect
 all-redirect: all-recursive-am
 all-recursive-am: config.h
         $(MAKE) $(AM_MAKEFLAGS) all-recursive
 all-recursive [...]:
         [...]
         $(MAKE) $(AM_MAKEFLAGS) all-am
 all-am: Makefile $(PROGRAMS) [...]

 The heck is that $(PROGRAMS) is set to $(bin_PROGRAMS) which in turn
 resolves with:
 bin_PROGRAMS = ethereal editcap mergecap tethereal   text2pcap

 This is the result of Makefile.in having:
 bin_PROGRAMS = @ethereal_bin@ @editcap_bin@ @mergecap_bin@ \
    @tethereal_bin@ @dftest_bin@ @randpkt_bin@ @text2pcap_bin@

 And in configure, we have:
 ethereal_bin="ethereal"

 There are multiple ways to fix this, however the greatest challenge
 seems to be in the backward compatibility with older autoconf/automake
 revisions. Since with autoconf 2.13 + automake 1.4-p6 and with autoconf
 2.57 + automake 1.7.8 I managed to generate a Makefile with:
 ethereal_bin = ethereal$(EXEEXT)
 and with EXEEXT correctly defined, it seems the attached patch fixes
 this. I've only changed the *_bin= non-empty definitions in
 configure.in to include $(EXEEXT) in the Makefile.

     Kind regards,

-- 
Lo�c Minier <lool@xxxxxxxx>
Index: configure.in
===================================================================
RCS file: /cvsroot/ethereal/configure.in,v
retrieving revision 1.230
diff -u -b -r1.230 configure.in
--- configure.in	2 Nov 2003 23:36:01 -0000	1.230
+++ configure.in	17 Nov 2003 13:56:30 -0000
@@ -271,7 +271,7 @@
 		AM_PATH_GLIB(1.2.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib distribution not found.), gmodule)
 	fi
 else
-	ethereal_bin="ethereal"
+	ethereal_bin="ethereal\$(EXEEXT)"
 	ethereal_man="ethereal.1"
         ethereal_SUBDIRS="gtk"
 	# Honor GLIB_CFLAGS
@@ -329,7 +329,7 @@
 [  --enable-tethereal      build tethereal.  [default=yes]],tethereal=$enableval,enable_tethereal=yes)
 
 if test "x$enable_tethereal" = "xyes" ; then
-	tethereal_bin="tethereal"
+	tethereal_bin="tethereal\$(EXEEXT)"
 	tethereal_man="tethereal.1"
 	etherealfilter_man="ethereal-filter.4"
 else
@@ -348,7 +348,7 @@
 [  --enable-editcap        build editcap.  [default=yes]],enable_editcap=$enableval,enable_editcap=yes)
 
 if test "x$enable_editcap" = "xyes" ; then
-	editcap_bin="editcap"
+	editcap_bin="editcap\$(EXEEXT)"
 	editcap_man="editcap.1"
 else
 	editcap_bin=""
@@ -364,7 +364,7 @@
 [  --enable-mergecap       build mergecap.  [default=yes]],enable_mergecap=$enableval,enable_mergecap=yes)
 
 if test "x$enable_mergecap" = "xyes" ; then
-	mergecap_bin="mergecap"
+	mergecap_bin="mergecap\$(EXEEXT)"
 	mergecap_man="mergecap.1"
 else
 	mergecap_bin=""
@@ -380,7 +380,7 @@
 [  --enable-text2pcap      build text2pcap.  [default=yes]],text2pcap=$enableval,enable_text2pcap=yes)
 
 if test "x$enable_text2pcap" = "xyes" ; then
-	text2pcap_bin="text2pcap"
+	text2pcap_bin="text2pcap\$(EXEEXT)"
 	text2pcap_man="text2pcap.1"
 else
 	text2pcap_bin=""
@@ -395,7 +395,7 @@
 [  --enable-idl2eth        build idl2eth.  [default=yes]],enable_idl2eth=$enableval,enable_idl2eth=yes)
 
 if test "x$enable_idl2eth" = "xyes" ; then
-	idl2eth_bin="idl2eth"
+	idl2eth_bin="idl2eth\$(EXEEXT)"
 	idl2eth_man="idl2eth.1"
 else
 	idl2eth_bin=""
@@ -411,7 +411,7 @@
 [  --enable-dftest         build dftest.  [default=no]],enable_dftest=$enableval,enable_dftest=no)
 
 if test "x$enable_dftest" = "xyes" ; then
-	dftest_bin="dftest"
+	dftest_bin="dftest\$(EXEEXT)"
 else
 	dftest_bin=""
 fi
@@ -424,7 +424,7 @@
 [  --enable-randpkt        build randpkt.  [default=no]],enable_randpkt=$enableval,enable_randpkt=no)
 
 if test "x$enable_randpkt" = "xyes" ; then
-	randpkt_bin="randpkt"
+	randpkt_bin="randpkt\$(EXEEXT)"
 else
 	randpkt_bin=""
 fi