summaryrefslogtreecommitdiffstats
path: root/c/src/wrapup/Makefile.am
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-12-13 16:16:44 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-12-13 16:16:44 +0000
commit4bdebdfe38003165d82a6f0b239d5fb3e4cd9a5b (patch)
tree3cf017f667f3ca519597e8ddbecb9fd13f204643 /c/src/wrapup/Makefile.am
parentad0c286463e0f32be96924b9c138473429d91d73 (diff)
downloadrtems-4bdebdfe38003165d82a6f0b239d5fb3e4cd9a5b.tar.bz2
Patch rtems-rc-19991203-4.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>"""
which is an adaptation of a patch from Ian Lance Taylor plus a few other changes that should significantly speed up building librtemsall.a.
Diffstat (limited to 'c/src/wrapup/Makefile.am')
-rw-r--r--c/src/wrapup/Makefile.am81
1 files changed, 40 insertions, 41 deletions
diff --git a/c/src/wrapup/Makefile.am b/c/src/wrapup/Makefile.am
index e974be5387..7e4282dee4 100644
--- a/c/src/wrapup/Makefile.am
+++ b/c/src/wrapup/Makefile.am
@@ -1,8 +1,8 @@
-#
-# $Id$
-#
-# build and install "glommed" librtemsall.a
-#
+##
+## $Id$
+##
+## build and install "glommed" librtemsall.a
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -12,13 +12,22 @@ include $(top_srcdir)/../../automake/lib.am
LIBNAME = librtemsall
LIB = $(PROJECT_RELEASE)/lib/$(LIBNAME)${LIB_VARIANT}.a
+if HAS_NETWORKING
+LIBNETWORKING = \
+ $(PROJECT_RELEASE)/lib/libnetworking$(LIB_VARIANT).a \
+ $(PROJECT_RELEASE)/lib/librpc$(LIB_VARIANT).a
+endif
+
+if HAS_RDBG
+LIBRDBG = $(PROJECT_RELEASE)/lib/librdbg$(LIB_VARIANT).a
+endif
+
SRCS = $(wildcard $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a) \
$(PROJECT_RELEASE)/lib/librtems$(LIB_VARIANT).a \
$(wildcard $(PROJECT_RELEASE)/lib/libposix$(LIB_VARIANT).a) \
$(wildcard $(PROJECT_RELEASE)/lib/libitron$(LIB_VARIANT).a) \
- $(wildcard $(PROJECT_RELEASE)/lib/libnetworking$(LIB_VARIANT).a) \
- $(wildcard $(PROJECT_RELEASE)/lib/librpc$(LIB_VARIANT).a) \
- $(wildcard $(PROJECT_RELEASE)/lib/librdbg$(LIB_VARIANT).a) \
+ $(LIBNETWORKING) \
+ $(LIBRDBG) \
$(wildcard $(PROJECT_RELEASE)/lib/libcpu$(LIB_VARIANT).a) \
$(wildcard $(PROJECT_RELEASE)/lib/librtcio$(LIB_VARIANT).a) \
$(wildcard $(PROJECT_RELEASE)/lib/libserialio$(LIB_VARIANT).a) \
@@ -27,8 +36,6 @@ SRCS = $(wildcard $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a) \
$(PROJECT_RELEASE)/lib/libmisc$(LIB_VARIANT).a \
$(wildcard $(PROJECT_RELEASE)/lib/rtems-ctor$(LIB_VARIANT).o)
-CLEANFILES += $(ARCH)/check
-
TMPINSTALL_FILES += \
$(PROJECT_RELEASE)/lib/$(LIBNAME)${LIB_VARIANT}.a
@@ -36,42 +43,34 @@ all: $(ARCH) $(TMPINSTALL_FILES)
install: all
-$(ARCH)/check: $(SRCS)
- @$(RM) $@; touch $@;
- @for f in $(SRCS); do \
+$(LIB): $(SRCS)
+ rm -f $@
+ rm -rf $(ARCH)/*
+ for f in $(SRCS); do \
case $$f in \
- *.o) echo " `basename $$f`" >> $@ \
+ *.o | *.rel) \
+ if test -f $(ARCH)/`basename $$f`; then \
+ if cmp $$f $(ARCH)/`basename $$f`; then \
+ true; \
+ else \
+ echo 1>&2 "ERROR -- `basename $$f` in multiple files"; \
+ exit 1; \
+ fi; \
+ else \
+ cp $$f $(ARCH)/; \
+ chmod a-w $(ARCH)/`basename $$f`; \
+ fi; \
;; \
- *.rel) echo " `basename $$f`" >> $@ \
- ;; \
- *.a) \
- ( list=`$(AR) t $$f`;\
- for i in $$list; do \
- if fgrep " $$i" $@; then \
- echo "ERROR -- $$i in multiple files"; exit 1; \
- fi;\
- echo " $$i" >> $@;\
- done; ) \
- ;; \
- esac; \
- done;
-
-$(LIB): $(ARCH)/check
- @for f in $(SRCS); do \
- case $$f in \
- *.o) $(AR) ru $@ $$f \
- ;;\
- *.rel) $(AR) ru $@ $$f \
- ;;\
*.a) \
(cd $(ARCH); \
- list=`$(AR) t ../$$f`; \
- $(AR) x ../$$f $$list; $(AR) ru ../$@ $$list; \
- $(RM) $$list ;)\
+ $(AR) x ../$$f; \
+ test $$? -eq 0 || exit 1; \
+ chmod a-w *; ) \
;; \
esac; \
- done;
- @$(RANLIB) $@
- @echo "*** Glommed $@"
+ done
+ $(AR) rc $@ $(ARCH)/*
+ rm -f $(ARCH)/*
+ $(RANLIB) $@
include $(top_srcdir)/../../automake/local.am