summaryrefslogtreecommitdiffstats
path: root/c/src/make
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-07-30 17:52:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-07-30 17:52:50 +0000
commit1896a650fc382d343844b56f4b79efe31562755e (patch)
tree922de4dd1237cfcf6c7be0a8050e1e964fceadad /c/src/make
parentFixed typos. (diff)
downloadrtems-1896a650fc382d343844b56f4b79efe31562755e.tar.bz2
Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
The main topic is replacing the hard-coded values for HAS_MP and HAS_RDBG in custom/*.cfg with per-bsp configuration-time autoconf checks (This is the patch I had mentioned before earlier this week). CHANGES * HAS_MP removed from custom/*.cfg, replaced with configuration time autoconf check * HAS_RDBG removed from custom/*.cfg, replaced with configuration-time autoconf check * NEW: c/src/make/bsp.cfg.in, takes configuration-time checked per-bsp values (i.e. HAS_MP, HAS_RDBG), gets installed as $(prefix)/<bsp>/make/bsp.cfg * NEW: default.cfg includes bsp.cfg - this change is backward compatible. * IMPORT_SRC: apply VPATH instead for ts_386ex/i386ex subdirectory Makefile.ins * HACK: a bug in acpolish mis-handles addtions to makefile variables which are enclosed in gmake conditionals: c/src/lib/libbsp/m68k/ods68302/start302/Makefile.in * Apply inline_dir, HAS_MP and HAS_RDBG for avoiding configuration of unneeded subdirectories in various configure.in files. * Several minor changes in Makefile.ins and configure.ins, wrt. to the order of including *.cfg and defining Makefile variables APPLYING THE PATCH: patch -p1 < rtems-rc-19990709-4.diff ./autogen
Diffstat (limited to 'c/src/make')
-rw-r--r--c/src/make/Makefile.am4
-rw-r--r--c/src/make/Makefile.in45
-rw-r--r--c/src/make/Templates/Makefile.in2
-rw-r--r--c/src/make/aclocal.m439
-rw-r--r--c/src/make/bsp.cfg.in9
-rw-r--r--c/src/make/compilers/Makefile.in2
-rw-r--r--c/src/make/configure49
-rw-r--r--c/src/make/configure.in13
-rw-r--r--c/src/make/custom/Makefile.am4
-rw-r--r--c/src/make/custom/Makefile.in6
-rw-r--r--c/src/make/custom/default.cfg.in15
-rw-r--r--c/src/make/main.cfg.in3
12 files changed, 139 insertions, 52 deletions
diff --git a/c/src/make/Makefile.am b/c/src/make/Makefile.am
index dfc6f5cdde..29ec3234bc 100644
--- a/c/src/make/Makefile.am
+++ b/c/src/make/Makefile.am
@@ -26,6 +26,10 @@ rtems_bspdir = $(rtemsdir)/@RTEMS_BSP@
rtems_bsp_DATA = \
Makefile.inc
+rtems_bsp_makedir = $(rtems_bspdir)/make
+rtems_bsp_make_DATA = \
+bsp.cfg
+
if MAINTAINER_MODE
$(srcdir)/main.cfg.in: $(top_srcdir)/@RTEMS_TOPdir@/make/main.cfg
sed -e 's%\$$(RTEMS_BSP)%\@RTEMS_BSP\@%g' < $< >$@
diff --git a/c/src/make/Makefile.in b/c/src/make/Makefile.in
index 5a7281b61c..ea4ff45c1b 100644
--- a/c/src/make/Makefile.in
+++ b/c/src/make/Makefile.in
@@ -87,6 +87,8 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
CXX_FOR_TARGET = @CXX_FOR_TARGET@
GCCSED = @GCCSED@
+HAS_MP = @HAS_MP@
+HAS_RDBG = @HAS_RDBG@
INSTALL_CHANGE = @INSTALL_CHANGE@
KSH = @KSH@
LN = @LN@
@@ -143,14 +145,19 @@ rtems_bspdir = $(rtemsdir)/@RTEMS_BSP@
rtems_bsp_DATA = Makefile.inc
+rtems_bsp_makedir = $(rtems_bspdir)/make
+rtems_bsp_make_DATA = bsp.cfg
+
+
SUBDIRS = compilers custom Templates
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../../../mkinstalldirs
-CONFIG_CLEAN_FILES = Makefile.inc main.cfg host.cfg target.cfg
-DATA = $(noinst_DATA) $(rtems_bsp_DATA) $(rtems_make_DATA)
+CONFIG_CLEAN_FILES = Makefile.inc main.cfg host.cfg target.cfg bsp.cfg
+DATA = $(noinst_DATA) $(rtems_bsp_DATA) $(rtems_bsp_make_DATA) \
+$(rtems_make_DATA)
DIST_COMMON = Makefile.am Makefile.in Makefile.inc.in aclocal.m4 \
-configure configure.in host.cfg.in main.cfg.in target.cfg.in
+bsp.cfg.in configure configure.in host.cfg.in main.cfg.in target.cfg.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@@ -181,6 +188,8 @@ host.cfg: $(top_builddir)/config.status host.cfg.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
target.cfg: $(top_builddir)/config.status target.cfg.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+bsp.cfg: $(top_builddir)/config.status bsp.cfg.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
install-rtems_bspDATA: $(rtems_bsp_DATA)
@$(NORMAL_INSTALL)
@@ -201,6 +210,25 @@ uninstall-rtems_bspDATA:
rm -f $(DESTDIR)$(rtems_bspdir)/$$p; \
done
+install-rtems_bsp_makeDATA: $(rtems_bsp_make_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(rtems_bsp_makedir)
+ @list='$(rtems_bsp_make_DATA)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(rtems_bsp_makedir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(rtems_bsp_makedir)/$$p; \
+ else if test -f $$p; then \
+ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(rtems_bsp_makedir)/$$p"; \
+ $(INSTALL_DATA) $$p $(DESTDIR)$(rtems_bsp_makedir)/$$p; \
+ fi; fi; \
+ done
+
+uninstall-rtems_bsp_makeDATA:
+ @$(NORMAL_UNINSTALL)
+ list='$(rtems_bsp_make_DATA)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(rtems_bsp_makedir)/$$p; \
+ done
+
install-rtems_makeDATA: $(rtems_make_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(rtems_makedir)
@@ -383,13 +411,15 @@ installcheck: installcheck-recursive
install-exec-am:
install-exec: install-exec-recursive
-install-data-am: install-rtems_bspDATA install-rtems_makeDATA
+install-data-am: install-rtems_bspDATA install-rtems_bsp_makeDATA \
+ install-rtems_makeDATA
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
-uninstall-am: uninstall-rtems_bspDATA uninstall-rtems_makeDATA
+uninstall-am: uninstall-rtems_bspDATA uninstall-rtems_bsp_makeDATA \
+ uninstall-rtems_makeDATA
uninstall: uninstall-recursive
all-am: Makefile $(DATA)
all-redirect: all-recursive
@@ -397,7 +427,9 @@ install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(rtems_bspdir) $(DESTDIR)$(rtems_makedir)
+ $(mkinstalldirs) $(DESTDIR)$(rtems_bspdir) \
+ $(DESTDIR)$(rtems_bsp_makedir) \
+ $(DESTDIR)$(rtems_makedir)
mostlyclean-generic:
@@ -431,6 +463,7 @@ maintainer-clean: maintainer-clean-recursive
-rm -f config.status
.PHONY: uninstall-rtems_bspDATA install-rtems_bspDATA \
+uninstall-rtems_bsp_makeDATA install-rtems_bsp_makeDATA \
uninstall-rtems_makeDATA install-rtems_makeDATA install-data-recursive \
uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
diff --git a/c/src/make/Templates/Makefile.in b/c/src/make/Templates/Makefile.in
index ec4947ac00..a3b12bbb0a 100644
--- a/c/src/make/Templates/Makefile.in
+++ b/c/src/make/Templates/Makefile.in
@@ -86,6 +86,8 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
CXX_FOR_TARGET = @CXX_FOR_TARGET@
GCCSED = @GCCSED@
+HAS_MP = @HAS_MP@
+HAS_RDBG = @HAS_RDBG@
INSTALL_CHANGE = @INSTALL_CHANGE@
KSH = @KSH@
LN = @LN@
diff --git a/c/src/make/aclocal.m4 b/c/src/make/aclocal.m4
index dbae555199..43a52a9020 100644
--- a/c/src/make/aclocal.m4
+++ b/c/src/make/aclocal.m4
@@ -937,18 +937,47 @@ else
fi
])dnl
+dnl $Id$
+
+AC_DEFUN(RTEMS_CHECK_MULTIPROCESSING,
+[dnl
+AC_REQUIRE([RTEMS_TOP])dnl
+AC_REQUIRE([RTEMS_CHECK_CPU])dnl
+AC_CACHE_CHECK([whether BSP supports multiprocessing],
+ rtems_cv_HAS_MP,
+ [dnl
+ if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${$1}/shmsupp"; then
+ if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
+ rtems_cv_HAS_MP="yes" ;
+ else
+ rtems_cv_HAS_MP="disabled";
+ fi
+ else
+ rtems_cv_HAS_MP="no";
+ fi
+ ])
+if test "$rtems_cv_HAS_MP" = "yes"; then
+HAS_MP="yes"
+else
+HAS_MP="no"
+fi
+AC_SUBST(HAS_MP)
+])
+
AC_DEFUN(RTEMS_CHECK_RDBG,
[dnl
AC_REQUIRE([RTEMS_TOP])dnl
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
-AC_CACHE_CHECK([whether cpu supports librdbg],
- rtems_cv_has_rdbg,
+AC_CACHE_CHECK([whether BSP supports librdbg],
+ rtems_cv_HAS_RDBG,
[
- if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/librdbg/${RTEMS_CPU}"; then
- rtems_cv_has_rdbg="yes" ;
+ if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/librdbg/${RTEMS_CPU}/${$1}"; then
+ rtems_cv_HAS_RDBG="yes" ;
else
- rtems_cv_has_rdbg="no";
+ rtems_cv_HAS_RDBG="no";
fi
])
+HAS_RDBG="$rtems_cv_HAS_RDBG"
+AC_SUBST(HAS_RDBG)
])
diff --git a/c/src/make/bsp.cfg.in b/c/src/make/bsp.cfg.in
new file mode 100644
index 0000000000..f2acdebb4c
--- /dev/null
+++ b/c/src/make/bsp.cfg.in
@@ -0,0 +1,9 @@
+##
+## Does this BSP support multiprocessing ?
+##
+HAS_MP = @HAS_MP@
+
+##
+## Does this BSP support RTEMS's remote debugger ?
+##
+HAS_RDBG = @HAS_RDBG@
diff --git a/c/src/make/compilers/Makefile.in b/c/src/make/compilers/Makefile.in
index 013dcb26fe..d488642e79 100644
--- a/c/src/make/compilers/Makefile.in
+++ b/c/src/make/compilers/Makefile.in
@@ -86,6 +86,8 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
CXX_FOR_TARGET = @CXX_FOR_TARGET@
GCCSED = @GCCSED@
+HAS_MP = @HAS_MP@
+HAS_RDBG = @HAS_RDBG@
INSTALL_CHANGE = @INSTALL_CHANGE@
KSH = @KSH@
LN = @LN@
diff --git a/c/src/make/configure b/c/src/make/configure
index 50532e36d4..82445b67ce 100644
--- a/c/src/make/configure
+++ b/c/src/make/configure
@@ -2921,35 +2921,56 @@ echo "$ac_t""$rtems_cv_prog_gas_code16" 1>&6
-
echo $ac_n "checking for make/custom/$RTEMS_BSP.cfg""... $ac_c" 1>&6
-echo "configure:2927: checking for make/custom/$RTEMS_BSP.cfg" >&5
+echo "configure:2926: checking for make/custom/$RTEMS_BSP.cfg" >&5
if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then
echo "$ac_t""yes" 1>&6
else
{ echo "configure: error: no" 1>&2; exit 1; }
fi
+echo $ac_n "checking whether BSP supports multiprocessing""... $ac_c" 1>&6
+echo "configure:2934: checking whether BSP supports multiprocessing" >&5
+if eval "test \"`echo '$''{'rtems_cv_HAS_MP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${RTEMS_BSP}/shmsupp"; then
+ if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
+ rtems_cv_HAS_MP="yes" ;
+ else
+ rtems_cv_HAS_MP="disabled";
+ fi
+ else
+ rtems_cv_HAS_MP="no";
+ fi
+
+fi
+
+echo "$ac_t""$rtems_cv_HAS_MP" 1>&6
+if test "$rtems_cv_HAS_MP" = "yes"; then
+HAS_MP="yes"
+else
+HAS_MP="no"
+fi
+
-if test "$RTEMS_HAS_RDBG" = "yes"; then
- echo $ac_n "checking whether cpu supports librdbg""... $ac_c" 1>&6
-echo "configure:2937: checking whether cpu supports librdbg" >&5
-if eval "test \"`echo '$''{'rtems_cv_has_rdbg'+set}'`\" = set"; then
+echo $ac_n "checking whether BSP supports librdbg""... $ac_c" 1>&6
+echo "configure:2959: checking whether BSP supports librdbg" >&5
+if eval "test \"`echo '$''{'rtems_cv_HAS_RDBG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/librdbg/${RTEMS_CPU}"; then
- rtems_cv_has_rdbg="yes" ;
+ if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/librdbg/${RTEMS_CPU}/${RTEMS_BSP}"; then
+ rtems_cv_HAS_RDBG="yes" ;
else
- rtems_cv_has_rdbg="no";
+ rtems_cv_HAS_RDBG="no";
fi
fi
-echo "$ac_t""$rtems_cv_has_rdbg" 1>&6
+echo "$ac_t""$rtems_cv_HAS_RDBG" 1>&6
+HAS_RDBG="$rtems_cv_HAS_RDBG"
- RTEMS_HAS_RDBG="$rtems_cv_has_rdbg";
-fi
@@ -3113,6 +3134,7 @@ Makefile.inc
main.cfg
host.cfg
target.cfg
+bsp.cfg
Templates/Makefile
custom/Makefile
custom/default.cfg
@@ -3219,6 +3241,8 @@ s%@OBJCOPY_FOR_TARGET@%$OBJCOPY_FOR_TARGET%g
s%@SIZE_FOR_TARGET@%$SIZE_FOR_TARGET%g
s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
s%@RTEMS_GAS_CODE16@%$RTEMS_GAS_CODE16%g
+s%@HAS_MP@%$HAS_MP%g
+s%@HAS_RDBG@%$HAS_RDBG%g
s%@rtems_cv_prog_cc_cross@%$rtems_cv_prog_cc_cross%g
s%@RTEMS_HAS_CPLUSPLUS@%$RTEMS_HAS_CPLUSPLUS%g
s%@RTEMS_USE_GCC272@%$RTEMS_USE_GCC272%g
@@ -3276,6 +3300,7 @@ Makefile.inc
main.cfg
host.cfg
target.cfg
+bsp.cfg
Templates/Makefile
custom/Makefile
custom/default.cfg
diff --git a/c/src/make/configure.in b/c/src/make/configure.in
index e89887480e..2382b6d0c2 100644
--- a/c/src/make/configure.in
+++ b/c/src/make/configure.in
@@ -26,7 +26,6 @@ RTEMS_ENABLE_CXX
RTEMS_ENABLE_GCC28
RTEMS_ENABLE_LIBCDIR
RTEMS_ENABLE_BARE
-dnl RTEMS_ENABLE_RTEMSBSP
RTEMS_ENV_RTEMSBSP
@@ -71,16 +70,9 @@ RTEMS_CANONICALIZE_TOOLS
dnl if this is an i386, does gas have good code16 support?
RTEMS_I386_GAS_CODE16
-dnl RTEMS_CHECK_BSPS(rtems_bsp)
-
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-
-if test "$RTEMS_HAS_RDBG" = "yes"; then
- RTEMS_CHECK_RDBG
- RTEMS_HAS_RDBG="$rtems_cv_has_rdbg";
-fi
-
-dnl END configure.target.in
+RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
+RTEMS_CHECK_RDBG(RTEMS_BSP)
AC_SUBST(rtems_cv_prog_cc_cross)
AC_SUBST(RTEMS_HAS_CPLUSPLUS)
@@ -131,6 +123,7 @@ Makefile.inc
main.cfg
host.cfg
target.cfg
+bsp.cfg
Templates/Makefile
custom/Makefile
custom/default.cfg
diff --git a/c/src/make/custom/Makefile.am b/c/src/make/custom/Makefile.am
index 3313913c03..5cd10d1d8b 100644
--- a/c/src/make/custom/Makefile.am
+++ b/c/src/make/custom/Makefile.am
@@ -13,7 +13,9 @@ default.cfg
if MAINTAINER_MODE
$(srcdir)/default.cfg.in: $(top_srcdir)/@RTEMS_TOPdir@/make/custom/default.cfg
- sed -e 's%\$$(RTEMS_BSP)%\@RTEMS_BSP\@%g' < $< >$@
+ sed -e 's%\$$(RTEMS_BSP)%\@RTEMS_BSP\@%g' \
+ -e 's%\$$(RTEMS_ROOT)/\@RTEMS_BSP\@%$$(RTEMS_ROOT)%g' \
+ < $< >$@
endif
include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/make/custom/Makefile.in b/c/src/make/custom/Makefile.in
index b005b3bd51..973bb58484 100644
--- a/c/src/make/custom/Makefile.in
+++ b/c/src/make/custom/Makefile.in
@@ -86,6 +86,8 @@ CXX = @CXX@
CXXCPP = @CXXCPP@
CXX_FOR_TARGET = @CXX_FOR_TARGET@
GCCSED = @GCCSED@
+HAS_MP = @HAS_MP@
+HAS_RDBG = @HAS_RDBG@
INSTALL_CHANGE = @INSTALL_CHANGE@
KSH = @KSH@
LN = @LN@
@@ -256,7 +258,9 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
@MAINTAINER_MODE_TRUE@$(srcdir)/default.cfg.in: $(top_srcdir)/@RTEMS_TOPdir@/make/custom/default.cfg
-@MAINTAINER_MODE_TRUE@ sed -e 's%\$$(RTEMS_BSP)%\@RTEMS_BSP\@%g' < $< >$@
+@MAINTAINER_MODE_TRUE@ sed -e 's%\$$(RTEMS_BSP)%\@RTEMS_BSP\@%g' \
+@MAINTAINER_MODE_TRUE@ -e 's%\$$(RTEMS_ROOT)/\@RTEMS_BSP\@%$$(RTEMS_ROOT)%g' \
+@MAINTAINER_MODE_TRUE@ < $< >$@
debug-am:
debug: debug-am
diff --git a/c/src/make/custom/default.cfg.in b/c/src/make/custom/default.cfg.in
index fa35d61bd9..872af0d183 100644
--- a/c/src/make/custom/default.cfg.in
+++ b/c/src/make/custom/default.cfg.in
@@ -18,6 +18,7 @@ TARGET_ARCH=o-@RTEMS_BSP@
endif
include $(RTEMS_ROOT)/make/main.cfg
+include $(RTEMS_ROOT)/make/bsp.cfg
# use the inline functions instead of the macros
# ref: src/exec/generic/Makefile
@@ -53,13 +54,6 @@ else
HAS_CPLUSPLUS=no
endif
-# Define this to yes if this target supports multiprocessor environments.
-ifeq ($(RTEMS_HAS_MULTIPROCESSING),yes)
-HAS_MP=yes
-else
-HAS_MP=no
-endif
-
# Define this to yes if this target wants the TCP/IP stack
ifeq ($(RTEMS_HAS_NETWORKING),yes)
HAS_NETWORKING=yes
@@ -67,13 +61,6 @@ else
HAS_NETWORKING=no
endif
-# Define this to yes if this target wants the remote debugger
-ifeq ($(RTEMS_HAS_RDBG),yes)
-HAS_RDBG=yes
-else
-HAS_RDBG=no
-endif
-
# Define this to yes if this target wants the posix api
ifeq ($(RTEMS_HAS_POSIX_API),yes)
HAS_POSIX_API=yes
diff --git a/c/src/make/main.cfg.in b/c/src/make/main.cfg.in
index 7a1082fb13..9122a0a75c 100644
--- a/c/src/make/main.cfg.in
+++ b/c/src/make/main.cfg.in
@@ -42,10 +42,7 @@ MAKEFILE=Makefile
#
# Target variant names
-# and rule to expand them into (for example): sun4 sun4-debug sun4-profile
-# Note compiler config may add to TARGET_VARIANTS
#
-
TARGET_VARIANTS = debug profile
#