diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-01-30 21:49:51 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-01-30 21:49:51 +0000 |
commit | 5c3511e5cff1019e683239fd71f6ea3254e1eccb (patch) | |
tree | 6b63bc3b948de974251de8e23f06946f13323363 /configure | |
parent | Corrected Linux port for glibc2 (diff) | |
download | rtems-5c3511e5cff1019e683239fd71f6ea3254e1eccb.tar.bz2 |
Big patch form Ralf Corsepius described in this email:
Here is the result of my nightly work to get RTEMS_ROOT=$srcdir working
with different shells and relative/absolute paths.
What I did is relatively simple in principle:
Instead of setting RTEMS_ROOT in configure.in and then let configure
substitute @RTEMS_ROOT@ inside the Makefiles, I now let each Makefile
set RTEMS_ROOT from each Makefile's @top_srcdir@ value.
The difference is subtile, but with enormous side effects:
- If RTEMS_ROOT is set in configure, then the same single value will be
propagated to all Makefiles. This breaks using relative paths, as the
relative path to the root of the source tree is used inside of all
subdirectory Makefiles.
- Now each Makefile.in sets RTEMS_ROOT = @top_srcdir@. top_srcdir is
computed individually by configure for each single Makefile.in, hereby
receiving the correct value, no matter if relative or absolute paths are
used.
To get this working, I needed to remove setting RTEMS_ROOT from
target.cfg.in, because this overrides the value of RTEMS_ROOT from each
individual Makefile.
Furthermore, I removed RTEMS_CUSTOM from the Makefiles and replaced all
"include $(RTEMS_CUSTOM)" directives with"include
$(RTEMS_ROOT)/make/custom/$(RTEMS_BSP)". Perhaps you don't like this,
but I think, to have one variable less is clearer and easier to
understand than having several variables refering to the next one.
I enclose a small patch to this mail, which
- fixes the config.h problem (to finally clearify misunderstands)
- removes assignment/subsitution of RTEMS_ROOT from configure.in
- contains a workaround for the application Makefile's RTEMS_ROOT
problem (reported by Eric)
- removes some unused lines from the toplevel Makefile.in
- removes assignment of RTEMS_ROOT from make/target.cfg.in
Diffstat (limited to '')
-rw-r--r-- | configure | 43 | ||||
-rw-r--r-- | configure.in | 4 |
2 files changed, 23 insertions, 24 deletions
@@ -1583,7 +1583,6 @@ if [ "${program_prefix}" = "NONE" ] ; then fi fi -RTEMS_ROOT=`cd $srcdir; pwd` PROJECT_ROOT=`pwd;` # If RTEMS macros are enabled, then use them. Otherwise, use inlines. @@ -1609,7 +1608,7 @@ fi # If the tests are enabled, then find all the test suite Makefiles echo $ac_n "checking Are the test suites enabled? ""... $ac_c" 1>&6 -echo "configure:1613: checking Are the test suites enabled? " >&5 +echo "configure:1612: checking Are the test suites enabled? " >&5 tests_enabled=yes # Check whether --enable-tests or --disable-tests was given. if test "${enable_tests+set}" = set; then @@ -1629,7 +1628,7 @@ fi if test "$tests_enabled" = "yes"; then echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6 -echo "configure:1633: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5 +echo "configure:1632: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5 if test -d $srcdir/c/src/tests/tools/$target_cpu; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1644,7 +1643,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6 -echo "configure:1648: checking for Makefile.in in c/src/tests/libtests" >&5 +echo "configure:1647: checking for Makefile.in in c/src/tests/libtests" >&5 if test -d $srcdir/c/src/tests/libtests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1659,7 +1658,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6 -echo "configure:1663: checking for Makefile.in in c/src/tests/sptests" >&5 +echo "configure:1662: checking for Makefile.in in c/src/tests/sptests" >&5 if test -d $srcdir/c/src/tests/sptests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1674,7 +1673,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6 -echo "configure:1678: checking for Makefile.in in c/src/tests/tmtests" >&5 +echo "configure:1677: checking for Makefile.in in c/src/tests/tmtests" >&5 if test -d $srcdir/c/src/tests/tmtests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1689,7 +1688,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6 -echo "configure:1693: checking for Makefile.in in c/src/tests/mptests" >&5 +echo "configure:1692: checking for Makefile.in in c/src/tests/mptests" >&5 if test -d $srcdir/c/src/tests/mptests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1705,7 +1704,7 @@ fi if test "$RTEMS_HAS_POSIX" = "yes"; then echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6 -echo "configure:1709: checking for Makefile.in in c/src/tests/psxtests" >&5 +echo "configure:1708: checking for Makefile.in in c/src/tests/psxtests" >&5 if test -d $srcdir/c/src/tests/psxtests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1723,7 +1722,7 @@ fi # If the HWAPI is enabled, the find the HWAPI Makefiles echo $ac_n "checking Is the HWAPI enabled? ""... $ac_c" 1>&6 -echo "configure:1727: checking Is the HWAPI enabled? " >&5 +echo "configure:1726: checking Is the HWAPI enabled? " >&5 # Check whether --enable-hwapi or --disable-hwapi was given. if test "${enable_hwapi+set}" = set; then enableval="$enable_hwapi" @@ -1734,7 +1733,7 @@ if test "${enable_hwapi+set}" = set; then makefiles="$makefiles c/src/lib/libhwapi/Makefile" echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6 -echo "configure:1738: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5 +echo "configure:1737: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5 if test -d $srcdir/c/src/lib/libhwapi/analog; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1749,7 +1748,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6 -echo "configure:1753: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5 +echo "configure:1752: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5 if test -d $srcdir/c/src/lib/libhwapi/discrete; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1764,7 +1763,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6 -echo "configure:1768: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5 +echo "configure:1767: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5 if test -d $srcdir/c/src/lib/libhwapi/drivers; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1779,7 +1778,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6 -echo "configure:1783: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5 +echo "configure:1782: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5 if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1794,7 +1793,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6 -echo "configure:1798: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5 +echo "configure:1797: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5 if test -d $srcdir/c/src/lib/libhwapi/serial; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1809,7 +1808,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6 -echo "configure:1813: checking for Makefile.in in c/src/lib/libhwapi/support" >&5 +echo "configure:1812: checking for Makefile.in in c/src/lib/libhwapi/support" >&5 if test -d $srcdir/c/src/lib/libhwapi/support; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1824,7 +1823,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6 -echo "configure:1828: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5 +echo "configure:1827: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5 if test -d $srcdir/c/src/lib/libhwapi/wrapup; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1863,11 +1862,10 @@ fi - # pick up all the Makefiles in required parts of the tree echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6 -echo "configure:1871: checking for Makefile.in in c/build-tools" >&5 +echo "configure:1869: checking for Makefile.in in c/build-tools" >&5 if test -d $srcdir/c/build-tools; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1882,7 +1880,7 @@ fi echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6 -echo "configure:1886: checking for Makefile.in in make" >&5 +echo "configure:1884: checking for Makefile.in in make" >&5 if test -d $srcdir/make; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1897,7 +1895,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6 -echo "configure:1901: checking for Makefile.in in c/src/lib/libmisc" >&5 +echo "configure:1899: checking for Makefile.in in c/src/lib/libmisc" >&5 if test -d $srcdir/c/src/lib/libmisc; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1912,7 +1910,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6 -echo "configure:1916: checking for Makefile.in in c/src/tests/samples" >&5 +echo "configure:1914: checking for Makefile.in in c/src/tests/samples" >&5 if test -d $srcdir/c/src/tests/samples; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1928,6 +1926,8 @@ fi + + # try not to explicitly list a Makefile here trap '' 1 2 15 cat > confcache <<\EOF @@ -2125,7 +2125,6 @@ s%@KSH@%$KSH%g s%@RTEMS_BSP_LIST@%$RTEMS_BSP_LIST%g s%@RTEMS_HOST@%$RTEMS_HOST%g s%@RTEMS_LIBC_DIR@%$RTEMS_LIBC_DIR%g -s%@RTEMS_ROOT@%$RTEMS_ROOT%g s%@RTEMS_USE_OWN_PDIR@%$RTEMS_USE_OWN_PDIR%g s%@RTEMS_HAS_POSIX_API@%$RTEMS_HAS_POSIX_API%g s%@RTEMS_HAS_KA9Q@%$RTEMS_HAS_KA9Q%g diff --git a/configure.in b/configure.in index f2028394df..78dfb4e343 100644 --- a/configure.in +++ b/configure.in @@ -269,7 +269,6 @@ if [[ "${program_prefix}" = "NONE" ]] ; then fi fi -RTEMS_ROOT=`cd $srcdir; pwd` PROJECT_ROOT=`pwd;` # If RTEMS macros are enabled, then use them. Otherwise, use inlines. @@ -345,7 +344,6 @@ AC_ARG_ENABLE(hwapi, \ AC_SUBST(RTEMS_BSP_LIST) AC_SUBST(RTEMS_HOST) AC_SUBST(RTEMS_LIBC_DIR) -AC_SUBST(RTEMS_ROOT) AC_SUBST(RTEMS_USE_OWN_PDIR) AC_SUBST(RTEMS_HAS_POSIX_API) AC_SUBST(RTEMS_HAS_KA9Q) @@ -364,6 +362,8 @@ RTEMS_CHECK_MAKEFILE(c/src/tests/samples) AC_CONFIG_HEADER(c/build-tools/src/config.h) +AC_CONFIG_HEADER(c/build-tools/src/config.h) + # try not to explicitly list a Makefile here AC_OUTPUT( Makefile |