]> granicus.if.org Git - apache/commitdiff
This changes the build process as outlined in my email earlier this week.
authorDavid Reid <dreid@apache.org>
Wed, 18 Apr 2001 20:51:35 +0000 (20:51 +0000)
committerDavid Reid <dreid@apache.org>
Wed, 18 Apr 2001 20:51:35 +0000 (20:51 +0000)
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

Makefile.in
build/rules.mk
build/special.mk
configure.in

index 0c10e6fb5252af2b2e6f95853a746625f14f74ba..ee79e7f8a8aa316c3c4360c776f8be4e11d5d3e9 100644 (file)
@@ -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
index 16c2bf5be6084afbd5eb33733130828336e3733b..46a6fda904fbc1c359f8d1c4ea876c7926ff99f5 100644 (file)
@@ -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 \
index 2dcbe6a041566237717deca808c8bee74be5405a..ef0b47ee0a692bde98237b7c8bc58b365ea86d42 100644 (file)
@@ -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:
index 6fb9aa86a7736c727f8e9fc5b348855d7385b8ea..08f903406cf1482f3f5c9447d2c7fddd886c709c 100644 (file)
@@ -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" ], [