summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorGreg Stein <gstein@apache.org>2001-01-09 11:06:28 +0000
committerGreg Stein <gstein@apache.org>2001-01-09 11:06:28 +0000
commit133bdc412f349ed1e963a6177e22fd9a68a810a3 (patch)
treee51da863a0ead61ec23171879295613e7cd48b68 /helpers
parente673c6a7965629b9697183ae65885aa1f908799d (diff)
downloadapr-133bdc412f349ed1e963a6177e22fd9a68a810a3.tar.gz
Libtool-ize APR.
To simplify the task, I also shifted the Makefiles to include a rules.mk (based on APRUTIL's with a few tweaks). Still needs some work to remove the INCLUDES setup in all the Makefiles (these can be shared). buildconf now does more work (and generates some output) aclocal.m4 is based on a number of M4 files, rather than standalone apr/test/ has been updated but is probably broken in a few ways. objs/ is now gone. we link directly from the .lo files. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'helpers')
-rw-r--r--helpers/.cvsignore3
-rw-r--r--helpers/apr-conf.m47
-rw-r--r--helpers/rules.mk.in162
3 files changed, 165 insertions, 7 deletions
diff --git a/helpers/.cvsignore b/helpers/.cvsignore
new file mode 100644
index 000000000..62437018a
--- /dev/null
+++ b/helpers/.cvsignore
@@ -0,0 +1,3 @@
+ltconfig
+ltmain.sh
+rules.mk
diff --git a/helpers/apr-conf.m4 b/helpers/apr-conf.m4
index ce041ca1c..cc0110439 100644
--- a/helpers/apr-conf.m4
+++ b/helpers/apr-conf.m4
@@ -303,13 +303,6 @@ if test "$ac_cv_socklen_t" = "yes"; then
fi
])
-dnl Check for ranlib but, unlike the check provided with autoconf, set
-dnl RANLIB to "true" if there is no ranlib instead of setting it to ":".
-dnl OS/390 doesn't have ranlib and the make utility doesn't parse "RANLIB=:"
-dnl the way we might want it to.
-AC_DEFUN(AC_PROG_RANLIB_NC,
-[AC_CHECK_TOOL(RANLIB, ranlib, true)])
-
AC_DEFUN(APR_EBCDIC,[
AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
diff --git a/helpers/rules.mk.in b/helpers/rules.mk.in
new file mode 100644
index 000000000..efc8696b6
--- /dev/null
+++ b/helpers/rules.mk.in
@@ -0,0 +1,162 @@
+# ====================================================================
+# The Apache Software License, Version 1.1
+#
+# Copyright (c) 2000 The Apache Software Foundation. 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.
+#
+# 3. The end-user documentation included with the redistribution,
+# if any, must include the following acknowledgment:
+# "This product includes software developed by the
+# Apache Software Foundation (http://www.apache.org/)."
+# Alternately, this acknowledgment may appear in the software itself,
+# if and wherever such third-party acknowledgments normally appear.
+#
+# 4. The names "Apache" and "Apache Software Foundation" must
+# not be used to endorse or promote products derived from this
+# software without prior written permission. For written
+# permission, please contact apache@apache.org.
+#
+# 5. Products derived from this software may not be called "Apache",
+# nor may "Apache" appear in their name, without prior written
+# permission of the Apache Software Foundation.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
+# ITS CONTRIBUTORS 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.
+# ====================================================================
+#
+# This software consists of voluntary contributions made by many
+# individuals on behalf of the Apache Software Foundation. For more
+# information on the Apache Software Foundation, please see
+# <http://www.apache.org/>.
+#
+
+#
+# rules.mk: standard rules for APR
+#
+
+@SET_MAKE@
+
+#
+# Configuration variables
+#
+top_builddir=@top_builddir@
+
+CC=@CC@
+AWK=@AWK@
+LIBTOOL=@LIBTOOL@
+
+CFLAGS=@CFLAGS@ @OPTIM@ $(INCLUDES)
+LIBS=@LIBS@
+LDFLAGS=@LDFLAGS@
+
+RM=@RM@
+SHELL=@SHELL@
+
+### make LTFLAGS somewhat variable?
+LTFLAGS = --silent
+
+MKDEP=$(top_builddir)/helpers/mkdep.sh
+
+#
+# Basic macro setup
+#
+COMPILE = $(CC) $(CFLAGS)
+LT_COMPILE = $(LIBTOOL) --mode=compile $(LTFLAGS) $(COMPILE) -c $< && touch $@
+
+LINK = $(LIBTOOL) --mode=link $(LTFLAGS) $(COMPILE) $(LDFLAGS) -o $@
+
+#
+# Standard build rules
+#
+all: all-recursive
+depend: depend-recursive
+clean: clean-recursive
+distclean: distclean-recursive
+extraclean: extraclean-recursive
+
+install: all-recursive
+
+
+all-recursive depend-recursive clean-recursive distclean-recursive \
+ extraclean-recursive:
+ @otarget=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; \
+ for i in $$list; do \
+ if test -d "$$i"; then \
+ target="$$otarget"; \
+ echo "Making $$target in $$i"; \
+ if test "$$i" = "."; then \
+ made_local=yes; \
+ target="local-$$target"; \
+ fi; \
+ (cd $$i && $(MAKE) $$target) || exit 1; \
+ fi; \
+ done; \
+ if test "$$otarget" = "all" && test -z "$(TARGETS)"; then \
+ made_local=n/a; \
+ fi; \
+ if test -z "$$made_local"; then \
+ $(MAKE) "local-$$otarget" || exit 1; \
+ fi
+
+local-clean: x-local-clean
+ $(RM) -f *.o *.lo *.a *.la *.so $(CLEAN_TARGETS) $(PROGRAMS)
+ $(RM) -rf .libs
+
+local-distclean: local-clean x-local-distclean
+ $(RM) -f Makefile $(DISTCLEAN_TARGETS)
+
+local-extraclean: local-distclean
+ @if test -n "$(EXTRACLEAN_TARGETS)"; then \
+ echo $(RM) -f $(EXTRACLEAN_TARGETS) ; \
+ $(RM) -f $(EXTRACLEAN_TARGETS) ; \
+ fi
+
+local-all: $(TARGETS)
+
+local-depend:
+ $(MKDEP) $(INCLUDES) $(CFLAGS) *.c
+
+# to be filled in by the actual Makefile
+x-local-clean x-local-distclean:
+
+
+#
+# Implicit rules for creating outputs from input files
+#
+.SUFFIXES:
+.SUFFIXES: .c .lo .o
+
+.c.o:
+ $(COMPILE) -c $<
+
+.c.lo:
+ $(LT_COMPILE)
+
+.PHONY: all depend clean distclean extraclean install \
+ all-recursive depend-recursive clean-recursive distclean-recursive \
+ extraclean-recursive
+ local-all local-depend local-clean local-distclean local-extraclean \
+ x-local-clean x-local-distclean