build-system: Parallel build all subdirs.

This commit is contained in:
Chris Johns
2017-05-14 11:52:52 +10:00
parent 86ae03c691
commit a748603cb4
31 changed files with 215 additions and 107 deletions

View File

@@ -11,8 +11,8 @@ SUBDIRS = . $(RTEMS_BSP)
DIST_SUBDIRS = $(RTEMS_BSP) DIST_SUBDIRS = $(RTEMS_BSP)
## Let all RTEMS' make targets depend on ${RTEMS_BSP} ## Let all RTEMS' make targets depend on ${RTEMS_BSP}
all-local: ${RTEMS_BSP} all-local: $(RTEMS_BSP)
preinstall-am: ${RTEMS_BSP} preinstall-am: $(RTEMS_BSP)
## Pull in extra files intro the distribution ## Pull in extra files intro the distribution
EXTRA_DIST = ACKNOWLEDGEMENTS EXTRA_DIST = ACKNOWLEDGEMENTS

View File

@@ -1,6 +1,6 @@
ACLOCAL_AMFLAGS = -I aclocal ACLOCAL_AMFLAGS = -I aclocal
SUBDIRS = . @BSP_SUBDIRS@ _SUBDIRS = . @BSP_SUBDIRS@
DIST_SUBDIRS = @BSP_SUBDIRS@ DIST_SUBDIRS = @BSP_SUBDIRS@
clean-local: clean-local:

View File

@@ -1,30 +1,87 @@
## Borrowed from automake-1.4 and adapted to RTEMS ## Copyright 2017 Chris Johns <chrisj@rtems.org>
## NOTE: This is a temporary work-around to keep ##
## RTEMS's non automake standard make targets working. ## The following builds in parallel. The subdirectories are
## Once automake is fully integrated these make targets ## expanded into separate rules and all the targets are listed
## and this file will probably be removed ## and make runs as many as it can.
##
## A macro is defined and evaluated once for each directory. This
## creates the instance of the rule. Use $(info ...) to print them.
##
preinstall-recursive: SUBDIRS_dot = $(filter .,$(_SUBDIRS))
@set fnord $(MAKEFLAGS); amf=$$2; \ SUBDIRS_no_dot = $(filter-out .,$(_SUBDIRS))
dot_seen=no; \ SUBDIRS_no_dot_no_wrapup = $(filter-out wrapup,$(SUBDIRS_no_dot))
target=`echo $@ | sed s/-recursive//`; \ SUBDIRS_no_dot_no_testsuites = $(filter-out testsuites,$(SUBDIRS_no_dot))
list='$(SUBDIRS)'; for subdir in $$list; do \ SUBDIRS_no_dot_no_wrapup_no_testsuites = $(filter-out testsuites,$(SUBDIRS_no_dot_no_wrapup))
echo "Making $$target in $$subdir"; \ SUBDIRS_wrapup = $(filter wrapup,$(SUBDIRS_no_dot))
if test "$$subdir" = "."; then \ SUBDIRS_testsuites = $(filter testsuites,$(SUBDIRS_no_dot))
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
## This trick allows "-k" to keep its natural meaning when running a
## recursive rule.
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
preinstall: preinstall-recursive SUBDIR_TARGET = $(subst /,-,$1)
.PHONY: preinstall-recursive PREINSTALL_TARGET = preinstall-$(call SUBDIR_TARGET,$(1))
preintstall_targets = $(if "$(SUBDIRS_dot)" ".",preinstall-dot) $(foreach D,$(SUBDIRS_no_dot),$(call PREINSTALL_TARGET,$(D)))
define PREINSTALL_DIR
.PHONY: $1
$1:
@+set fnord $(MAKEFLAGS); amf=$$$$2; \
subdir=$(2); \
subdir_label=`echo $(1) | sed -e 's/preinstall-//'`; \
target=`echo $$@ | sed -e 's/-recursive//' -e "s/-$$$${subdir_label}//"`$(3); \
echo "Making $$$$target in $$$$subdir"; \
(cd $$$$subdir && $(MAKE) $(AM_MAKEFLAGS) $$$$target) \
|| case "$$$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac;
endef
$(if "$(SUBDIRS_dot)" ".",$(eval $(call PREINSTALL_DIR,preinstall-dot,.,-am)))
$(foreach D,$(SUBDIRS_no_dot),$(eval $(call PREINSTALL_DIR,$(call PREINSTALL_TARGET,$(D)),$(D))))
preinstall: $(preintstall_targets)
.PHONY: preinstall
define CPUKITDIR
.PHONY: $1
$1: $(preintstall_targets)
@+set fnord $(MAKEFLAGS); amf=$$$$2; \
subdir=$(2); \
target=`echo $(MAKECMDGOALS) | sed s/-recursive//`; \
if test "$$$$target" = "all-local-am"; then \
target="all-am"; \
fi; \
if test "$$$$target" = "all-local"; then \
target="all"; \
fi; \
echo "Making $$$$target in $$$$subdir"; \
if test "$$$$subdir" != "."; then \
cd $$$$subdir; \
$(MAKE) $(AM_MAKEFLAGS) $$$$local_target; \
fi;
endef
#
# This GNU make syntax is being used to stop automake thinking the code is for
# it.
#
$(if "$(SUBDIRS_dot)" ".",$(eval $(call CPUKITDIR,dot,.)))
$(foreach D,$(SUBDIRS_no_dot),$(eval $(call CPUKITDIR,$(D),$(D))))
#
# If there is a wrapup make it depend on all other directories except the
# testsuite so it is not entered until everything but the testsuite has
# finished.
#
$(if "$(SUBDIRS_wrapup)" "wrapup",wrapup: dot $(SUBDIRS_no_dot_no_wrapup_no_testsuites))
#
# If there is a testsuite make it depend on all other directories so it is not
# entered until everything else has finished.
#
$(if "$(SUBDIRS_testsuites)" "testsuites",testsuites: dot $(SUBDIRS_no_dot_no_testsuites))
#
# The general build all rule for automake.
#
all-local: preinstall $(if "$(SUBDIRS_dot)" ".",dot) $(SUBDIRS_no_dot)

