Commit 5e7a4829 authored by David Reid's avatar David Reid
Browse files

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
parent f1ad5f14
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+31 −1
Original line number Diff line number Diff line
@@ -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 \
+2 −1
Original line number Diff line number Diff line
@@ -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:
+13 −0
Original line number Diff line number Diff line
@@ -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" ], [