source: rtems/c/src/exec/score/tools/hppa1.1/aclocal.m4 @ d2d22780

4.104.114.84.95
Last change on this file since d2d22780 was d2d22780, checked in by Joel Sherrill <joel.sherrill@…>, on 06/15/99 at 22:46:44

Patch from Ralf Corsepius <corsepiu@…>:

When I run my script that just repeatedly builds different targets, some
of them die with an error like this:

Making all RTEMS_BSP=gen68360 in cpugmake[5]: Entering directory
`/usr1/rtems/build/build-m68k-rtems/c/src/exec/score/cpu'
Making all RTEMS_BSP=gen68360 in @RTEMS_CPU@
/bin/sh: @RTEMS_CPU@: No such file or directory
gmake[5]: * [all] Error 1
gmake[5]: Leaving directory
`/usr1/rtems/build/build-m68k-rtems/c/src/exec/score/cpu'

It is not always the same variable substitution that fails. Sometimes it
is @INSTALL@. But reliably, it is a variable substitution that is
failing.

Do you have any idea why this happens?

Yep, I think I know what's going on.

AC_SUBST(RTEMS_CPU) is missing in configure.ins, thus @RTEMS_CPU@ in
target.cfg.in doesn't get substituted correctly, causing the bug above. Due
to the redundancy of RTEMS_CPU, other most BSPs don't seem to be affected.

