From 693e7b964f9d91d9df97b776718271c94131dcbd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Mar 1995 18:42:51 +0000 Subject: Fri Mar 17 12:58:37 1995 Roland McGrath * sunrpc/Makefile (install-lib): Variable removed. (rpcsvc-objs): Variable removed. (extra-objs): Don't include $(rpcsvc-objs). (extra-libs): New variable, contains librpcsvc. (librpcsvc-routines): New variable. (librpcsvc-inhibit-o): New variable, contains .so. (omit-deps): Set this to $(librpcsvc-routines). ($(objpfx)rpcgen): Don't use $(libc.a). (lib, $(objpfx)librpcsvc.a): Targets removed. * o-iterator.mk, extra-lib.mk: New files. * Makerules (o-iterator): New variable. [extra-libs]: Include extra-lib.mk to generate rules for each word of $(extra-libs). * Makefile (distribute): Add extra-lib.mk, o-iterator.mk. (IMPLICIT_ONE, *_MAX_10_EXP_LOG): Macros removed; no longer needed. * stdio/fpioconst.c, stdio/fpioconst.h: Don't use LDBL_MAX_10_EXP_LOG; LAST_POW10 defines the maximal available exponent. --- Makerules | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Makerules') diff --git a/Makerules b/Makerules index 6a8073006c..d8d571d993 100644 --- a/Makerules +++ b/Makerules @@ -262,6 +262,23 @@ sysdep_routines := $(sysdep_routines) # This is the list of all object files, gotten by # replacing every ".c" in `sources' with a ".o". override objects := $(addprefix $(objpfx),$(sources:.c=.o)) + + +# This variable is used in ``include $(o-iterator)'' after defining +# $(o-iterator-doit) to produce some desired rule using $o for the object +# suffix, and setting $(object-suffixes-left) to $(object-suffixes); a copy +# is produced for each object suffix in use. +o-iterator = $(patsubst %,$(..)o-iterator.mk,$(object-suffixes)) + +# The makefile may define $(extra-libs) with `libfoo libbar' +# to build libfoo.a et al from the modules listed in $(libfoo-routines). +ifdef extra-libs +# extra-lib.mk is included once for each extra lib to define rules +# to build it, and to add its objects to the various variables. +# During its evaluation, $(lib) is set to the name of the library. +extra-libs-left := $(extra-libs) +include $(patsubst %,$(..)extra-lib.mk,$(extra-libs)) +endif +depfiles := $(strip $(sources:.c=.d) \ $(patsubst %.o,%.d,$(filter %.o,$(extra-objs))) \ -- cgit v1.2.3