Jerry James writes:
> Thus neatly breaking module building on FreeBSD again. I
wouldn't
> really mind that much if we mandated GNU make, but messing around
> trying to find the minimal working intersection of all makes on the
> planet is going to get old real fast.
How does this change break the build? What goes wrong? Does it break
other BSDs as well?
Didn't we have this discussion when I originally submitted the patch
to Makefile.common? Anyway:
cd ./modules/postgresql && make CC='gcc' CFLAGS='-Wall
-Wno-switch -Winline -Wmissing-prototypes -Wsign-compare -Wundef -Wstrict-prototypes
-Wshadow -Wmissing-declarations -Wpointer-arith -g -O3' LDFLAGS=''
CPPFLAGS='' all
../../lib-src/ellcc -Wall -Wno-switch -Winline -Wmissing-prototypes -Wsign-compare
-Wundef -Wstrict-prototypes -Wshadow -Wmissing-declarations -Wpointer-arith -g -O3
--mode=compile --mod-output=postgresql.o -I../../src
-I/home/rpluim/xemacs/xemacs-21.5/modules/postgresql/../../src -c
/home/rpluim/xemacs/xemacs-21.5/modules/postgresql/postgresql.c
ELLMAKEDOC=../../lib-src/make-docfile ../../lib-src/ellcc --mode=init
--mod-output=postgresql_i.c --mod-name=postgresql --mod-version=1.0.0
--mod-title="PostgreSQL Client Interface for XEmacs" $(srcdir)/postgresql.c
srcdir: not found
/postgresql.c: No such file or directory
I have no idea if this breaks on other BSDs.
I agree that messing around with a bunch of makes is likely to be
unsatisfying. Let's try to figure out what we might do, though. From
the information provided by you and David and my own experiments, I know
that:
Solaris make FreeBSD make GNU make
------------ ------------ --------
:= breaks works works
= works breaks works
Since GNU make works in either case, and we preprocess our Makefiles, we
could do something like this:
#if BUILDING_ON_SOLARIS (or maybe BUILDING_ON_SVR4)
SRC_SRCS=$(SRCS:%=$(srcdir)/%)
#else
SRC_SRCS:=$(SRCS:%=$(srcdir)/%)
#endif
or even
#if BUILDING_ON_FREEBSD (or maybe BUILDING_ON_BSD)
SRC_SRCS:=$(SRCS:%=$(srcdir)/%)
#else
SRC_SRCS=$(SRCS:%=$(srcdir)/%)
#endif
and we don't have to worry about whether the native make or GNU make is
in use. If that looks good to you, I'll figure out how to make it so.
(There are days when I feel like Martin, really I do) If you did this,
it would be best if it was:
#if MAKE_DOESNT_NEED_COLON_FOR_EXPANSION
since that doesn't tie it to any particular sets of operating systems
(especially since I could probably make a case that FreeBSD's
behaviour is a bug, and thus it might get fixed).
However, I'd prefer mandating GNU make to all sorts of configure-fu
just for this. (and that would also have the advantage that we could
just stop worrying about different makes. Is there a single platform
we support that does _not_ possess a gnu make port?).
Robert
Robert