View File

@@ -1,4 +1,9 @@
SUBDIRS = libcpu libbsp _SUBDIRS = libcpu libbsp
include $(top_srcdir)/automake/subdirs.am include $(top_srcdir)/automake/subdirs.am
include $(top_srcdir)/automake/local.am include $(top_srcdir)/automake/local.am
#
# The libsp cannot be built until libcpu is built.
#
libbsp: libcpu

View File

@@ -1,6 +1,6 @@
include $(top_srcdir)/automake/compile.am include $(top_srcdir)/automake/compile.am
SUBDIRS = @libbsp_cpu_subdir@ _SUBDIRS = @libbsp_cpu_subdir@
DIST_SUBDIRS = @libbsp_cpu_subdir@ DIST_SUBDIRS = @libbsp_cpu_subdir@
EXTRA_DIST = MERGE.PROCEDURE bsp.am EXTRA_DIST = MERGE.PROCEDURE bsp.am
@@ -42,5 +42,5 @@ include_bsp_HEADERS += shared/include/console-termios.h
include_bsp_HEADERS += shared/include/gpio.h include_bsp_HEADERS += shared/include/gpio.h
include $(srcdir)/preinstall.am include $(srcdir)/preinstall.am
include $(top_srcdir)/automake/subdirs.am
include $(top_srcdir)/automake/local.am include $(top_srcdir)/automake/local.am
include $(top_srcdir)/automake/subdirs.am

View File

@@ -3,7 +3,7 @@ ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
## Currently, the shared directory is not explicitly ## Currently, the shared directory is not explicitly
## added but it is present in the source tree. ## added but it is present in the source tree.
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include_bspdir = $(includedir)/bsp include_bspdir = $(includedir)/bsp
include_bsp_HEADERS = shared/include/linker-symbols.h include_bsp_HEADERS = shared/include/linker-symbols.h

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
# Descend into the @RTEMS_BSP_FAMILY@ directory # Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am include $(top_srcdir)/../../../automake/local.am

