From 53c20290a3708009caaa8e11178423216c25dfa7 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 26 Apr 2004 19:20:45 +0000 Subject: [PATCH] * lib.in (PARSE_OBJLISTS): New variable. (lib$(LIB)$(STLIBEXT), lib$(LIB)$(SHLIBVEXT), lib$(LIB)$(PFLIBEXT)): Use it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16275 dc483132-0cff-0310-8789-dd5450dbe970 --- src/config/ChangeLog | 4 ++++ src/config/lib.in | 19 ++++++------------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/config/ChangeLog b/src/config/ChangeLog index 9e583fe40..714df4143 100644 --- a/src/config/ChangeLog +++ b/src/config/ChangeLog @@ -1,5 +1,9 @@ 2004-04-26 Ken Raeburn + * lib.in (PARSE_OBJLISTS): New variable. + (lib$(LIB)$(STLIBEXT), lib$(LIB)$(SHLIBVEXT)): Use it. + (lib$(LIB)$(PFLIBEXT)): Use it. + * shlib.conf (INIT_FINI_PREP): New variable. Default to a no-op, but let each platform set setup routines to process initialization and finalization options for the default diff --git a/src/config/lib.in b/src/config/lib.in index c2fdc9cfc..1b3feb604 100644 --- a/src/config/lib.in +++ b/src/config/lib.in @@ -29,22 +29,19 @@ PFOBJLISTS=$(STOBJLISTS:.ST=.PF) dummy-target-1 $(SUBDIROBJLISTS) $(SUBDIROBJLISTS:.ST=.SH) $(SUBDIROBJLISTS:.ST=.PF): all-recurse +# Gets invoked as $(PARSE_OBJLISTS) list-of-OBJS.*-files +PARSE_OBJLISTS= set -x && $(PERL) -p -e '$$e=$$ARGV; $$e =~ s/OBJS\...$$//; s/^/ /; s/ $$//; s/ / $$e/g;' + lib$(LIB)$(STLIBEXT): $(STOBJLISTS) $(RM) $@ @echo "building static $(LIB) library" - @dirs=`echo $(STOBJLISTS) | \ - sed -e 's%/OBJS.ST%%g' -e 's%OBJS.ST%.%'`; \ - $(AR) cq $@ `for d in $$dirs; do \ - sed -e '/^$$/d' -e "s%^%$$d/%" -e "s% % $$d/%g" \ - $$d/OBJS.ST; done` + set -x; objlist=`$(PARSE_OBJLISTS) $(STOBJLISTS)` && $(AR) cq $@ $$objlist $(RANLIB) $@ lib$(LIB)$(SHLIBVEXT): $(SHOBJLISTS) $(SHLIB_EXPDEPS) $(SHLIB_EXPORT_FILE_DEP) $(RM) $@ @echo "building shared $(LIB) library ($(LIBMAJOR).$(LIBMINOR))" - @objlist=`set -x && $(PERL) -p -e '$$e=$$ARGV; $$e =~ s/OBJS.SH$$//; s/^/ /; s/ $$//; s/ / $$e/g;' $(SHOBJLISTS)` && \ - set -x && \ - $(MAKE_SHLIB_COMMAND) + set -x; objlist=`$(PARSE_OBJLISTS) $(SHOBJLISTS)` && $(MAKE_SHLIB_COMMAND) lib$(LIB)$(SHLIBSEXT): lib$(LIB)$(SHLIBVEXT) $(RM) $@ @@ -56,11 +53,7 @@ lib$(LIB)$(SHLIBEXT): lib$(LIB)$(SHLIBVEXT) lib$(LIB)$(PFLIBEXT): $(PFOBJLISTS) $(RM) $@ @echo "building profiled $(LIB) library" - @dirs=`echo $(PFOBJLISTS) | \ - sed -e 's%/OBJS.PF%%g' -e 's%OBJS.PF%.%'`; \ - $(AR) cq $@ `for d in $$dirs; do \ - sed -e '/^$$/d' -e "s%^%$$d/%" -e "s% % $$d/%g" \ - $$d/OBJS.PF; done` + set -x; objlist=`$(PARSE_OBJLISTS) $(PFOBJLISTS)` && $(AR) cq $@ $$objlist $(RANLIB) $@ $(TOPLIBD)/lib$(LIB)$(STLIBEXT): lib$(LIB)$(STLIBEXT) -- 2.26.2