Ethereal-dev: [Ethereal-dev] Fix Makefile.am issues with latest automake

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

From: Nathan Neulinger <nneul@xxxxxxx>
Date: Thu, 10 May 2001 09:09:19 -0500
The variables ETHEREAL_COMMON_SOURCES and DISSECTOR_SOURCES conflict with 
automake reserved variables of the form target_SOURCES, which devel 
automake now complains about. (It sees you define a list of sources to 
build a automake target, and then you never use that target w/ automake.)

This patch changes those to ETHEREAL_COMMON_SRC and DISSECTOR_SRC.

Might consider changing that to ETHEREAL_COMMON_FILES DISSECTOR_FILES.

Snippet from new automake:

----
# See if any _SOURCES variable were misspelled.  Also, make sure that
# EXTRA_ variables don't contain configure substitutions.
sub check_typos
{
    foreach my $varname (keys %var_value)
    {
        foreach my $primary ('_SOURCES', '_LIBADD', '_LDADD', '_LDFLAGS',
                             '_DEPENDENCIES')
        {
            if ($varname =~ /$primary$/ && ! $content_seen{$varname})
            {
                &am_line_error ($varname,
                                "invalid unused variable name: `$varname'");
            }
        }
    }
}
----


-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@xxxxxxx
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216
Index: Makefile.am
===================================================================
RCS file: /cvsroot/ethereal/Makefile.am,v
retrieving revision 1.316
diff -u -r1.316 Makefile.am
--- Makefile.am	2001/05/07 20:49:48	1.316
+++ Makefile.am	2001/05/10 14:06:05
@@ -69,7 +69,7 @@
 
 sysconf_DATA = manuf
 
-DISSECTOR_SOURCES = \
+DISSECTOR_SRC = \
 	packet-aarp.c  \
 	packet-afs.c   \
 	packet-aim.c   \
@@ -340,7 +340,7 @@
 	packet-ypserv.h \
 	packet-ypxfr.h 
 
-ETHEREAL_COMMON_SOURCES = \
+ETHEREAL_COMMON_SRC = \
 	aftypes.h      \
 	alignment.h    \
 	asn1.c         \
@@ -385,8 +385,8 @@
 	x11-register-info.h
 
 ethereal_SOURCES = \
-	$(DISSECTOR_SOURCES) \
-	$(ETHEREAL_COMMON_SOURCES) \
+	$(DISSECTOR_SRC) \
+	$(ETHEREAL_COMMON_SRC) \
 	capture.c      \
 	capture.h      \
 	file.c         \
@@ -473,8 +473,8 @@
 ethereal_static_LDFLAGS = -Wl,-static
 
 tethereal_SOURCES = \
-	$(DISSECTOR_SOURCES) \
-	$(ETHEREAL_COMMON_SOURCES) \
+	$(DISSECTOR_SRC) \
+	$(ETHEREAL_COMMON_SRC) \
 	tethereal.c
 
 tethereal_static_SOURCES = \
@@ -557,9 +557,9 @@
 # The first argument is the directory in which the source files live.
 # All subsequent arguments are the files to scan.
 #
-register.c: $(DISSECTOR_SOURCES) $(srcdir)/make-reg-dotc
+register.c: $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
 	@echo Making register.c
-	@$(srcdir)/make-reg-dotc $(srcdir) $(DISSECTOR_SOURCES)
+	@$(srcdir)/make-reg-dotc $(srcdir) $(DISSECTOR_SRC)
 
 ps.c: print.ps rdps
 	./rdps $(srcdir)/print.ps ps.c
@@ -575,8 +575,8 @@
 
 
 dftest_SOURCES = \
-	$(DISSECTOR_SOURCES) \
-	$(ETHEREAL_COMMON_SOURCES) \
+	$(DISSECTOR_SRC) \
+	$(ETHEREAL_COMMON_SRC) \
 	dftest.c
 
 dftest_additional_libs =		\