Henry S. Thompson writes:
> This script
>
> cd $builddir
> $srcdir/configure --without-modules --with-postgresql $OTHER_OPTIONS
> make distclean # or in a fresh checkout
> make
Oops, sorry about inverting the order of distclean and configure.
> should Just Work[tm] due to this definition in
src/Makefile.in.in:
>
> #if defined(HAVE_POSTGRESQL) && !defined(HAVE_SHLIB)
> postgresql_objs=$(BLDMODULES)/postgresql/postgresql.o
> #endif
I'm still worried we're at cross-purposes here. My top-level
configure is working just fine. It produces the relevant Makefile
(modules/postgresql/Makefile), and make eventually uses it:
config.status: creating modules/postgresql/Makefile.in
. . .
cd ./modules/postgresql && make all
I don't think this should happen, or if it does, it should be
basically irrelevant. postgresql_objs is part of objs, which is part
of link_deps, which AFAICT is a prerequisite for linking the
executable, and according to the usual .c.o rule it should be compiled
from the main build process and linked into the executable using
cppflags = $(CPPFLAGS) -Demacs -I. -I$(SRC) $(c_switch_all)
cflags = $(CFLAGS) $(cppflags)
#ifdef SOLARIS2
%.o : %.c
#else
.c.o:
#endif
$(CC) -c $(cflags) $<
*before* cd'ing to modules/postgresql and building. (This works for
me for a module that is half-baked and needs to be built into XEmacs
at present, so the #if !(HAVE_SHLIB) proprocessor control is left out
and the rule for building module's dependencies in src/Makefile.in.in
is unconditional.) If for some reason you already had a built
postgresql.o, though, that would prevent it from getting rebuilt (in
the absence of a make clean at least).
So I conclude (and this works) that what we want is the following
simple patch:
diff -r 68f8d295be49 configure.ac
--- a/configure.ac Wed Jan 23 11:48:46 2013 -0700
+++ b/configure.ac Sat Feb 09 15:04:26 2013 +0000
@@ -3492,7 +3492,7 @@
fi
if test "$with_modules" != "yes"; then
MOD_CC="$XEMACS_CC"
- MODCFLAGS="\$(XE_CFLAGS) -I../../src -I\$(srcdir)/../../src"
+ MODCFLAGS="\$(XE_CFLAGS) -Demacs -I../../src -I\$(srcdir)/../../src"
INSTALLPATH=""
MOD_INSTALL_PROGRAM="true"
OBJECT_TO_BUILD="\$(MODNAME).o"
Looks plausible, assuming that postgresql.o is supposed to be made in
modules/postgresql rather than src. I'll try to get around to some
testing soon.
I don't have an opinion about the second part of the patch yet.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta