[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with ansi2knr
From: |
Paul D. Smith |
Subject: |
Problems with ansi2knr |
Date: |
14 Oct 2002 16:25:12 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Hi all; I'm using automake 1.7 (with autoconf 2.54 and gettext 0.11.5).
I'm trying to add ansi2knr support so I can use ANSI function
definitions in GNU make.
I have special code to test the getloadavg.c, which builds a test
program using that code. The test program is embedded in the file, and
enabled with a -DTEST to get a main(), etc. I have this in my
Makefile.am:
AUTOMAKE_OPTIONS = 1.7 dist-bzip2 check-news ansi2knr
...
# The loadavg function is invoked during "make check" to test getloadavg.
noinst_PROGRAMS = loadavg
nodist_loadavg_SOURCES = loadavg.c
loadavg_CFLAGS = -DTEST
loadavg_LDADD = @GETLOADAVG_LIBS@
loadavg.c: $(srcdir)/getloadavg.c
cp $(srcdir)/getloadavg.c loadavg.c
This works for normal builds, but fails during builds without ANSI
compilers.
The problem is that when the rules to build loadavg-loadavg.o are
created, they depend on just loadavg.c, instead of loadavg$U.c.
For example:
loadavg-loadavg$U.$(OBJEXT): loadavg.c
...
loadavg-loadavg$U.o: loadavg.c
# if $(CC) $(DEFS) ...
source='loadavg.c' object='loadavg-loadavg$U.o' libtool=no \
...
I have a rule that constructs a loadavg_.c from loadavg.c:
loadavg_.c: loadavg.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) [...]
but it's never being invoked because the ...$U.o depends on the plain
....c instead of the ...$U.c.
Help?
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- Problems with ansi2knr,
Paul D. Smith <=