View File

@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
## Currently, the shared directory is not explicitly ## Currently, the shared directory is not explicitly
## added but it is present in the source tree. ## added but it is present in the source tree.
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include $(srcdir)/preinstall.am include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am include $(top_srcdir)/../../../automake/local.am

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
EXTRA_DIST = EXTRA_DIST =

View File

@@ -23,7 +23,7 @@ DISTCLEANFILES = include/bspopts.h
noinst_PROGRAMS = noinst_PROGRAMS =
SUBDIRS = . tools _SUBDIRS = . tools
nodist_include_bsp_HEADERS += include/bspimpl.h nodist_include_bsp_HEADERS += include/bspimpl.h
include_bsp_HEADERS = ../../i386/shared/irq/irq.h include_bsp_HEADERS = ../../i386/shared/irq/irq.h
@@ -258,3 +258,4 @@ EXTRA_DIST += times_p5
include $(srcdir)/preinstall.am include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../../automake/local.am include $(top_srcdir)/../../../../automake/local.am
include $(top_srcdir)/../../../../automake/subdirs.am

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
# Descend into the @RTEMS_BSP_FAMILY@ directory # Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am include $(top_srcdir)/../../../automake/local.am

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
EXTRA_DIST = EXTRA_DIST =

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include_bspdir = $(includedir)/bsp include_bspdir = $(includedir)/bsp
include_bsp_HEADERS = shared/include/linker-symbols.h include_bsp_HEADERS = shared/include/linker-symbols.h

View File

@@ -13,7 +13,7 @@ nodist_include_HEADERS = include/bspopts.h
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
DISTCLEANFILES = include/bspopts.h DISTCLEANFILES = include/bspopts.h
SUBDIRS = . tools _SUBDIRS = . tools
include_HEADERS += include/coverhd.h include_HEADERS += include/coverhd.h
include_HEADERS += include/i2c.h include_HEADERS += include/i2c.h

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am include $(top_srcdir)/../../../automake/local.am

View File

@@ -5,7 +5,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
# Descend into the @RTEMS_BSP_FAMILY@ directory # Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am include $(top_srcdir)/../../../automake/local.am

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
# Descend into the @RTEMS_BSP_FAMILY@ directory # Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am include $(top_srcdir)/../../../automake/local.am

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
# Descend into the @RTEMS_BSP_FAMILY@ directory # Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am include $(top_srcdir)/../../../automake/local.am

View File

@@ -3,7 +3,7 @@ ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
## Currently, the shared directory is not explicitly ## Currently, the shared directory is not explicitly
## added but it is present in the source tree. ## added but it is present in the source tree.
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include $(srcdir)/preinstall.am include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/subdirs.am

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
# FIXME: This does not work # FIXME: This does not work
# DIST_SUBDIRS = @all_subdirs@ support/old_exception_processing \ # DIST_SUBDIRS = @all_subdirs@ support/old_exception_processing \

View File

@@ -1,9 +1,9 @@
ACLOCAL_AMFLAGS = -I ../../../../aclocal ACLOCAL_AMFLAGS = -I ../../../../aclocal
SUBDIRS = . _SUBDIRS = .
SUBDIRS+= bootloader _SUBDIRS += bootloader
if QEMU if QEMU
SUBDIRS+= qemu_fakerom _SUBDIRS += qemu_fakerom
endif endif
include $(top_srcdir)/../../../../automake/compile.am include $(top_srcdir)/../../../../automake/compile.am
@@ -166,3 +166,4 @@ EXTRA_DIST += times.mcp750 times.mvme2307
include $(srcdir)/preinstall.am include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../../automake/local.am include $(top_srcdir)/../../../../automake/local.am
include $(top_srcdir)/../../../../automake/subdirs.am

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
# Descend into the @RTEMS_BSP_FAMILY@ directory # Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
EXTRA_DIST = EXTRA_DIST =
EXTRA_DIST += shared/console.c EXTRA_DIST += shared/console.c

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
# Descend into the @RTEMS_BSP_FAMILY@ directory # Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
EXTRA_DIST = EXTRA_DIST =

