diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/build.mk | 63 | ||||
-rw-r--r-- | build/build2.mk | 75 | ||||
-rwxr-xr-x | build/buildcheck.sh | 69 | ||||
-rwxr-xr-x | build/cvsclean | 3 | ||||
-rwxr-xr-x | build/fastgen.sh | 53 | ||||
-rw-r--r-- | build/library.mk | 42 | ||||
-rw-r--r-- | build/ltlib.mk | 31 | ||||
-rw-r--r-- | build/mkdep.perl | 91 | ||||
-rw-r--r-- | build/program.mk | 30 | ||||
-rw-r--r-- | build/rules.mk | 132 | ||||
-rwxr-xr-x | build/snapshot | 5 | ||||
-rw-r--r-- | build/special.mk | 45 |
12 files changed, 639 insertions, 0 deletions
diff --git a/build/build.mk b/build/build.mk new file mode 100644 index 0000000000..5ef3d80dd8 --- /dev/null +++ b/build/build.mk @@ -0,0 +1,63 @@ +# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL SASCHA SCHUMANN BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +############################################################################## +# $Id: build.mk,v 1.1 2000/01/11 13:10:58 sascha Exp $ +# +# Makefile to generate build tools +# + +STAMP = buildmk.stamp + +all: $(STAMP) generated_lists + @$(MAKE) AMFLAGS=$(AMFLAGS) -s -f build/build2.mk + +generated_lists: + @echo config_m4_files = `find . -name config.m4` > $@ + +$(STAMP): build/buildcheck.sh + @build/buildcheck.sh && touch $(STAMP) + +snapshot: + distname='$(DISTNAME)'; \ + if test -z "$$distname"; then \ + distname='apache2-snapshot'; \ + fi; \ + cd ..; \ + myname=`basename \`pwd\`` ; \ + cd .. && cp -rp $$myname $$distname; \ + cd $$distname/src; \ + find . -type l -exec rm {} \; ; \ + $(MAKE) AMFLAGS=--copy -f build/build.mk; \ + cd ../..; \ + tar cf $$distname.tar $$distname; \ + rm -rf $$distname $$distname.tar.*; \ + bzip2 -9 $$distname.tar; \ + bzip2 -t $$distname.tar.bz2 + +cvsclean: + @for i in `find . -follow -name .cvsignore`; do \ + (cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \ + done + @rm -f $(SUBDIRS) 2>/dev/null || true + +.PHONY: generated_lists snapshot cvsclean diff --git a/build/build2.mk b/build/build2.mk new file mode 100644 index 0000000000..8330c00e2a --- /dev/null +++ b/build/build2.mk @@ -0,0 +1,75 @@ +# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL SASCHA SCHUMANN BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +############################################################################## +# $Id: build2.mk,v 1.1 2000/01/11 13:10:58 sascha Exp $ + +include generated_lists + +TOUCH_FILES = mkinstalldirs install-sh missing + +LT_TARGETS = ltconfig ltmain.sh config.guess config.sub + +config_h_in = include/ap_config_auto.h.in +apr_config_h_in = lib/apr/include/apr_config.h.in +apr_configure = lib/apr/configure + +APACHE_TARGETS = $(TOUCH_FILES) $(LT_TARGETS) configure $(config_h_in) + +APR_TARGETS = $(apr_configure) $(apr_config_h_in) + +targets = .deps $(APACHE_TARGETS) $(APR_TARGETS) + +all: $(targets) + +.deps: + touch $@ + +aclocal.m4: configure.in acinclude.m4 + @echo rebuilding $@ + aclocal + +$(LT_TARGETS): + libtoolize $(AMFLAGS) --force + +$(config_h_in): configure +# explicitly remove target since autoheader does not seem to work +# correctly otherwise (timestamps are not updated) + @echo rebuilding $@ + @rm -f $@ + autoheader + +$(TOUCH_FILES): + touch $(TOUCH_FILES) + +configure: aclocal.m4 configure.in $(config_m4_files) + @echo rebuilding $@ + autoconf + +$(apr_config_h_in): $(apr_configure) lib/apr/acconfig.h + @echo rebuilding $@ + @rm -f $@ + (cd lib/apr && autoheader) + +$(apr_configure): lib/apr/aclocal.m4 lib/apr/configure.in + @echo rebuilding $@ + (cd lib/apr && autoconf) diff --git a/build/buildcheck.sh b/build/buildcheck.sh new file mode 100755 index 0000000000..96974450fd --- /dev/null +++ b/build/buildcheck.sh @@ -0,0 +1,69 @@ +#! /bin/sh + +echo "buildconf: checking installation..." + +# autoconf 2.13 or newer +ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'` +if test -z "$ac_version"; then +echo "buildconf: autoconf not found." +echo " You need autoconf version 2.13 or newer installed" +echo " to build PHP from CVS." +exit 1 +fi +IFS=.; set $ac_version; IFS=' ' +if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then +echo "buildconf: autoconf version $ac_version found." +echo " You need autoconf version 2.13 or newer installed" +echo " to build PHP from CVS." +exit 1 +else +echo "buildconf: autoconf version $ac_version (ok)" +fi + +# automake 1.4 or newer +am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'` +if test "$am_version" = ""; then +echo "buildconf: automake not found." +echo " You need automake version 1.4 or newer installed" +echo " to build PHP from CVS." +exit 1 +fi +IFS=.; set $am_version; IFS=' ' +if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then +echo "buildconf: automake version $am_version found." +echo " You need automake version 1.4 or newer installed" +echo " to build PHP from CVS." +exit 1 +else +echo "buildconf: automake version $am_version (ok)" +fi + +# libtool 1.3.3 or newer +lt_pversion=`libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'` +if test "$lt_pversion" = ""; then +echo "buildconf: libtool not found." +echo " You need libtool version 1.3 or newer installed" +echo " to build PHP from CVS." +exit 1 +fi +lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'` +IFS=.; set $lt_version; IFS=' ' +if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3" +then +echo "buildconf: libtool version $lt_pversion (ok)" +else +echo "buildconf: libtool version $lt_pversion found." +echo " You need libtool version 1.3.3 or newer installed" +echo " to build PHP from CVS." +exit 1 +fi + +am_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'` +lt_prefix=`which libtool | sed -e 's#/[^/]*/[^/]*$##'` +if test "$am_prefix" != "$lt_prefix"; then + echo "WARNING: automake and libtool are installed in different" + echo " directories. This may cause aclocal to fail." + echo " continuing anyway" +fi + +exit 0 diff --git a/build/cvsclean b/build/cvsclean new file mode 100755 index 0000000000..e98ec49b76 --- /dev/null +++ b/build/cvsclean @@ -0,0 +1,3 @@ +#! /bin/sh + +${MAKE:-make} -f build/build.mk cvsclean diff --git a/build/fastgen.sh b/build/fastgen.sh new file mode 100755 index 0000000000..9a59ab7949 --- /dev/null +++ b/build/fastgen.sh @@ -0,0 +1,53 @@ +#! /bin/sh +# +# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL SASCHA SCHUMANN BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +############################################################################## +# $Id: fastgen.sh,v 1.1 2000/01/11 13:10:58 sascha Exp $ +# + +srcdir=$1 +shift + +topsrcdir=`(cd $srcdir; pwd)` + +mkdir_p=$1 +shift + +if test "$mkdir_p" = "yes"; then + mkdir_p="mkdir -p" +else + mkdir_p="$topsrcdir/helpers/mkdir.sh" +fi + +base="\$(DEPTH)/$srcdir" + +for i in $@ ; do + echo "creating $i" + dir=`dirname $i` + $mkdir_p $dir + sed \ + -e s#@topsrcdir@#$base# \ + -e s#@srcdir@#$base/$dir# \ + < $topsrcdir/$i.in > $i +done diff --git a/build/library.mk b/build/library.mk new file mode 100644 index 0000000000..abadb6340c --- /dev/null +++ b/build/library.mk @@ -0,0 +1,42 @@ +# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL SASCHA SCHUMANN BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +############################################################################## +# $Id: library.mk,v 1.1 2000/01/11 13:10:58 sascha Exp $ +# + +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/ltlib.mk b/build/ltlib.mk new file mode 100644 index 0000000000..42bbb7cb1b --- /dev/null +++ b/build/ltlib.mk @@ -0,0 +1,31 @@ +# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL SASCHA SCHUMANN BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +############################################################################## +# $Id: ltlib.mk,v 1.1 2000/01/11 13:10:58 sascha Exp $ +# + +targets = $(LTLIBRARY_NAME) + +include $(topsrcdir)/build/rules.mk +include $(topsrcdir)/build/library.mk + diff --git a/build/mkdep.perl b/build/mkdep.perl new file mode 100644 index 0000000000..f9e06ea041 --- /dev/null +++ b/build/mkdep.perl @@ -0,0 +1,91 @@ +#!/usr/bin/perl +# +# $Id: mkdep.perl,v 1.1 2000/01/11 13:10:59 sascha Exp $ +# +# Created: Thu Aug 15 11:57:33 1996 too +# Last modified: Mon Dec 27 09:23:56 1999 too +# +# Copyright (c) 1996-1999 Tomi Ollila. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +die "Usage: mkdep CPP-command [CPP options] file1 [file2...]\n" + if ($#ARGV < 1); + +$cmdl = shift(@ARGV); + +$cmdl = "$cmdl " . shift (@ARGV) while ($ARGV[0] =~ /^-[A-Z]/); + +while ($file = shift(@ARGV)) +{ + $file =~ s/\.o$/.c/; + + open(F, "$cmdl $file|"); + + &parseout; + + close(F); +} + + +sub initinit +{ + %used = (); + $of = $file; + $of =~ s/\.c$/.lo/; + $str = "$of:\t$file"; + $len = length $str; +} + +sub initstr +{ + $str = "\t"; + $len = length $str; +} + +sub parseout +{ + &initinit; + while (<F>) + { + next unless (/^# [0-9]* "(.*\.h)"/); + + next if ($1 =~ /^\//); + + next if $used{$1}; + + $used{$1} = 1; + + $nlen = length($1) + 1; + + if ($len + $nlen > 72) + { + print $str, "\\\n"; + &initstr; + $str = $str . $1; + } + else { $str = $str . " " . $1; } + + $len += $nlen; + + } + print $str, "\n"; +} diff --git a/build/program.mk b/build/program.mk new file mode 100644 index 0000000000..bb52d8832c --- /dev/null +++ b/build/program.mk @@ -0,0 +1,30 @@ +# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL SASCHA SCHUMANN BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +############################################################################## +# $Id: program.mk,v 1.1 2000/01/11 13:10:59 sascha Exp $ +# + +PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo) + +$(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS) + $(LINK) $(PROGRAM_LDFLAGS) $(PROGRAM_OBJECTS) $(PROGRAM_LDADD) diff --git a/build/rules.mk b/build/rules.mk new file mode 100644 index 0000000000..e0289eb58f --- /dev/null +++ b/build/rules.mk @@ -0,0 +1,132 @@ +# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL SASCHA SCHUMANN BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +############################################################################## +# $Id: rules.mk,v 1.1 2000/01/11 13:10:59 sascha Exp $ +# + +include $(DEPTH)/config_vars.mk + + +SHLIB_SUFFIX = so +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ +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 +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_srcdir = $(topsrcdir) +top_builddir = $(DEPTH) + +.SUFFIXES: +.SUFFIXES: .S .c .lo .o .s .y .l .slo + +.c.o: + $(COMPILE) -c $< + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +.c.lo: + $(APACHE_COMPILE) + +.s.lo: + $(APACHE_COMPILE) + +.S.lo: + $(APACHE_COMPILE) + +.c.slo: + $(APACHE_SH_COMPILE) + +.y.c: + $(YACC) $(YFLAGS) $< && mv y.tab.c $*.c + if test -f y.tab.h; then \ + if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ + else :; fi + +.l.c: + $(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@ + + +all: all-recursive +install: install-recursive + +distclean-recursive depend-recursive clean-recursive all-recursive install-recursive: + @otarget=`echo $@|sed s/-recursive//`; \ + if test '$(NO_RECURSION)' != "$$otarget"; then \ + list='$(SUBDIRS)'; for i in $$list; do \ + target="$$otarget"; \ + echo "Making $$target in $$i"; \ + if test "$$i" = "."; then \ + ok=yes; \ + target="$$target-p"; \ + fi; \ + if test ! -f $$i/.deps; then touch $$i/.deps; fi; \ + (cd $$i && $(MAKE) $$target) || exit 1; \ + done; \ + if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi;\ + if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi;\ + fi + +all-p: $(targets) +install-p: $(targets) $(install_targets) + @if test -n '$(PROGRAMS)'; then \ + test -d $(bindir) || $(mkinstalldirs) $(bindir); \ + for i in "$(PROGRAMS)"; do \ + $(INSTALL_PROGRAM) $$i $(bindir); \ + done; \ + fi + +distclean-p depend-p clean-p: + +depend: depend-recursive + test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps + +clean: clean-recursive clean-x + +clean-x: + rm -f $(targets) *.lo *.la *.o $(CLEANFILES) + rm -rf .libs + +distclean: distclean-recursive clean-x + rm -f config.cache config.log config.status config_vars.mk libtool \ + stamp-h Makefile shlibtool + +include $(srcdir)/.deps + +.PHONY: all-recursive clean-recursive install-recursive \ +$(install_targets) install all clean depend depend-recursive shared \ +distclean-recursive distclean clean-x all-p install-p distclean-p \ +depend-p clean-p $(phony_targets) diff --git a/build/snapshot b/build/snapshot new file mode 100755 index 0000000000..9553a753f9 --- /dev/null +++ b/build/snapshot @@ -0,0 +1,5 @@ +#! /bin/sh + +test -n "$1" && ARG="DISTNAME='$1'" + +${MAKE:-make} $ARG -f build/build.mk snapshot diff --git a/build/special.mk b/build/special.mk new file mode 100644 index 0000000000..0068836ff3 --- /dev/null +++ b/build/special.mk @@ -0,0 +1,45 @@ +# Copyright (c) 1999, 2000 Sascha Schumann. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY SASCHA SCHUMANN ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL SASCHA SCHUMANN BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +############################################################################## +# $Id: special.mk,v 1.1 2000/01/11 13:10:59 sascha Exp $ +# + + + +all: all-recursive + +include modules.mk +targets = $(static) $(shared) +install_targets = install-modules + +install-modules: + @shared='$(shared)'; \ + if test -n "$$shared"; then \ + $(mkinstalldirs) $(libexecdir); \ + for i in $$shared; do \ + $(SHLIBTOOL) --mode=install cp $$i $(libexecdir); \ + done; \ + fi + +include $(topsrcdir)/build/rules.mk + |