From 008af4194627f2026f9a66f38953724c0c364c81 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Thu, 8 May 2003 21:11:33 +0000 Subject: [PATCH] Make configure understand CPPFLAGS=, CFLAGS=, LDFLAGS=... --- CHANGES | 6 +++++- THANKS | 3 ++- common/Makefile.in | 8 ++++++-- compat/lib/Makefile.in | 7 +++++-- dump/Makefile.in | 12 ++++++++---- restore/Makefile.in | 12 ++++++++---- rmt/Makefile.in | 16 ++++++++++------ 7 files changed, 44 insertions(+), 20 deletions(-) diff --git a/CHANGES b/CHANGES index 3fad0c5..47eead2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.229 2003/05/07 14:45:18 stelian Exp $ +$Id: CHANGES,v 1.230 2003/05/08 21:11:33 stelian Exp $ Changes between versions 0.4b34 and 0.4b35 (released ??????????????) ==================================================================== @@ -8,6 +8,10 @@ Changes between versions 0.4b34 and 0.4b35 (released ??????????????) Thanks to Antonios Christofides for the patch. +2. Fixed configure to correctly understand CPPFLAGS, CFLAGS, + LDFLAGS environment variables. Thanks to Arcady Genkin + for reporting the bug. + Changes between versions 0.4b33 and 0.4b34 (released April 18, 2003) ==================================================================== diff --git a/THANKS b/THANKS index a414702..cd3a3ad 100644 --- a/THANKS +++ b/THANKS @@ -1,4 +1,4 @@ -$Id: THANKS,v 1.81 2003/05/07 14:45:18 stelian Exp $ +$Id: THANKS,v 1.82 2003/05/08 21:11:33 stelian Exp $ Dump and restore were written by the people of the CSRG at the University of California, Berkeley. @@ -47,6 +47,7 @@ Bernhard Erdmann bernhard.erdmann@gmx.de Jason Fearon jasonf@netrider.org.au Jeremy Fitzhardinge jeremy@goop.org Eirik Fuller eirik@netcom.com +Arcady Genkin antipode@users.sourceforge.net Uwe Gohlke uwe@ugsoft.de Ian Gordon iangordon@users.sourceforge.net Ted Grzesik tedgyz@roostme.com diff --git a/common/Makefile.in b/common/Makefile.in index b8a5d32..80ea04d 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.4 2003/01/24 11:01:48 stelian Exp $ +# $Id: Makefile.in,v 1.5 2003/05/08 21:11:39 stelian Exp $ top_srcdir= @top_srcdir@ srcdir= @srcdir@ @@ -7,10 +7,14 @@ top_builddir= .. @MCONFIG@ INC= -I$(top_srcdir)/dump -CFLAGS= @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) +ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) @DUMPDEBUG@ +ALL_LDFLAGS= @LDFLAGS@ @LDOPTS@ @STATIC@ SRCS= dumprmt.c OBJS= dumprmt.o +.c.o: + $(CC) -c $(ALL_CFLAGS) $< -o $@ + all:: $(OBJS) install:: diff --git a/compat/lib/Makefile.in b/compat/lib/Makefile.in index ee6e26b..cc90969 100644 --- a/compat/lib/Makefile.in +++ b/compat/lib/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.9 2003/03/31 09:42:57 stelian Exp $ +# $Id: Makefile.in,v 1.10 2003/05/08 21:11:39 stelian Exp $ top_srcdir= @top_srcdir@ srcdir= @srcdir@ @@ -7,11 +7,14 @@ top_builddir= ../.. @MCONFIG@ INC= -I$(top_srcdir)/compat/include -CFLAGS= @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) +ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) SRCS= compaterr.c compatglob.c bylabel.c system.c rmtflags.c minilzo.c OBJS= compaterr.o compatglob.o bylabel.o system.o rmtflags.o minilzo.o LIB= libcompat.a +.c.o: + $(CC) -c $(ALL_CFLAGS) $< -o $@ + all:: $(LIB) $(LIB): $(OBJS) diff --git a/dump/Makefile.in b/dump/Makefile.in index e90dc28..a8a2b15 100644 --- a/dump/Makefile.in +++ b/dump/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.10 2003/01/24 11:01:49 stelian Exp $ +# $Id: Makefile.in,v 1.11 2003/05/08 21:11:39 stelian Exp $ top_srcdir= @top_srcdir@ srcdir= @srcdir@ @@ -6,8 +6,9 @@ top_builddir= .. @MCONFIG@ -CFLAGS= @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) @DUMPDEBUG@ -LDFLAGS= @LDOPTS@ @STATIC@ +INC= -I$(top_srcdir)/dump +ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) @DUMPDEBUG@ +ALL_LDFLAGS= @LDFLAGS@ @LDOPTS@ @STATIC@ LIBS= $(GLIBS) @ZLIB@ @BZLIB@ DEPLIBS= ../compat/lib/libcompat.a @@ -20,10 +21,13 @@ OBJS= itime.o main.o optr.o tape.o traverse.o unctime.o \ MAN8= dump.8 RMAN8= rdump.8 +.c.o: + $(CC) -c $(ALL_CFLAGS) $< -o $@ + all:: $(PROG) $(MAN8) $(PROG): $(OBJS) $(DEPLIBS) - $(LD) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) + $(LD) $(ALL_LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) $(MAN8): dump.8.in sed -e "s|__DUMPDATES__|$(DUMPDATESPATH)|g" \ diff --git a/restore/Makefile.in b/restore/Makefile.in index 344af88..cdc2004 100644 --- a/restore/Makefile.in +++ b/restore/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.11 2003/01/24 11:01:49 stelian Exp $ +# $Id: Makefile.in,v 1.12 2003/05/08 21:11:39 stelian Exp $ top_srcdir= @top_srcdir@ srcdir= @srcdir@ @@ -6,8 +6,9 @@ top_builddir= .. @MCONFIG@ -CFLAGS= @CCOPTS@ -pipe $(OPT) $(DEFS) $(GINC) $(INC) @RESTOREDEBUG@ -LDFLAGS= @LDOPTS@ @STATIC@ +INC= -I$(top_srcdir)/restore +ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) @RESTOREDEBUG@ +ALL_LDFLAGS= @LDFLAGS@ @LDOPTS@ @STATIC@ LIBS= $(GLIBS) -le2p @READLINE@ @ZLIB@ @BZLIB@ DEPLIBS= ../compat/lib/libcompat.a @@ -21,10 +22,13 @@ OBJS= dirs.o interactive.o main.o restore.o symtab.o tape.o \ MAN8= restore.8 RMAN8= rrestore.8 +.c.o: + $(CC) -c $(ALL_CFLAGS) $< -o $@ + all:: $(PROG) $(MAN8) $(PROG): $(OBJS) $(DEPLIBS) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) + $(CC) $(ALL_LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) $(MAN8): restore.8.in sed -e "s|__DATE__|$(DATE)|g" \ diff --git a/rmt/Makefile.in b/rmt/Makefile.in index a955a62..f64f5fa 100644 --- a/rmt/Makefile.in +++ b/rmt/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.9 2003/04/08 19:52:36 stelian Exp $ +# $Id: Makefile.in,v 1.10 2003/05/08 21:11:39 stelian Exp $ top_srcdir= @top_srcdir@ srcdir= @srcdir@ @@ -6,8 +6,8 @@ top_builddir= .. @MCONFIG@ -CFLAGS= @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) -LDFLAGS= @LDOPTS@ @STATIC@ +ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) +ALL_LDFLAGS= @LDFLAGS@ @LDOPTS@ @STATIC@ LIBS= $(GLIBS) DEPLIBS= ../compat/lib/libcompat.a @@ -16,15 +16,19 @@ SRCS= rmt.c OBJS= rmt.o MAN8= rmt.8 +.c.o: + $(CC) -c $(ALL_CFLAGS) $< -o $@ + all:: $(PROG) @ERMT@ $(MAN8) $(PROG): $(OBJS) $(DEPLIBS) - $(LD) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) + $(LD) $(ALL_LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) ermt: ermt.o cipher.o $(DEPLIBS) - $(LD) $(CFLAGS) $(LDFLAGS) -o ermt ermt.o cipher.o $(LIBS) @CRYPTO@ + $(LD) $(ALL_LDFLAGS) -o ermt ermt.o cipher.o $(LIBS) @CRYPTO@ + ermt.o: rmt.c - $(CC) -c $(CFLAGS) -DERMT -o ermt.o rmt.c + $(CC) -c $(ALL_CFLAGS) -DERMT -o ermt.o rmt.c $(MAN8): rmt.8.in sed -e "s|__DATE__|$(DATE)|g" \ -- 2.39.2