View File

@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I ../../../aclocal ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/subdirs.am
include $(top_srcdir)/../../../automake/local.am include $(top_srcdir)/../../../automake/local.am

View File

@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I ../../../aclocal
## Descend into the @RTEMS_BSP_FAMILY@ directory ## Descend into the @RTEMS_BSP_FAMILY@ directory
## Currently, the shared directory is not explicitly ## Currently, the shared directory is not explicitly
## added but it is present in the source tree. ## added but it is present in the source tree.
SUBDIRS = @RTEMS_BSP_FAMILY@ _SUBDIRS = @RTEMS_BSP_FAMILY@
EXTRA_DIST = EXTRA_DIST =

View File

@@ -4,7 +4,7 @@ EXTRA_DIST =
EXTRA_DIST += shared/include/cache.h EXTRA_DIST += shared/include/cache.h
EXTRA_DIST += shared/src/cache_manager.c EXTRA_DIST += shared/src/cache_manager.c
SUBDIRS = @libcpu_cpu_subdir@ _SUBDIRS = @libcpu_cpu_subdir@
DIST_SUBDIRS = @libcpu_cpu_subdir@ DIST_SUBDIRS = @libcpu_cpu_subdir@
include $(top_srcdir)/automake/subdirs.am include $(top_srcdir)/automake/subdirs.am

View File

@@ -4,30 +4,30 @@ include $(top_srcdir)/automake/compile.am
include $(top_srcdir)/automake/multilib.am include $(top_srcdir)/automake/multilib.am
# librtemscpu # librtemscpu
SUBDIRS = . score rtems sapi posix _SUBDIRS = . score rtems sapi posix
SUBDIRS += dev _SUBDIRS += dev
SUBDIRS += dtc/libfdt _SUBDIRS += dtc/libfdt
SUBDIRS += libcrypt _SUBDIRS += libcrypt
SUBDIRS += libcsupport libblock libfs _SUBDIRS += libcsupport libblock libfs
SUBDIRS += libdrvmgr _SUBDIRS += libdrvmgr
SUBDIRS += libnetworking librpc _SUBDIRS += libnetworking librpc
SUBDIRS += libpci _SUBDIRS += libpci
SUBDIRS += libi2c _SUBDIRS += libi2c
SUBDIRS += libmisc _SUBDIRS += libmisc
SUBDIRS += libmd _SUBDIRS += libmd
SUBDIRS += libgnat _SUBDIRS += libgnat
SUBDIRS += libdl _SUBDIRS += libdl
SUBDIRS += libstdthreads _SUBDIRS += libstdthreads
SUBDIRS += libdebugger _SUBDIRS += libdebugger
SUBDIRS += wrapup _SUBDIRS += wrapup
SUBDIRS += zlib _SUBDIRS += zlib
# applications # applications
SUBDIRS += ftpd _SUBDIRS += ftpd
SUBDIRS += telnetd _SUBDIRS += telnetd
SUBDIRS += pppd _SUBDIRS += pppd
SUBDIRS += mghttpd _SUBDIRS += mghttpd
noinst_DATA = preinstall-stamp noinst_DATA = preinstall-stamp
preinstall-stamp: preinstall-stamp:

View File

