From: David Reid Date: Wed, 18 Apr 2001 20:51:35 +0000 (+0000) Subject: This changes the build process as outlined in my email earlier this week. X-Git-Tag: 2.0.18~206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de6f0796e92fa6887c17014f715c74d4b771c782;p=apache This changes the build process as outlined in my email earlier this week. Essentially we now build the static objects, then allow a platform to run a given command, build the shared modules, then run another command before exiting. This gets us building dso's on beos and may provide a better framework for some of the other "strange" platforms out there without stopping the normal ones working. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88886 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/Makefile.in b/Makefile.in index 0c10e6fb52..ee79e7f8a8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -13,7 +13,7 @@ PROGRAM_DEPENDENCIES = \ $(AP_LIBS) PROGRAMS = $(PROGRAM_NAME) -targets = $(PROGRAMS) $(other_targets) +targets = $(PROGRAMS) $(shared_build) $(other_targets) phony_targets = $(srcdir)/buildmark.c install_targets = install-conf install-htdocs install-icons install-other \ install-cgi install-include install-suexec diff --git a/build/rules.mk b/build/rules.mk index 16c2bf5be6..46a6fda904 100644 --- a/build/rules.mk +++ b/build/rules.mk @@ -125,6 +125,7 @@ SHLIB_SUFFIX = so all: all-recursive +shared-modules: shared-modules-recursive install: install-recursive @@ -169,8 +170,37 @@ distclean-recursive clean-recursive depend-recursive all-recursive install-recur done; \ fi +shared-modules-recursive: + @if test `pwd` = "$(top_builddir)"; then \ + $(PRE_SHARED_CMDS) ; \ + fi; \ + list='$(SUBDIRS)'; for i in $$list; do \ + target="shared-modules"; \ + if test "$$i" = "."; then \ + ok = yes; \ + target="shared-modules-p"; \ + fi; \ + if test "$$i" != "srclib"; then \ + (cd $$i && $(MAKE) $$target) || exit 1; \ + fi; \ + done; \ + if test -e 'modules.mk'; then \ + if test -n '$(shared_targets)'; then \ + echo "Building shared modules: $(shared_targets)"; \ + if test -z '$(shared_targets)'; then ok=yes; fi; \ + if test "$$ok" != "yes"; then \ + $(MAKE) "shared-modules-p" || exit 1; \ + fi; \ + fi; \ + fi; \ + if test `pwd` = "$(top_builddir)"; then \ + $(POST_SHARED_CMDS) ; \ + fi + all-p: $(targets) -install-p: $(targets) $(install_targets) +shared-modules-p: $(shared_targets) + +install-p: $(targets) $(shared_targets) $(install_targets) @if test -n '$(PROGRAMS)'; then \ test -d $(bindir) || $(MKINSTALLDIRS) $(bindir); \ for i in $(PROGRAMS) ""; do \ diff --git a/build/special.mk b/build/special.mk index 2dcbe6a041..ef0b47ee0a 100644 --- a/build/special.mk +++ b/build/special.mk @@ -57,7 +57,8 @@ all: all-recursive include $(builddir)/modules.mk -targets = $(static) $(shared) +targets = $(static) +shared_targets = $(shared) install_targets = install-modules install-modules: diff --git a/configure.in b/configure.in index 6fb9aa86a7..08f903406c 100644 --- a/configure.in +++ b/configure.in @@ -190,6 +190,9 @@ if test -z "$LIBTOOL"; then APACHE_LIBTOOL_SILENT fi +PRE_SHARED_CMDS='echo ""' +POST_SHARED_CMDS='echo ""' + if test "$apache_need_shared" = "yes"; then $SHELL $ac_aux_dir/ltconfig --output=shlibtool --disable-static --srcdir=$ac_aux_dir --cache-file=./config.cache $ac_aux_dir/ltmain.sh case $PLATFORM in @@ -197,12 +200,22 @@ if test "$apache_need_shared" = "yes"; then HTTPD_LDFLAGS="$HTTPD_LDFLAGS -Wl,-bE:$abs_srcdir/support/httpd.exp" SH_LDFLAGS="$SH_LDFLAGS -Wl,-bI:$abs_srcdir/support/httpd.exp" ;; + *beos) + SH_LDFLAGS='$(top_builddir)/_APP_' + PRE_SHARED_CMDS='ln -s $(top_builddir)/httpd $(top_builddir)/_APP_' + POST_SHARED_CMDS='rm $(top_builddir)/_APP_' + ;; *os390) CFLAGS="$CFLAGS -Wc,DLL,EXPORTALL" ;; esac + shared_build="shared-modules" fi +APACHE_SUBST(PRE_SHARED_CMDS) +APACHE_SUBST(POST_SHARED_CMDS) +APACHE_SUBST(shared_build) + AC_ARG_WITH(program-name, [ --with-program-name alternate executable name],[ progname="$withval" ], [