source: rtems/cpukit/aclocal/rtems-top.m4 @ 31ca690e

4.104.114.84.95
Last change on this file since 31ca690e was 31ca690e, checked in by Ralf Corsepius <ralf.corsepius@…>, on 08/18/04 at 11:06:47

2004-08-18 Ralf Corsepius <ralf_corsepius@…>

PR 673/make_build

  • aclocal/rtems-top.m4 (RTEMS_TOP): Add further quotes.
  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[ed8ec1c]1dnl $Id$
2
[ac3786b]3m4_define([RTEMS_API],[4.7])
4
[ed8ec1c]5dnl
6dnl RTEMS_TOP($1)
7dnl
[faf45cc]8dnl $1 .. relative path from this configure.ac to the toplevel configure.ac
[ed8ec1c]9dnl
[863fb4f]10AC_DEFUN([RTEMS_TOP],
[ed8ec1c]11[dnl
12AC_REQUIRE([RTEMS_VERSIONING])
[e3407a4]13AC_REQUIRE([AM_SET_LEADING_DOT])
[894b7f97]14AC_CONFIG_AUX_DIR([$1])
[ed8ec1c]15AC_CHECK_PROGS(MAKE, gmake make)
16AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
17
[ac3786b]18AC_PREFIX_DEFAULT([/opt/rtems-][RTEMS_API])
[ed8ec1c]19
[894b7f97]20AC_SUBST([RTEMS_TOPdir],["$1"])
[ed8ec1c]21
[894b7f97]22# HACK: The sed pattern below strips of "../", corresponding to "cpukit/"
23rtems_updir="/"m4_if([$2],[],[`echo "$1/" | sed s,^\.\.\/,,`],[$2/])
[ed8ec1c]24
[894b7f97]25AS_IF([test -n "$with_multisubdir"],
26  [MULTIBUILDTOP=`echo "/$with_multisubdir" | sed 's,/[[^\\/]]*,../,g'`])
27AC_SUBST(MULTIBUILDTOP)
28 
29AS_IF([test -n "$with_multisubdir"],
30  [MULTISUBDIR="/$with_multisubdir"])
31AC_SUBST(MULTISUBDIR)
32
33AC_ARG_WITH([project-root],[
34AS_HELP_STRING(--with-project-root,directory to pre-install files into)],[
35## Make sure to have a terminating '/'
36case "${with_project_root}" in
37*/) ;;
38*) with_project_root="${with_project_root}/" ;;
39esac
40
41case "${with_project_root}" in
42  [[\\/$]]* | ?:[[\\/]]* ) # absolute directory
43   PROJECT_ROOT=${with_project_root}
44   ;;
45  *) # relative directory
46   sav0dir=`pwd` && cd ./${rtems_updir}
47   sav1dir=`pwd` && cd ../${MULTIBUILDTOP}
[31ca690e]48   sav2dir=`pwd` && cd "$sav0dir"
49   mydir=`echo "$sav1dir" | sed "s,^$sav2dir${MULTISUBDIR}/,,"`
[894b7f97]50   PROJECT_ROOT='$(top_builddir)'${rtems_updir}'../$(MULTIBUILDTOP)'${mydir}/${with_project_root}
51   ;;
52esac],[
53## Defaults: Note: Two different defaults!
54## ../ for multilib
55## '.' for non-multilib
56AS_IF([test "$enable_multilib" = "yes"],[
57  PROJECT_ROOT='$(top_builddir)'${rtems_updir}'../$(MULTIBUILDTOP)'],[
58  PROJECT_ROOT='$(top_builddir)'${rtems_updir}])
59])
60
61AC_SUBST([PROJECT_INCLUDE],["${PROJECT_ROOT}lib/include"])
62AC_SUBST([PROJECT_LIB],["${PROJECT_ROOT}lib\$(MULTISUBDIR)"])
[e3407a4]63
[6855663]64libdir="${libdir}\$(MULTISUBDIR)"
65
66AC_SUBST([project_libdir],["\$(libdir)"])
67AC_SUBST([project_includedir],["\$(includedir)"])
68
[e3407a4]69AC_SUBST([dirstamp],[\${am__leading_dot}dirstamp])
[ed8ec1c]70])dnl
Note: See TracBrowser for help on using the repository browser.