@@ -1,30 +1,74 @@
## Borrowed from automake-1.4 and adapted to RTEMS ## Copyright 2017 Chris Johns <chrisj@rtems.org>
## NOTE: This is a temporary work-around to keep ##
## RTEMS's non automake standard make targets working. ## The following builds in parallel. The subdirectories are
## Once automake is fully integrated these make targets ## expanded into separate rules and all the targets are listed
## and this file will probably be removed ## and make runs as many as it can.
##
## A macro is defined and evaluated once for each directory. This
## creates the instance of the rule. Use $(info ...) to print them.
##
preinstall-recursive: SUBDIRS_dot = $(filter .,$(_SUBDIRS))
@set fnord $(MAKEFLAGS); amf=$$2; \ SUBDIRS_no_dot = $(filter-out .,$(_SUBDIRS))
dot_seen=no; \ SUBDIRS_no_dot_no_wrapup = $(filter-out wrapup,$(SUBDIRS_no_dot))
target=`echo $@ | sed s/-recursive//`; \ SUBDIRS_wrapup = $(filter wrapup,$(SUBDIRS_no_dot))
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
## This trick allows "-k" to keep its natural meaning when running a
## recursive rule.
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
preinstall: preinstall-recursive SUBDIR_TARGET = $(subst /,-,$1)
.PHONY: preinstall-recursive PREINSTALL_TARGET = preinstall-$(call SUBDIR_TARGET,$(1))
preintstall_targets = $(if "$(SUBDIRS_dot)" ".",preinstall-dot) $(foreach D,$(SUBDIRS_no_dot),$(call PREINSTALL_TARGET,$(D)))
define PREINSTALL_DIR
.PHONY: $1
$1:
@+set fnord $(MAKEFLAGS); amf=$$$$2; \
subdir=$(2); \
subdir_label=`echo $(1) | sed -e 's/preinstall-//'`; \
target=`echo $$@ | sed -e 's/-recursive//' -e "s/-$$$${subdir_label}//"`$(3); \
echo "Making $$$$target in $$$$subdir"; \
(cd $$$$subdir && $(MAKE) $(AM_MAKEFLAGS) $$$$target) \
|| case "$$$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac;
endef
$(if "$(SUBDIRS_dot)" ".",$(eval $(call PREINSTALL_DIR,preinstall-dot,.,-am)))
$(foreach D,$(SUBDIRS_no_dot),$(eval $(call PREINSTALL_DIR,$(call PREINSTALL_TARGET,$(D)),$(D))))
preinstall: $(preintstall_targets)
.PHONY: preinstall
define CPUKITDIR
.PHONY: $1
$1: $(preintstall_targets)
@+set fnord $(MAKEFLAGS); amf=$$$$2; \
subdir=$(2); \
target=`echo $(MAKECMDGOALS) | sed s/-recursive//`; \
if test "$$$$target" = "all-local-am"; then \
target="all-am"; \
fi; \
if test "$$$$target" = "all-local"; then \
target="all"; \
fi; \
echo "Making $$$$target in $$$$subdir"; \
if test "$$$$subdir" != "."; then \
cd $$$$subdir; \
$(MAKE) $(AM_MAKEFLAGS) $$$$local_target; \
fi;
endef
#
# This GNU make syntax is being used to stop automake thinking the code is for
# it.
#
$(if "$(SUBDIRS_dot)" ".",$(eval $(call CPUKITDIR,dot,.)))
$(foreach D,$(SUBDIRS_no_dot),$(eval $(call CPUKITDIR,$(D),$(D))))
#
# If there is a wrapup make it depend on all other directories so it is not
# entered until they have finished.
#
$(if "$(SUBDIRS_wrapup)" "wrapup",wrapup: dot $(foreach D,$(SUBDIRS_no_dot_no_wrapup),$(D)),)
all-local: preinstall $(if "$(SUBDIRS_dot)" ".",dot) $(SUBDIRS_no_dot)

View File

@@ -1,7 +1,7 @@
include $(top_srcdir)/automake/multilib.am include $(top_srcdir)/automake/multilib.am
include $(top_srcdir)/automake/compile.am include $(top_srcdir)/automake/compile.am
SUBDIRS = src/nfsclient _SUBDIRS = src/nfsclient
EXTRA_DIST = README EXTRA_DIST = README

View File

@@ -1,7 +1,7 @@
include $(top_srcdir)/automake/multilib.am include $(top_srcdir)/automake/multilib.am
include $(top_srcdir)/automake/compile.am include $(top_srcdir)/automake/compile.am
SUBDIRS = cpu _SUBDIRS = cpu
## include ## include

View File

@@ -1,4 +1,4 @@
SUBDIRS = @RTEMS_CPU@ _SUBDIRS = @RTEMS_CPU@
DIST_SUBDIRS = DIST_SUBDIRS =
DIST_SUBDIRS += arm DIST_SUBDIRS += arm