Other similar problems probably exist for the unix/posix bsp and the hppa.1
cpu, because their */tools/*Makefile.ams require RTEMS_CPU, too.

  • Property mode set to 100644
File size: 5.8 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13dnl $Id$
14
15dnl
16dnl RTEMS_TOP($1)
17dnl
18dnl $1 .. relative path from this configure.in to the toplevel configure.in
19dnl
20AC_DEFUN(RTEMS_TOP,
21[dnl
22AC_ARG_WITH(target-subdir,
23[  --with-target-subdir=DIR],
24TARGET_SUBDIR="$withval",
25TARGET_SUBDIR=".")
26
27RTEMS_TOPdir="$1";
28AC_SUBST(RTEMS_TOPdir)
29
30PROJECT_ROOT=`pwd`/$RTEMS_TOPdir;
31test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.."
32AC_SUBST(PROJECT_ROOT)
33
34dnl Determine RTEMS Version string from the VERSION file
35dnl Hopefully, Joel never changes its format ;-
36AC_MSG_CHECKING([for RTEMS Version])
37if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
38changequote(,)dnl
39RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
40sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
41changequote([,])dnl
42else
43AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
44fi
45if test -z "$RTEMS_VERSION"; then
46AC_MSG_ERROR(Unable to determine version)
47fi
48AC_MSG_RESULT($RTEMS_VERSION)
49
50RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir;
51AC_SUBST(RTEMS_ROOT)
52])dnl
53
54dnl
55dnl $Id$
56dnl
57
58dnl canonicalize target cpu
59dnl NOTE: Most rtems targets do not fullfil autoconf's
60dnl target naming conventions "processor-vendor-os"
61dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
62dnl and we have to fix it for rtems ourselves
63
64AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
65[
66rtems_target=$target;
67case "$target" in
68no_cpu*) target=$host;;
69*) ;;
70esac
71AC_CANONICAL_SYSTEM
72AC_MSG_CHECKING(rtems target cpu)
73changequote(,)dnl
74case "${rtems_target}" in
75  # hpux unix port should go here
76  i[3456]86-go32-rtems*)
77        RTEMS_CPU=i386
78        ;;
79  i[3456]86-pc-linux*)          # unix "simulator" port
80        RTEMS_CPU=unix
81        ;;
82  i[3456]86-*freebsd2*)         # unix "simulator" port
83        RTEMS_CPU=unix
84        ;;
85  no_cpu-*rtems*)
86        RTEMS_CPU=no_cpu
87        ;;
88  sparc-sun-solaris*)           # unix "simulator" port
89        RTEMS_CPU=unix
90        ;;
91  *)
92        RTEMS_CPU=`echo $rtems_target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
93        ;;
94esac
95changequote([,])dnl
96AC_SUBST(RTEMS_CPU)
97AC_MSG_RESULT($RTEMS_CPU)
98])
99
100# Do all the work for Automake.  This macro actually does too much --
101# some checks are only needed if your package does certain things.
102# But this isn't really a big deal.
103
104# serial 1
105
106dnl Usage:
107dnl AM_INIT_AUTOMAKE(package,version, [no-define])
108
109AC_DEFUN(AM_INIT_AUTOMAKE,
110[AC_REQUIRE([AC_PROG_INSTALL])
111PACKAGE=[$1]
112AC_SUBST(PACKAGE)
113VERSION=[$2]
114AC_SUBST(VERSION)
115dnl test to see if srcdir already configured
116if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
117  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
118fi
119ifelse([$3],,
120AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
121AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
122AC_REQUIRE([AM_SANITY_CHECK])
123AC_REQUIRE([AC_ARG_PROGRAM])
124dnl FIXME This is truly gross.
125missing_dir=`cd $ac_aux_dir && pwd`
126AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
127AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
128AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
129AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
130AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
131AC_REQUIRE([AC_PROG_MAKE_SET])])
132
133#
134# Check to make sure that the build environment is sane.
135#
136
137AC_DEFUN(AM_SANITY_CHECK,
138[AC_MSG_CHECKING([whether build environment is sane])
139# Just in case
140sleep 1
141echo timestamp > conftestfile
142# Do `set' in a subshell so we don't clobber the current shell's
143# arguments.  Must try -L first in case configure is actually a
144# symlink; some systems play weird games with the mod time of symlinks
145# (eg FreeBSD returns the mod time of the symlink's containing
146# directory).
147if (
148   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
149   if test "[$]*" = "X"; then
150      # -L didn't work.
151      set X `ls -t $srcdir/configure conftestfile`
152   fi
153   if test "[$]*" != "X $srcdir/configure conftestfile" \
154      && test "[$]*" != "X conftestfile $srcdir/configure"; then
155
156      # If neither matched, then we have a broken ls.  This can happen
157      # if, for instance, CONFIG_SHELL is bash and it inherits a
158      # broken ls alias from the environment.  This has actually
159      # happened.  Such a system could not be considered "sane".
160      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
161alias in your environment])
162   fi
163
164   test "[$]2" = conftestfile
165   )
166then
167   # Ok.
168   :
169else
170   AC_MSG_ERROR([newly created file is older than distributed files!
171Check your system clock])
172fi
173rm -f conftest*
174AC_MSG_RESULT(yes)])
175
176dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
177dnl The program must properly implement --version.
178AC_DEFUN(AM_MISSING_PROG,
179[AC_MSG_CHECKING(for working $2)
180# Run test in a subshell; some versions of sh will print an error if
181# an executable is not found, even if stderr is redirected.
182# Redirect stdin to placate older versions of autoconf.  Sigh.
183if ($2 --version) < /dev/null > /dev/null 2>&1; then
184   $1=$2
185   AC_MSG_RESULT(found)
186else
187   $1="$3/missing $2"
188   AC_MSG_RESULT(missing)
189fi
190AC_SUBST($1)])
191
192AC_DEFUN(RTEMS_TOOLPATHS,
193[
194# tooldir='$(exec_prefix)/'$target_alias
195# Temporary work-around until building in source tree is supported
196tooldir='$(PROJECT_ROOT)'
197AC_SUBST(tooldir)
198
199project_includedir='$(tooldir)'/include
200AC_SUBST(project_includedir)
201
202project_libdir='$(tooldir)/lib$(MULTISUBDIR)'
203AC_SUBST(project_libdir)
204
205project_bindir='$(tooldir)/bin'
206AC_SUBST(project_bindir)
207])
208
Note: See TracBrowser for help on using the repository browser.