Ethereal-dev: [Ethereal-dev] Problems with := in Makefile.am
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 21 Oct 2004 10:08:31 -0700
Liu Chunfang-CCL083 wrote:
You need to change the Makefile under dir:/psc/proj/gsm/gprs/rlcmac/ethereal-0.10.6/ethereal/epan/dissectors. Find the line 987, in the next line, there are two lines including sign ":=". Just change ":=" to "=", then you can biuld. I've tried. It worked fine. Chunfang -----Original Message----- From: ethereal-users-bounces@xxxxxxxxxxxx [mailto:ethereal-users-bounces@xxxxxxxxxxxx] On Behalf Of harsha ss Sent: Thursday, October 21, 2004 8:40 AM To: ethereal-users@xxxxxxxxxxxx Subject: [Ethereal-users] Problem in installing etherealHi,I am trying to install ethereal on solaris machine. The versioon of ethereal i am trying to install is ethereal-0.10.6 Configure is working fine.I am getting the problem in make.This is the message i am getting when i run make.Please help me if anybody knows this problem. /cadappl/bin/perl ./make-version.pl This is not a SVN build. svnversion.h is up-to-date. make all-recursive Making all in tools Making all in lemon Making all in wiretap make all-am Making all in doc Making all in epan Making all in ftypes Making all in dfilter Making all in dissectors make: Fatal error in reader: Makefile, line 987: Unexpected end of line seen Current working directory /psc/proj/gsm/gprs/rlcmac/ethereal-0.10.6/ethereal/epan/dissectors *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /psc/proj/gsm/gprs/rlcmac/ethereal-0.10.6/ethereal/epan *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /psc/proj/gsm/gprs/rlcmac/ethereal-0.10.6/ethereal *** Error code 1 make: Fatal error: Command failed for target `all'
So why are we using := rather than = in # # Build various header files for the X11 dissector. # PROC_X11_FIELDS := $(srcdir)/process-x11-fields.pl X11_FIELDS := $(srcdir)/x11-fieldsAccording to the SunOS 5.6 man page (at least as shown on the FreeBSD Web site), := is used in "conditional macro definitions":
Conditional Macro Definitions A macro definition of the form: target-list := macro = value indicates that when processing any of the targets listed and their dependencies, macro is to be set to the value supplied. Note that if a conditional macro is referred to in a dependency list, the $ must be delayed (use $$ instead). Also, target-list may contain a % pattern, in which case the macro will be conditionally defined for all targets encountered that match the pattern. A pattern replacement reference can be used within the value. whereas the GNU Make manual says it sets a "siimply expanded variable": Simply expanded variables are defined by lines using `:=' (see sectionSetting Variables). The value of a simply expanded variable is scanned once and for all, expanding any references to other variables and functions, when the variable is defined. The actual value of the simply expanded variable is the result of expanding the text that you write. It does not contain any references to other variables; it contains their values as of the time this variable was defined. Therefore,
x := foo y := $(x) bar x := later is equivalent to y := foo bar x := laterWhen a simply expanded variable is referenced, its value is substituted verbatim.
Given that := isn't a standard make feature (and means different things in different versions of make), we should avoid it - the version of Makefile.in distributed in the source tarballs should *NOT* require GNU make (automake attempts *NOT* to require GNU make in the version of Makefile.in generated by "make dist", even though you *do* need GNU make for the Makefile.in generated if you're building from SVN).
- Follow-Ups:
- Re: [Ethereal-dev] Problems with := in Makefile.am
- From: Guy Harris
- Re: [Ethereal-dev] Problems with := in Makefile.am
- Prev by Date: [Ethereal-dev] Problem with get_host_ipaddr in addr_resolv.c for win32
- Next by Date: Re: [Ethereal-dev] Extract data from Ethereal
- Previous by thread: Re: [Ethereal-dev] Problem with get_host_ipaddr in addr_resolv.c for win32
- Next by thread: Re: [Ethereal-dev] Problems with := in Makefile.am
- Index(es):