source: rtems/c/src/aclocal.m4 @ eb299af

4.104.114.84.95
Last change on this file since eb299af was eb299af, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 26, 1999 at 8:20:22 PM

This is part of a major patch from Ralf Corsepius <corsepiu@…>
to move RTEMS more to automake/autoconf and GNU compliance.

Finally, here they are: the "big-patch" patches - merged into one big
patch (~1.5MB).

Sorry for the delay, but testing took much more time than I had expected

  • esp. reworking the acpolish script triggered many more tiny issues than I had expected (cf. below).

At least, now you've got something to spend your weekend with :-.

WARNINGS:

  • I've gone a little (??) further than I had announced before.
  • Several directories have been moved.
  • Several files have been added and removed
  • I have tested it with many BSPs/CPUs and a variety of permutiations of configuration flags, but not with all.
  • Most parts of the patch are automatically generated, however there are many tiny manual modifications.

APPLYING THE PATCH:

./autogen -c
mkdir tools
mv c/src/exec/score/tools tools/cpu
mv c/build-tools tools/build
mv c/update-tools tools/update
patch -p1 -E < rtems-rc-19990709-0.diff
./autogen

If the patch doesn't apply to rtems-cvs, I would suggest that you should
try to apply it brute-force and then to run tools/update/rtems-polish.sh
-ac -am afterwards. A recursive diff between rtems-19990709 + patch and
rtems-cvs + patch then should report only a few dozen significant
changes to configuration files which need to be merged manually (IIRC, I
did not change any source files).

* Attention: There are files to be removed, moved, copied and added
in/to CVS!

