diff options
Diffstat (limited to 'build')
-rwxr-xr-x | build/fastgen.sh | 27 | ||||
-rw-r--r-- | build/library.mk | 12 | ||||
-rw-r--r-- | build/rules.mk | 8 |
3 files changed, 19 insertions, 28 deletions
diff --git a/build/fastgen.sh b/build/fastgen.sh index 73d33114a7..f7c2f5614c 100755 --- a/build/fastgen.sh +++ b/build/fastgen.sh @@ -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 diff --git a/build/library.mk b/build/library.mk index 0c94b1d4c8..c797a349dd 100644 --- a/build/library.mk +++ b/build/library.mk @@ -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; diff --git a/build/rules.mk b/build/rules.mk index c7bf4691fa..efde9d28e4 100644 --- a/build/rules.mk +++ b/build/rules.mk @@ -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 |