Commit e173491b authored by Sascha Schumann's avatar Sascha Schumann
Browse files

Overall UNIX build system improvements:

* Makefile header is now completely dynamic
* Absolute paths everywhere
  (fixes Tru64 support)
* Get rid of LTLIBRARY_SHARED_NAME rule in library.mk
  (fixes Irix support, untested)
* VPATH does not contain variables anymore
  (fixes UnixWare support)
* Remove inclusion of program.mk in support/Makefile.in
  (PROGRAM_NAME is empty => breaks Irix and others)
* Call REENTRANCY_FLAGS earlier, so that flags are passed to header checks
  (might fix OpenBSD pthread.h-detection, untested)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85102 13f79535-47bb-0310-9956-ffa450edef68
parent 37de80ba
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line

DEPTH     = .
top_srcdir = @top_srcdir@
srcdir    = @srcdir@
VPATH     = @srcdir@

SUBDIRS = ap lib main modules os support $(REGEX_DIR)

PROGRAM_NAME         = $(progname)
+16 −11
Original line number Diff line number Diff line
@@ -58,25 +58,30 @@
srcdir=$1
shift

top_srcdir=`(cd $srcdir; pwd)`

mkdir_p=$1
shift

top_srcdir=`(cd $srcdir; pwd)`
top_builddir=`pwd`

if test "$mkdir_p" = "yes"; then
  mkdir_p="mkdir -p"
else
  mkdir_p="$top_srcdir/helpers/mkdir.sh"
fi

base="\$(DEPTH)/$srcdir"
for makefile in $@; do
  echo "creating $makefile"
# portable dirname
  dir=`echo $makefile|sed 's%[^/][^/]*$%%'`

  (cat <<EOF
top_srcdir   = $top_srcdir
top_builddir = $top_builddir
srcdir       = $top_srcdir/$dir
builddir     = $top_builddir/$dir
VPATH        = $top_srcdir/$dir
EOF
)| cat - $makefile.in > $makefile

for i in $@ ; do
	echo "creating $i"
	dir=`dirname $i`
	$mkdir_p $dir
	sed \
		-e s#@top_srcdir@#$base# \
		-e s#@srcdir@#$base/$dir# \
	< $top_srcdir/$i.in > $i
done
+0 −12
Original line number Diff line number Diff line
@@ -58,15 +58,3 @@ LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo)

$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
	$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)

$(LTLIBRARY_SHARED_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
	@test -d $(phplibdir) || $(mkinstalldirs) $(phplibdir)
	$(LINK) -avoid-version -module -rpath $(phplibdir) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_SHARED_LIBADD)
	$(SHLIBTOOL) --mode=install install $@ $(phplibdir)

shared:
	@if test '$(SHLIBTOOL)' != '$(LIBTOOL)'; then \
		$(MAKE) 'LIBTOOL=$(SHLIBTOOL)' $(LTLIBRARY_SHARED_NAME); \
	else \
		$(MAKE) $(LTLIBRARY_SHARED_NAME); \
	fi;
+3 −5
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@
# The build environment was provided by Sascha Schumann.
#

include $(DEPTH)/config_vars.mk
include $(top_builddir)/config_vars.mk


SHLIB_SUFFIX = so
@@ -66,14 +66,12 @@ mkinstalldirs = $(abs_srcdir)/helpers/mkdir.sh
INSTALL = $(abs_srcdir)/helpers/install.sh -c
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_PROGRAM = $(INSTALL) -m 755
SHLIBTOOL = $(SHELL) $(DEPTH)/shlibtool --silent
SHLIBTOOL = $(SHELL) $(top_builddir)/shlibtool --silent
APACHE_COMPILE = $(COMPILE) -c $< && touch $@
APACHE_SH_COMPILE = $(SHLIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< && touch $@
SHLINK = $(SHLIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@

DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(DEPTH)

top_builddir = $(DEPTH)
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir)

.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s .y .l .slo
+2 −2
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ AC_PROG_INSTALL
dnl AC_PROG_RANLIB
dnl AC_PATH_PROG(PERL_PATH, perl)

REENTRANCY_FLAGS

dnl various OS checks that apparently set required flags
AC_AIX
AC_ISC_POSIX
@@ -109,8 +111,6 @@ APACHE_INADDR_NONE

APACHE_EBCDIC

REENTRANCY_FLAGS

AC_FUNC_SELECT_ARGTYPES

dnl Check if we'll actually need to cast select args all the time
Loading