[PATCH] Polish tdb Makefile.in

Green, Paul Paul.Green at stratus.com
Tue Jun 20 15:37:49 GMT 2006

The way that the tdb Makefile.in handles CFLAGS, CPPFLAGS, and LDFLAGS
is not consistent with the other Samba components.  It also fails to use
$(EXEEXT) where appropriate.  I've been running with the attached patch
for some time locally, and it works for me.  I have a hazy recollection
that Tridge wanted to apply tdb patches himself.  Regardless, here's the
patch, and I would appreciate feedback on it.  If it is ok, and if I can
apply it, I'll be happy to do so.

Paul Green, Senior Technical Consultant
Stratus Technologies, Inc.
111 Powdermill Rd, Maynard, MA 01754
Tel +1-978-461-7557, Fax +1-978-461-3610

-------------- next part --------------
diff -urpN old/tdb/Makefile.in new/tdb/Makefile.in
--- old/tdb/Makefile.in	Sun Apr 23 06:54:08 2006
+++ new/tdb/Makefile.in	Fri May 12 00:37:49 2006
@@ -2,15 +2,18 @@
 # Makefile for tdb directory
-CFLAGS = -Iinclude @CFLAGS@
 CC = @CC@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 bindir = @bindir@
 includedir = @includedir@
 libdir = @libdir@
-PROGS = bin/tdbtool bin/tdbtorture
+PROGS = bin/tdbtool$(EXEEXT) bin/tdbtorture$(EXEEXT)
 TDB_OBJ = common/tdb.o common/dump.o common/io.o common/lock.o \
 	common/open.o common/traverse.o common/freelist.o common/error.o \
@@ -30,20 +33,20 @@ install: all
 	cp include/tdb.h $(includedir)
 	cp tdb.pc $(libdir)/pkgconfig
-bin/tdbtest: tools/tdbtest.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbtest tools/tdbtest.o $(TDB_OBJ) -lgdbm
+bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o $(TDB_OBJ) -lgdbm
-bin/tdbtool: tools/tdbtool.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbtool tools/tdbtool.o $(TDB_OBJ)
+bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o $(TDB_OBJ)
-bin/tdbtorture: tools/tdbtorture.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbtorture tools/tdbtorture.o $(TDB_OBJ)
+bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o $(TDB_OBJ)
-bin/tdbdump: tools/tdbdump.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbdump tools/tdbdump.o $(TDB_OBJ)
+bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o $(TDB_OBJ)
-bin/tdbbackup: tools/tdbbackup.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbbackup tools/tdbbackup.o $(TDB_OBJ)
+bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o $(TDB_OBJ)
 	rm -f $(PROGS) common/*.o tools/*.o *~ *.bak */*~ */*.bak *% core test.db test.tdb test.gdbm

More information about the samba-technical mailing list