summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-04-16 18:23:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-04-16 18:23:48 +0000
commit6b7ab9bf7242773ce8309f6fd5c6e53357fc1fd1 (patch)
tree5a4dabbc167f571c3c8adfb1ce6ea4f30867fe9c /make
parentc00fa3858d116a6aefb86b63ffffe2e1c46ea192 (diff)
downloadrtems-6b7ab9bf7242773ce8309f6fd5c6e53357fc1fd1.tar.bz2
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
FYI: I am not talking about using "make -C <dir>", which probably is much faster on M$ hosts than RTEMS's implementation, but about removing --enable-gmake-print support and to apply a variant of automake's subdirectory. Automake's subdirectory rule seems to be a little bit faster, but I wouldn't bet on this. Attached to this mail is my proposal. After applying the patch, please run cvs rm aclocal/enable-gmake-print.m4 ./autogen
Diffstat (limited to 'make')
-rw-r--r--make/Templates/Makefile.inc.in2
-rw-r--r--make/directory.cfg57
-rw-r--r--make/main.cfg4
-rw-r--r--make/target.cfg.in1
4 files changed, 13 insertions, 51 deletions
diff --git a/make/Templates/Makefile.inc.in b/make/Templates/Makefile.inc.in
index 1c01539aad..a763dae999 100644
--- a/make/Templates/Makefile.inc.in
+++ b/make/Templates/Makefile.inc.in
@@ -32,7 +32,7 @@ export OBJCOPY
RTEMS_HOST = @RTEMS_HOST@
RTEMS_CUSTOM = $(prefix)/make/custom/$(RTEMS_BSP).cfg
PROJECT_ROOT = $(prefix)/
-RTEMS_USE_OWN_PDIR = @RTEMS_USE_OWN_PDIR@
+RTEMS_USE_OWN_PDIR = no
RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
RTEMS_HAS_CPLUSPLUS = @RTEMS_HAS_CPLUSPLUS@
diff --git a/make/directory.cfg b/make/directory.cfg
index 68b68d79e0..1714204318 100644
--- a/make/directory.cfg
+++ b/make/directory.cfg
@@ -8,50 +8,17 @@
# See also make/main.cfg
#
-# include $(RTEMS_ROOT)/make/main.cfg
+# RULE=$(shell echo $@ | $(SED) -e s/debug_// -e s/profile_//)
-# on a 'make -k' we don't want to bomb out of directory list
-EXIT_CMD=exit 1
-ifeq (k, $(findstring k, $(MAKEFLAGS)))
-EXIT_CMD=true
-endif
-
-RULE=$(shell echo $@ | $(SED) -e s/debug_// -e s/profile_//)
-
-ifeq ($(RTEMS_USE_OWN_PDIR),yes)
+# This is a simplified variant of automake-1.4's rule for handling
+# subdirectories
$(RECURSE_TARGETS):
- @$(ECHO); \
- BASEDIR=`pwd`; \
- test -d $$BASEDIR || $(EXIT_CMD) ; \
- for subd in $(SUB_DIRS) xxx; \
- do if [ $$subd != xxx ] ; then \
- cd $$BASEDIR; \
- if [ ! -d $$subd ] ; then \
- $(ECHO) "*** ERROR -- Directory ($$subd) does not exist!!!"; \
- $(EXIT_CMD) ; \
- fi ; \
- $(ECHO); \
- $(ECHO) "*** $$BASEDIR/$$subd ($@)" ; \
- cmd="cd $$subd; $(MAKE) $(RULE)"; \
- $(ECHO) $$cmd; \
- eval $$cmd || $(EXIT_CMD); \
- fi; done; \
- $(ECHO); \
- $(ECHO) "*** $$BASEDIR/$@ ($@) Finished."; \
- $(ECHO)
- $($@_WRAPUP)
-else
-ifdef RECURSE_TARGETS
-$(RECURSE_TARGETS):
- @$(ECHO) ; set -e ; \
- if [ "$(SUB_DIRS)" != "" ] ; then \
- sdirs="$(SUB_DIRS)" ; \
- else \
- sdirs="xxx" ; \
- fi ; \
- if [ "$$sdirs" != "xxx" ] ; then \
- for subd in $$sdirs; do $(MAKE) -w -C $$subd $(RULE); done ;\
- fi
-endif
-endif
-
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed -e s/-recursive// -e s/debug_// -e s/profile_// `; \
+ list='$(SUB_DIRS)'; for subdir in $$list; do \
+ echo "Making $$target RTEMS_BSP=${RTEMS_BSP} in $$subdir"; \
+ local_target="$$target"; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
diff --git a/make/main.cfg b/make/main.cfg
index f35000a989..a2599ce2ab 100644
--- a/make/main.cfg
+++ b/make/main.cfg
@@ -66,10 +66,6 @@ VARIANTS=${TARGET_ARCH} ${TARGET_VARIANTS:%=${TARGET_ARCH}-%}
RECURSE_TARGETS=all clean protos get clobber depend install \
$(TARGET_VARIANTS) $(TARGET_VARIANTS:%=%_install)
-ifeq ($(RTEMS_USE_OWN_PDIR),yes)
-MAKEFLAGS += --no-print-directory
-endif
-
${ARCH}:
test -d ${ARCH} || $(MKDIR) ${ARCH}
diff --git a/make/target.cfg.in b/make/target.cfg.in
index cbba810741..5a4a6c8100 100644
--- a/make/target.cfg.in
+++ b/make/target.cfg.in
@@ -38,7 +38,6 @@ export CXX
RTEMS_CROSS_TARGET=@rtems_cv_prog_cc_cross@
RTEMS_HOST = @RTEMS_HOST@
-RTEMS_USE_OWN_PDIR = @RTEMS_USE_OWN_PDIR@
RTEMS_HAS_MULTIPROCESSING = @RTEMS_HAS_MULTIPROCESSING@
RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@