NEWS/CHANGES:

  1. Configuration takes place in 3 stages: 1. per host (toplevel configure script), 2. per target (c/configure), 3. per bsp c/src/configure automatically triggered from ./configure and c/Makefile.am.
  2. Building of subdirectory c/ takes place in c/$(target_alias) for cross-targets in c/ for native targets
  3. Building of subdirectory c/src takes place in c/${target_alias}/<bsp> for cross-targets, c/<bsp> for native targets
  4. c/build-tools moved to tools/build
  5. c/src/exec/score/cpu/tools moved to tools/cpu (=cpu-tools split out)
  6. c/update-tools moved to tools/update
  7. New subdirectory c/src/make, handles files from make/ on a per BSP basis
  8. Maintainer mode support: Ie. if configuring with --enable-maintainer-mode disabled (the default), then tracking of many dependencies will be disabled in Makefiles. Esp. many dependencies for auto* generated files will be switched off in Makefiles. Ie. if not using "--enable-maintainer-mode" many auto* generated files will not be updated automatically, i.e. normal users should not be required to have auto* tools anymore (untested).
  9. Independent configuration scripts for / (toplevel), tools/build, tools/cpu, tools/update, c/, c/src/, c/src/exec, c/src/lib, c/src/tests, c/src/make
  10. Automake support for all directories above and besides c/src
  11. "preinstall" now is implemented as depth-first recursive make target
  1. host compiled tools (exception bsp-tools) are accessed in location in the build tree instead of inside the build-tree when building RTEMS.
  2. RTEMS_ROOT and PROJECT_ROOT now point to directories inside the build-tree - many tiny changes as consequence from this.
  3. --with-cross-host support removed (offically announced obsolete by cygnus)
  4. Changing the order of building libraries below c/src/lib/
  5. Former toplevel configure script broken into aclocal/*.m4 macros
  6. Newlib now detected by configure macros, RTEMS_HAS_NEWLIB removed from *cfg.
  7. sptables.h now generated by autoconf
  8. Rules for "mkinstalldirs temporary installation tree" moved from c/Makefile to subdirectories.
  9. Cpu-tools do not get installed.
  10. FIX: Use ACLOCAL_AMFLAGS instead of ACLOCAL = -I ... in Makefile.ams which are in directories with own configure scripts.
  11. Hardcoding BSP names into libbsp/.../tools to avoid RTEMS_BSP get overridden from the environment.
  12. FIX: Handling of MP_PIECES in various Makefiles
  13. FIX: Removing "::" rules from some Makefile.ins
  14. FIX: File permission chaos: (-m 444 and -m 555 vs. -m 644 and -m 755) - Now all include files use -m 644.
  15. Removed many gnumake-conditionals in Makefile.ins - Partially replaced with automake-conditional, partially replaced with conditionalized Makefile variables (... _yes_V)
  16. Massively reworked acpolish: acpolish now parses Makefile.ins and interprets parts of the Makefile.ins.
  17. FIX: Some $(wildcard $(srcdir)/*.h) macros removed / replaced with explicit lists of files in Makefile.ins.
  18. FIX: Replacing MKLIB with RANLIB in Makefile.ins
  19. HACK: Add preinstallation for pc386 specific $(PROJECT_RELEASE)/BootImgs? directory

... many more details, I can't recall

KNOWN BUGS:

  1. make [debug|profile]_install do not do what they are promissing. "make [debug|profile] install" does what "make [debug|profile]_install" has been doing. Proposal: remove [debug|profile]_install
  2. Dependencies between temporary installation tree and source tree are not yet handled correctly.
  3. Dependencies between temporary installation tree and source tree are handled ineffencently (Using INSTALL_CHANGE instead of make dependencies)
  4. RTEMS_ROOT, PROJECT_ROOT, top_builddir, RTEMS_TOPdir now are redundant.
  5. The new configure scripts still are in their infancy. They contain redundant checks and might still contain bugs, too.
  6. RTEMS autoconf Makefile.ins use a mixture of configuration information gathered in c/$(target_alias)/<bsp>/make and of information collected from their configure scripts.
  7. make dist is not fully functional
  8. Subdirectory host-/build-/target- configure options (--target, --host, --build) do not conform to Cygnus/GNU conventions.
  9. Some RTEMS autoconf Makefile.in's makefile targets are not supported in automake Makefile.ams/ins (e.g. get, clobber).
  10. Some automake standard targets are not propagated from toplevel and c/Makefile.am to autoconf subdirectories (eg. make dist).
  11. rpcgen generated files are not part of the source-tree (Automake conventions favor supplying generated files inside the source-tree, however there is no support for rpcgen generated files in automake, cf. yacc/lex support in automake).
  12. RTEMS_HAS_RDBG handling is flaky. make/*.cfg use RTEMS_HAS_RDBG per CPU, while librdb's sources can only be built per BSP. Raises the more general question whether librdbg located correctly in the source-tree.
  13. All make/*cfg files are configured per cpu, currently there is no location to store per-bsp configuration information --> bsp.cfg, per aconfig.h?
  14. "make install" without having run "make all" beforehand does not work.
  15. handling of --enable-multiprocessing seems to be broken in make/custom/*
  16. Makefile.ins still exploit many gmake features.
  17. File permisson chaos on libraries (no explict -m for libraries/rels/etc).
  18. mcp750 Makefiles are broken (Note: I *do* mean buggy - I am not talking about "not-conforming to conventions", here :-).
  19. Dependencies between configure scripts are not handled, eg. aborting "make RTEMS_BSP=<bsp>" can leave the build-tree in an unusable state.
  20. "make clean" does not delete <build-tree>/<bsp>. This is intentional for now, because rerunning "make" after "make clean" requires an explicit "make preinstall" afterwards now. This should be done automatically, but doesn't work in this case for now. To work around this problem <build-tree>/<bsp> is kept during "make clean" for now (HACK).

TODO:

  1. split out host-compiled bsp-tools
  2. Use Cygnus/GNU standards for cross-compiling target-subdir (CC=CC_FOR_TARGET .. configure --host=${target_alias} --build=`config.guess'}), to be added to toplevel configure script after splitting out bsp-tools.
  3. Exploit per cpu support directory (c/src/<cpu>)- Splitting out per-cpu libraries - Are there any?
  4. Further automake support
  5. Converting subdirectories into standalone / self-contained subdirectories (Esp. moving their headers to the same common root as their sources, eg. mv lib/include/rtems++ lib/librtems++/include/rtems++) - This is the main obstacle which prevents moving further towards automake.
  6. Propagating values from *.cfg into Makefiles instead of propagating them at make time via Makefile-fragments (i.e. try to avoid using *.cfg).
  7. Testing on cygwin host (I *do* expect cygwin specific problems).
  8. The ARCH in o-$(ARCH)-$(VARIANT) build-subdirectories is not needed anymore.

GENERAL ISSUES:

  1. Temporary installation tree -- Ian and I seem to disagree basically. Though I think that I understand his argumentation, I do not share it. IMO, his way of using the buildtree is mis-using the build-tree, relying on an inofficial feature of RTEMS's current implementation, which doesn't even work correctly in the current build-tree, though it attempts hard to do so. From my very POV, it unnecessarily complicates the structures of the source- and build-trees. It is not supported by automake (No automatic generation for the necessary rules) and complicates the transition to automake significantly (Generating the rules with an enhanced version of acpolish could be possible). As Ian correctly pointed out, here a management decision is needed - though I don't see the need to draw this decision in short terms.
  1. preinstallation generally is a sure means to spoil the structure of the source tree, IMHO (No ranting intended, I am completly serious about this one). eg. through tree dependencies. The worst problem related to this I have found in the meantime is bsp_specs. bsp_specs is part of libbsp, ie. there is *no* way to build *any* part of the source tree *without* having a BSP *preinstalled*. Note: This issue is related to issue 1., but is not identical - The difference is the change of the order make rules have to be triggered. While preinstallation triggers rules spread all over the source tree before a "make all" can be run, a temporary installation tree could also be installed by post "make all" hooks (all-local:, to be run after make all in a directory is completed) if the directories' dependencies would be a tree,
  1. Stuctural dependencies between subdirectories.
  2. Depth of the source tree (Prevents multilibbing and introduces many unnecessary configure scripts).
  3. per cpu vs. per bsp configuration (There are no real per-cpu parts yets :-).
  4. automake does not support $makefiles in AC_OUTPUT. Unlike before, we now should try to avoid RTEMS_CHECK_MAKEFILE and to hard-code as much paths to Makefiles as possible.
  5. General redesign of the source tree
  6. Main installation point - Changing it to ${prefix}/${target_alias}. ?

Besides item 8. (which is a must, IMHO), as far as I see most of them
can not be solved soon and will remain issues in the mid- to long-term
:-.

REMARKS:

  • You (as the maintainer) should always use --enable-maintainer-mode when building RTEMS to ensure that maintainer mode generated files (esp. those in c/src/make) will be updated when make/* files have changed.
  • Use @RTEMS_BSP@ in Makefile.ins and Makefile.ams below c/src/, $(RTEMS_BSP) or ${RTEMS_BSP} will be overridden from environment variables when using make RTEMS_BSP="....".
  • c/src/make is a temporary cludge until configuration issues are solved. At the moment it is configured per bsp, but contains per-target/cpu info only. Its main purpose now is to circumvent modifying make/*.cfg files, because I consider make/* to be frozen for backward compatibilty.
  • This patch should only affect configuration files. At least I do not remember having touched any source files.
  • To build the bare bsp you now need to mention it in --enable-rtemsbsp.

Example: building gensh1 and sh1/bare simultaneously:
../rtems-rc-19990709-1/configure --target=sh-rtems \
--enable-rtemsbsp="bare gensh1" \
--prefix=/tmp/rtems \
--enable-bare-cpu-cflags='-DMHZ=20 -m1
-DCPU_CONSOLE_DEVNAME=\"/dev/null\"' \
--enable-bare-cpu-model=sh7032 \
--enable-maintainer-mode \
--enable-cxx
make
make install

  • The next steps in development would be to split out bsp-tools and then to change to Cygnus/GNU canonicalization conventions for building the c/ subdirectory afterwards (i.e. many standard AC_*.m4 macros could be used instead of customized versions)

FINAL REMARK:
The issues mentioned in the lists above sound much worser than the
situation actually is. Most of them are not specific to this patch, but
are also valid for the snapshot. I just wrote down what I came across
when working on the patch over the last few weeks.

I wouldn't be too surprised if you don't like the patch at the current
point in development. I am willing to discuss details and problems, I
also have no problem if you would post-pone applying this patch to times
after 4.1, but rejecting it as a whole for all times would be a false
management decision, IMHO.

Therefore I would suggest that you, if your time constaints allow it,
should at least play a little while with this patch to understand what
is going on and before drawing a decision on how to handle this
proposal. I know this patch is neither perfect nor complete, but I
consider it to be a major breakthrough. Don't be anxious because of the
size of the patch, the core of the patch is rather small, the size is
mainly the side effect of some systematic cleanups inside the Makefiles
(result of acpolish).

Feel free to ask if you encounter problems, if you don't understand
something or if you meet bugs - I am far from being perfect and am
prepared to answer them.

Ralf.

--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu@… FAX: +49/731/501-999
http://www.faw.uni-ulm.de

  • Property mode set to 100644
File size: 9.2 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
30dnl Determine RTEMS Version string from the VERSION file
31dnl Hopefully, Joel never changes its format ;-
32AC_MSG_CHECKING([for RTEMS Version])
33if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
34changequote(,)dnl
35RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
36sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
37changequote([,])dnl
38else
39AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
40fi
41if test -z "$RTEMS_VERSION"; then
42AC_MSG_ERROR(Unable to determine version)
43fi
44AC_MSG_RESULT($RTEMS_VERSION)
45])dnl
46
47dnl
48dnl $Id$
49dnl
50
51dnl canonicalize target cpu
52dnl NOTE: Most rtems targets do not fullfil autoconf's
53dnl target naming conventions "processor-vendor-os"
54dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
55dnl and we have to fix it for rtems ourselves
56
57AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
58[
59AC_CANONICAL_SYSTEM
60AC_MSG_CHECKING(rtems target cpu)
61changequote(,)dnl
62case "${target}" in
63  # hpux unix port should go here
64  i[3456]86-go32-rtems*)
65        RTEMS_CPU=i386
66        ;;
67  i[3456]86-pc-linux*)          # unix "simulator" port
68        RTEMS_CPU=unix
69        ;;
70  i[3456]86-*freebsd2*)         # unix "simulator" port
71        RTEMS_CPU=unix
72        ;;
73  no_cpu-*rtems*)
74        RTEMS_CPU=no_cpu
75        ;;
76  sparc-sun-solaris*)           # unix "simulator" port
77        RTEMS_CPU=unix
78        ;;
79  *)
80        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
81        ;;
82esac
83changequote([,])dnl
84AC_SUBST(RTEMS_CPU)
85AC_MSG_RESULT($RTEMS_CPU)
86])
87
88# Do all the work for Automake.  This macro actually does too much --
89# some checks are only needed if your package does certain things.
90# But this isn't really a big deal.
91
92# serial 1
93
94dnl Usage:
95dnl AM_INIT_AUTOMAKE(package,version, [no-define])
96
97AC_DEFUN(AM_INIT_AUTOMAKE,
98[AC_REQUIRE([AC_PROG_INSTALL])
99PACKAGE=[$1]
100AC_SUBST(PACKAGE)
101VERSION=[$2]
102AC_SUBST(VERSION)
103dnl test to see if srcdir already configured
104if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
105  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
106fi
107ifelse([$3],,
108AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
109AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
110AC_REQUIRE([AM_SANITY_CHECK])
111AC_REQUIRE([AC_ARG_PROGRAM])
112dnl FIXME This is truly gross.
113missing_dir=`cd $ac_aux_dir && pwd`
114AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
115AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
116AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
117AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
118AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
119AC_REQUIRE([AC_PROG_MAKE_SET])])
120
121#
122# Check to make sure that the build environment is sane.
123#
124
125AC_DEFUN(AM_SANITY_CHECK,
126[AC_MSG_CHECKING([whether build environment is sane])
127# Just in case
128sleep 1
129echo timestamp > conftestfile
130# Do `set' in a subshell so we don't clobber the current shell's
131# arguments.  Must try -L first in case configure is actually a
132# symlink; some systems play weird games with the mod time of symlinks
133# (eg FreeBSD returns the mod time of the symlink's containing
134# directory).
135if (
136   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
137   if test "[$]*" = "X"; then
138      # -L didn't work.
139      set X `ls -t $srcdir/configure conftestfile`
140   fi
141   if test "[$]*" != "X $srcdir/configure conftestfile" \
142      && test "[$]*" != "X conftestfile $srcdir/configure"; then
143
144      # If neither matched, then we have a broken ls.  This can happen
145      # if, for instance, CONFIG_SHELL is bash and it inherits a
146      # broken ls alias from the environment.  This has actually
147      # happened.  Such a system could not be considered "sane".
148      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
149alias in your environment])
150   fi
151
152   test "[$]2" = conftestfile
153   )
154then
155   # Ok.
156   :
157else
158   AC_MSG_ERROR([newly created file is older than distributed files!
159Check your system clock])
160fi
161rm -f conftest*
162AC_MSG_RESULT(yes)])
163
164dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
165dnl The program must properly implement --version.
166AC_DEFUN(AM_MISSING_PROG,
167[AC_MSG_CHECKING(for working $2)
168# Run test in a subshell; some versions of sh will print an error if
169# an executable is not found, even if stderr is redirected.
170# Redirect stdin to placate older versions of autoconf.  Sigh.
171if ($2 --version) < /dev/null > /dev/null 2>&1; then
172   $1=$2
173   AC_MSG_RESULT(found)
174else
175   $1="$3/missing $2"
176   AC_MSG_RESULT(missing)
177fi
178AC_SUBST($1)])
179
180# Add --enable-maintainer-mode option to configure.
181# From Jim Meyering
182
183# serial 1
184
185AC_DEFUN(AM_MAINTAINER_MODE,
186[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
187  dnl maintainer-mode is disabled by default
188  AC_ARG_ENABLE(maintainer-mode,
189[  --enable-maintainer-mode enable make rules and dependencies not useful
190                          (and sometimes confusing) to the casual installer],
191      USE_MAINTAINER_MODE=$enableval,
192      USE_MAINTAINER_MODE=no)
193  AC_MSG_RESULT($USE_MAINTAINER_MODE)
194  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
195  MAINT=$MAINTAINER_MODE_TRUE
196  AC_SUBST(MAINT)dnl
197]
198)
199
200# Define a conditional.
201
202AC_DEFUN(AM_CONDITIONAL,
203[AC_SUBST($1_TRUE)
204AC_SUBST($1_FALSE)
205if $2; then
206  $1_TRUE=
207  $1_FALSE='#'
208else
209  $1_TRUE='#'
210  $1_FALSE=
211fi])
212
213dnl $Id$
214
215dnl Override the set of BSPs to be built.
216dnl used by the toplevel configure script
217dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
218AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
219[
220AC_ARG_ENABLE(rtemsbsp,
221[  --enable-rtemsbsp=bsp1 bsp2 ..      BSPs to include in build],
222[case "${enableval}" in
223  yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);;
224  *) $1=$enableval;;
225esac],[$1=""])
226])
227
228dnl Pass a single BSP via an environment variable
229dnl used by per BSP configure scripts
230AC_DEFUN(RTEMS_ENV_RTEMSBSP,
231[dnl
232AC_MSG_CHECKING([for RTEMS_BSP])
233AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
234[dnl
235  test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
236])dnl
237if test -z "$rtems_cv_RTEMS_BSP"; then
238  AC_MSG_ERROR([Missing RTEMS_BSP])
239fi
240RTEMS_BSP="$rtems_cv_RTEMS_BSP"
241AC_MSG_RESULT(${RTEMS_BSP})
242AC_SUBST(RTEMS_BSP)
243])
244
245dnl $Id$
246
247dnl check if RTEMS support a cpu
248AC_DEFUN(RTEMS_CHECK_CPU,
249[dnl
250AC_REQUIRE([RTEMS_TOP])
251AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
252# Is this a supported CPU?
253AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
254if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
255  AC_MSG_RESULT(yes)
256else
257  AC_MSG_ERROR(no)
258fi
259])dnl
260
261
262dnl $Id$
263
264AC_DEFUN(RTEMS_CANONICAL_HOST,
265[dnl
266AC_REQUIRE([AC_CANONICAL_HOST])
267RTEMS_HOST=$host_os
268changequote(,)dnl
269case "${target}" in
270  # hpux unix port should go here
271  i[3456]86-pc-linux*)         # unix "simulator" port
272        RTEMS_HOST=Linux
273        ;;
274  i[3456]86-*freebsd2*) # unix "simulator" port
275        RTEMS_HOST=FreeBSD
276        ;;
277  sparc-sun-solaris*)             # unix "simulator" port
278        RTEMS_HOST=Solaris
279        ;;
280  *)
281        ;;
282esac
283changequote([,])dnl
284AC_SUBST(RTEMS_HOST)
285])dnl
286
287dnl
288dnl $Id$
289dnl
290
291AC_DEFUN(RTEMS_PROJECT_ROOT,
292[dnl
293AC_REQUIRE([RTEMS_TOP])
294if test "$TARGET_SUBDIR" = "." ; then
295PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)';
296else
297PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)'
298fi
299AC_SUBST(PROJECT_ROOT)
300
301RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
302AC_SUBST(RTEMS_ROOT)
303
304INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change"
305AC_SUBST(INSTALL_CHANGE)
306
307PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
308AC_SUBST(PACKHEX)
309])
310
311
312dnl $Id$
313
314dnl Report all available bsps for a target,
315dnl check if a bsp-subdirectory is present for all bsps found
316dnl
317dnl RTEMS_CHECK_BSPS(bsp_list)
318AC_DEFUN(RTEMS_CHECK_BSPS,
319[
320AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target
321AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
322AC_MSG_CHECKING([for bsps])
323case "${target}" in
324changequote(,)dnl
325  i[3456]86-go32-rtems*)
326changequote([,])dnl
327    $1="go32 go32_p5"
328    ;;
329  *)
330    files=`ls $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU`
331    for file in $files; do
332      case $file in
333        shared*);;
334        Makefile*);;
335        READ*);;
336        CVS*);;
337        pxfl*);;
338        go32*);;       # so the i386 port can pick up the other Makefiles
339        # Now account for BSPs with build variants
340        gen68360)      rtems_bsp="$rtems_bsp gen68360 gen68360_040";;
341        p4000)         rtems_bsp="$rtems_bsp p4600 p4650";;
342        mvme162)       rtems_bsp="$rtems_bsp mvme162 mvme162lx";;
343        *) $1="[$]$1 $file";;
344      esac;
345    done
346    ;;
347esac
348AC_MSG_RESULT([[$]$1 .. done])
349])dnl
350
351AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
352[dnl
353AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
354if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
355  AC_MSG_RESULT([yes])
356else
357  AC_MSG_ERROR([no])
358fi
359])dnl
360
Note: See TracBrowser for help on using the repository browser.