diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-02-13 06:51:15 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-02-13 06:51:15 +0000 |
commit | a67277b6a081d2107fa2f5e36492c30db6fc1fe2 (patch) | |
tree | 1cefc6685a94f1bc3ffdf5b7ac91ce367e659fb1 /libc | |
parent | 4203076cd151a4d48fd5a97b7cb1ddb0303411d6 (diff) |
touchup the $(AR) mojo to address some bugs by Peter Kjellerstedt
Diffstat (limited to 'libc')
-rw-r--r-- | libc/Makefile | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libc/Makefile b/libc/Makefile index 17937bbc8..fc31a2cbb 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -53,12 +53,17 @@ all: halfclean $(LIBNAME_TARGET) $(DO_SHARED) # target is evaluated. That means if you run `rm obj.* ; make`, the wildcard # will evaluate to no files :(. $(LIBNAME) ar-target: subdirs - objs=`cat obj.*` ; $(AR) $(ARFLAGS) $(LIBNAME) $$objs - objs=`cat obj.*` ; $(AR) dN 2 $(LIBNAME) $$objs - @for objfile in obj.signal obj.string.generic obj.string \ - obj.sysdeps.$(TARGET_ARCH) obj.sysdeps.common ; do \ - echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \ - objs=`cat $$objfile` ; \ + objs=`cat obj.*` ; \ + $(AR) $(ARFLAGS) $(LIBNAME) $$objs && \ + $(AR) dN 2 $(LIBNAME) $$objs && \ + $(AR) dN 2 $(LIBNAME) $$objs + @for objfile in obj.signal \ + obj.string.generic obj.string.$(TARGET_ARCH) obj.string \ + obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \ + if [ -e $$objfile ] ; then \ + echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \ + objs=`cat $$objfile` ; \ + fi ; \ $(AR) $(ARFLAGS) $(LIBNAME) $$objs || exit 1 ; \ done $(RANLIB) $(LIBNAME) |