`make depend' is broken in the CVS sources. I've only tested it when
using a build directory which is different from the source directory,
but frankly it looks broken anyhow.
This is what I get:
make -C backend depend
make[1]: Entering directory `/home/ian/pgsql-objdir/src/backend'
for i in access bootstrap catalog parser commands executor lib libpq main nodes optimizer port postmaster regex rewrite
storagetcop utils; do make -C $i depend; done
make[2]: Entering directory `/home/ian/pgsql-objdir/src/backend/access'
for dir in common gist hash heap index nbtree rtree transam; do make -C $dir depend || exit; done
make[3]: Entering directory `/home/ian/pgsql-objdir/src/backend/access/common'
gcc -MM -O2 -Wall -Wmissing-prototypes -Wmissing-declarations *.c >depend
gcc: *.c: No such file or directory
gcc: No input files
make[3]: *** [depend] Error 1
make[3]: *** Deleting file `depend'
make[3]: Leaving directory `/home/ian/pgsql-objdir/src/backend/access/common'
make[2]: *** [depend] Error 2
make[2]: Leaving directory `/home/ian/pgsql-objdir/src/backend/access'
make[2]: Entering directory `/home/ian/pgsql-objdir/src/backend/bootstrap'
gcc -MM -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-error *.c >depend
gcc: *.c: No such file or directory
gcc: No input files
make[2]: *** [depend] Error 1
make[2]: *** Deleting file `depend'
etc.
Making this change to src/backend/access/common/Makefile fixes the
first error:
Index: Makefile
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/common/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile 2000/08/31 16:09:30 1.19
+++ Makefile 2001/04/27 21:11:26
@@ -21,7 +21,7 @@ $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)dep depend:
- $(CC) -MM $(CFLAGS) *.c >depend
+ $(CC) -MM $(CFLAGS) $(CPPFLAGS) $(srcdir)/*.c >dependclean: rm -f SUBSYS.o $(OBJS)
I can submit a patch to make a similar change to all Makefiles.
Before I do, is `make depend' still supported? Is there a better way?
Ian