267 Commits

Author SHA1 Message Date
Joel Sherrill
fe5851ceae Patch rtems-rc-20000627-1 from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that is part of the multilib/gnu-canonicalization movement:

Changes:
  * New m4-macro: aclocal/multilib.am
  * Suppress multiprocessing if --enable-multilib is given to
    configure

Notes:
  For now this patch only suppresses multiprocessing if
  --enable-multilib is given to configure and should not have any
  other side-effects, ie. it works around a minor issue which prevents
  introduction of multilibs in general.

  The RTEMS_ENABLE_MULTILIB_MASTER macro is the core part to build
  real multilibs, but can not be applied before other multilib related
  issues with RTEMS have been solved. (e.g. sptables.h, bsp_specs,
  Cygnus/Gnu canonicalization, _RTEMS_version, targopts.h, changing
  the installation point/tooldir support, etc.).
2000-06-29 15:29:31 +00:00
Joel Sherrill
3207f0a969 Patch from James Housley <jim@thehousleys.net> to address FreeBSD 4.x
build issues.
2000-06-16 13:05:19 +00:00
Joel Sherrill
c63a5cfe57 Patch rtems-rc-20000614-1-cvs.diff from Ralf Corsepius
<corsepiu@faw.uni-ulm.de> that addresses a couple of
minor configuration issues which popped up when
experimenting with multilibs.

  Note: The multigen generated make/custom/bare-*.cfg will still be
  non-functional, even after having applied this patch.
2000-06-14 17:12:23 +00:00
Joel Sherrill
8ef38186fa Patch from John Cotton <john.cotton@nrc.ca>, Charles-Antoine Gauthier
<charles.gauthier@iit.nrc.ca>, and Darlene A. Stewart
<Darlene.Stewart@nrc.ca> to add support for a number of very
significant things:

  + BSPs for many variations on the Motorola MBX8xx board series
  + Cache Manager including initial support for m68040
    and PowerPC
  + Rework of mpc8xx libcpu code so all mpc8xx CPUs now use
    same code base.
  + Rework of eth_comm BSP to utiltize above.

John reports this works on the 821 and 860
2000-06-12 19:57:02 +00:00
Joel Sherrill
df49c60c96 Merged from 4.5.0-beta3a 2000-06-12 15:00:15 +00:00
Joel Sherrill
70810dcd89 Patches rtems-rc-20000204-0.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that contains:

* Removes remaining (now illegal) references to $(SRC) from a couple of
  Makefile.ams
* Removes duplicate AC_CONFIG_SUBDIRS macro from c/configure.in
* Moves ENABLE_LIBCDIR into RTEMS_PROG_C[C|XX]_FOR_TARGET (hides LIBCDIR
  from most configure scripts, i.e. LIBCDIR becomes less visible)
* Adds RTEMS_PROG_C[C|XX]_FOR_TARGET and RTEMS_CANONICALIZE_TOOLS to
  libbsp/*/configure.ins (A minor bug in previous implementations, which
  only has an impact when switching to GNU/Cygnus canonicalization)
* Cleans up several bogus comments.
* Removes MKLIB
* Switches the version number to 4.5.0 (for testing version number
  handling)
2000-02-08 22:33:25 +00:00
Joel Sherrill
95d90725e9 Obsolete files. Removed per recommendation from Ralf Corsepius
<corsepiu@faw.uni-ulm.de>.
2000-02-04 19:25:57 +00:00
Joel Sherrill
1b2b923432 Patch to fix typo from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. 2000-01-27 17:06:49 +00:00
Joel Sherrill
6d3ab0ffdc Added pc486 and pc586 as aliases of pc386 with proper cpu flags. 2000-01-10 20:56:35 +00:00
Joel Sherrill
d273d78ae6 Renaming mcp750 to motorola_shared since that is the basis for both
the mvme2307 and mcp750 BSPs.  In addition, it can support many
Motorola PowerPC based VME and PCI boards.
2000-01-07 20:51:56 +00:00
Joel Sherrill
0ff37e6866 Patch rtems-rc-20000104-0.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
which is described below:

    This one is a (minor) patch in preparation of the upcoming patches. It
    actually is an excerpt of the upcoming patches and therefore is
    completely untested in this standalone form, but I don't expect it to
    break something.

    The essential changes in this patch are:
        * An update to rtems-polish.sh (Now can also be run in subdirectories)
        * A bug-fix for the libcpu/powerpc (A directory was missing from
          SUBDIRS in a Makefile.am)
        * An update to gensh2.cfg.
        * Cleanups/Enhancements to configuration files

    To apply:
        cd <srcdir>
        patch -p0 < rtems-rc-20000104-0.diff
        cvs rm -f c/src/lib/libbsp/Makefile.am.new
2000-01-07 14:47:02 +00:00
Joel Sherrill
fa178d4926 Patch rtems-rc-19991203-3.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
which adds automake support to libbsp/bare.
1999-12-13 15:57:41 +00:00
Joel Sherrill
000a9a9784 Patch rtems-rc-19991203-1.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
to generalize librdbg for all i386 BSPs.  His comments:

  The patch below generalizes librdbg for all i386 bsps. It is not a
  complete rewrite, but a minimal invasive attempt to generalization.

  To apply:

    mv c/src/librdbg/src/i386/pc386 c/src/librdbg/src/i386/any
    patch -p1 < patches-rc-19991203-1.diff
    ./bootstrap
1999-12-13 14:48:17 +00:00
Joel Sherrill
fc81cc9933 Patch rtems-rc-19991123-rc-3.diff from Ralf Corsepius
<corsepiu@faw.uni-ulm.de>:

    The patch below provides
      * automake support for score/cpu/powerpc
      * The hack to propagate values from *.cfg to automake configuration
      * A fix for librdbg/powerpc/mcp750/Makefile.am (Was completely corrupted
        before)
      * Fixes some files which apparently where missing in
        rtems-rc-19991123-rc-2.diff
      * some minor configuration related patches

    To apply:

      rm -rf ./c/src/exec/score/cpu/powerpc/wrap
      patch -p1 < rtems-rc-19991123-rc-3.diff

    Attention:
      c/src/exec/score/cpu/[configure.in|aclocal.m4|configure] should be
      removed after applying the patch.

Modifications had been made to the score/cpu/powerpc directory after
the snapshot this was based on.  In particular, the mpc750 and
other_cpu directories had been renamed to new_exception_processing
and old_exception_processing.  After this patch was applied, modifications
were made to account for this.
1999-12-03 13:31:56 +00:00
Joel Sherrill
96344c8639 Patch rtems-rc-19991123-rc-0.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
which (among other things) converted the mptests to automake.

    SUB_DIRS was used instead of SUBDIRS in some Makefile.ins
    (apparently a leftover from moving the start* directories)

    Addtional major bugs:
    * psxtests/include was empty (incomplete psxtests changes).
    * bogus handling of *.scn in itrontests (screens/sptests vs.
      screens/itrontests installation dirs)

    In addition I have added a few more changes (I couldn't resist)
    * automake support for itrontests
    * OPERATION_COUNT support in tmitrontests/
    * automake support for tmitrontests
    * automake suppport for mptests
    * Some (minor) corrections to several configure.in/Makefile.ams

    => c/src/tests/ is completly under automake control, now.
    => we could start to sort out the structural issues with c/src/tests
      (tests/support, stubdr, tools, get "make dist" working)
1999-11-30 13:49:04 +00:00
Joel Sherrill
9f4868cea9 Miscellaneous patches from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that are part of the Makefile.am conversion effort but were missed
in the previous commits.
1999-11-23 13:57:02 +00:00
Joel Sherrill
9608320702 Patch rtems-rc-19991117-4.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
.. a major configuration cleanup
    ... major enhancement of automake support.

    ... and it contains a *major*  breakthough:

    Automake support for libchip and libmisc *LEAF* directories.

    To implement this I have used several nasty tricks
        * The basical trick is to wrap an old Makefile.in's contents into a
          Makefile.am and still continue to use (i.e include) the old
          *.cfg files.

        * Replaced each INSTALL_IF_CHANGE and INSTALL_VARIANT with make
          dependencies
        * Add a gnu-make ifdef AUTOMAKE to main.cfg to avoid conflicts between
          automake and RTEMS make rules
        * Replaced each install:: and preinstall:: rule with make dependencies
        * Replaced SUB_DIRS with SUBDIRS in all Makefile.ins (Automake
          convention)
        * Removed each manually added autoconf substitution which automake
          performs automatically.

    This is not yet full automake support, because using the temporary
    installation directory, preinstallation in general and building variants
    are in contradiction to automake's basic working principles ...

    ... the new Makefile.ams work still somewhat clumsy
    ... nevertheless they work (quite well).

    WARNING:

    At first glance this patch is small, but
        * it affects the whole configuration system.
        * it opens the road to introducing automake to all Makefile.ins
          currently not being under automake control.

    JOEL> Does this remove or add any files?

    Both, all Makefile.ins below libchip and libmisc get replaced with
    Makefile.ams.
1999-11-22 13:41:11 +00:00
Joel Sherrill
c73b8ac27f This patch adds the basic framework for the ITRON 3.0 API implementation
for RTEMS.
1999-11-09 22:18:43 +00:00
Joel Sherrill
78ffe896ec Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
Removed all go32 configuration tests.

  This patch also comments out some special treatment for Cygwin from
  *.m4 macros. According to reports from David Fiddes. these should
  not be necessary anymore.
1999-10-11 15:50:20 +00:00
Joel Sherrill
45269dc902 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to move librdbg
to its own top level package.
1999-10-11 15:34:26 +00:00
Joel Sherrill
b62a92c804 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
The patch below actuallly consists of two patches:
1) moving librpc to c/src/librpc similar to what has been done to librtems++
2) reworked configure scripts, many safety and dependency checks added to
aclocal/*.m4 macros + configuration fixes.

To apply:

mkdir c/src/librpc
mkdir c/src/librpc/src
cp c/src/lib/librpc/*.c c/src/librpc/src
cp c/src/lib/librpc/Makefile.in c/src/librpc/src
mkdir c/src/librpc/include
mkdir c/src/librpc/include/rpc
cp c/src/lib/include/rpc/* c/src/librpc/include/rpc
patch -p1 < ../rtems-rc-19990820-7.diff
rm -rf c/src/lib/librpc
rm -rf c/src/lib/include/rpc
./autogen

The additional checks in aclocal/*m4 macros add rather restrictive, sometimes
unnecessarily restrictive constraints on the sequence of how macros can be
used in a configure.in script. Adding them has let my problems with some more
complicated configuration options vanish. Apparently some macros had not been
in the required order .

----

Now I still get some linking errors for some cpus and bsps, esp when linking
cdtest, but also at other locations:

e.g. this happens for mips64orion/p4600:

# make[5]: Entering directory
`/lfs/poseidon/users/rtems/src/multi/build/mips64orion-rtems/c/p4600/tests/samples/hello'

/opt/rtems/bin/mips64orion-rtems-gcc --pipe -B../../../../../../p4600/lib/
-specs bsp_specs -qrtems -DP4000 -DCPU_R4000 -DP3_DIAG -D_R4000 -D__mips=3
-mcpu=4600 -G0   -I../../../../../../p4600/lib/include/networking  -g -Wall
-ansi -fasm  -O4 -fomit-frame-pointer     -o o-p4600/hello.exe
o-p4600/init.o ../../../../../../p4600/lib/no-dpmem.rel
../../../../../../p4600/lib/no-event.rel
../../../../../../p4600/lib/no-msg.rel ../../../../../../p4600/lib/no-mp.rel
../../../../../../p4600/lib/no-part.rel
../../../../../../p4600/lib/no-signal.rel
../../../../../../p4600/lib/no-timer.rel
../../../../../../p4600/lib/no-rtmon.rel
/opt/rtems/mips64orion-rtems/lib/libc.a(dtoa.o): In function `_dtoa_r':
/opt/hermes/embedded/build/build-mips64orion-tools/mips64orion-rtems/newlib/libc/stdlib/../../../../../src/newlib/libc/stdlib/dtoa.c:348: relocation truncated to fit: R_MIPS_LITERAL no symbol
/opt/hermes/embedded/build/build-mips64orion-tools/mips64orion-rtems/newlib/libc/stdlib/../../../../../src/newlib/libc/stdlib/dtoa.c:348: relocation truncated to fit: R_MIPS_LITERAL no symbol
/opt/hermes/embedded/build/build-mips64orion-tools/mips64orion-rtems/newlib/libc/stdlib/../../../../../src/newlib/libc/stdlib/dtoa.c:348: relocation truncated to fit: R_MIPS_LITERAL no symbol
collect2: ld returned 1 exit status

# mips64orion-rtems-gcc -v
Reading specs from /opt/rtems/lib/gcc-lib/mips64orion-rtems/2.95.1/specs
gcc version 2.95.1 19990816 (release)

# mips64orion-rtems-ld -v
GNU ld version 2.9.5 (with BFD 2.9.5)
1999-10-04 18:20:14 +00:00
Joel Sherrill
e1d8abbe28 Applied patch rtems-rc-19990820-6.diff.gz from
Ralf Corsepius <corsepiu@faw.uni-ulm.de> which converted many
Makefile.in's to Makefile.am's.  This added a lot of files.
1999-09-07 13:45:03 +00:00
Joel Sherrill
6fc973e39b Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Here is another fix, which addresses a few more or less severe bugs in
    configuration and unix/posix:

    * Configuration fix: c/src/lib/configure.in didn't handle RDBG correctly

    * Configuration fix: make depend was non-functional in
      c/src/lib/libc/Makefile.in
    * Configuration fix: stray comment removed from aclocal/target.m4

    * RTEMS fix: termios support for unix/posix now uses the host's headers
      only (was completely broken).
    - Don't install RTEMS's newlib sys/termios.h for unix (sys/termios.h
      apparently is a newlib specific header)
    - To be able to compile RTEMS's  termios.c with glibc2.1, glibc-2.1
      needs __USE_MISC, which is a private define from gcc's features.h, being
      defined only when _BSD_SOURCE of _SVID_SOURCE is defined.  RTEMS's
      termios apparently implements BSD, thus -D_BSD_SOURCE was added to
      Linux-posix.cfg.
    - Conflicting definitions for  __USE_MISC and _BSD_SOURCE inside of
      RTEMS codes removed due to definition of _BSD_SOURCE on the toplevel.

    This fix has been tested with linux/posix (primary glibc2.1 native),
    linux/posix (secondary libc5 native), sh/gensh1, i386/pc386 and a couple
    of other bsp's/CPU.

    To apply:

        cd <srcdir>
        patch -p1 < rtems-rc-19990709-9.diff

    and
        aclocal -I aclocal && automake && autoconf
        cd c/src/lib; autoconf

    or
        ./autogen
1999-08-18 16:49:52 +00:00
Joel Sherrill
ea562ee977 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
After upgrading my linux box to the brand new SuSE 6.2 release, which is
    glibc-2.1 based, I came across a bug in RTEMS - IIRC, I even warned you
    about it about 1/2 a year ago, but nothing has been done since then :-.

    The *.m4 macros to check for SYSV/IPC are broken for linux/glibc2.1,
    because they assume that linux always defines union semun, which isn't
    true anymore for glibc2.1 (the manpage for semctl states _X_OPEN
    specifies it this way). Therefore I have tried to implement a more
    general approach for handling SYSV for unix/posix which checks for
    presence of struct semun, instead of trying  to evaluate OS specific
    preprocessor symbols.

    This approach is a bit adventureous, because I only tested it with
    linux/glibc2.1 and linux/libc5, but not under other Unix variants RTEMS
    supports. I am quite confident it will work on other hosts, too, but who
    knows :-.

    [FYI: I think this might also is the cause of some problems with RedHat
    6.X / Mandrake linux recently reported on the rtems list -- rtems-4.0.0
    can not be build for posix on any glibc2.1 based host]

    Furthermore the patch below contains a couple of minor fixes and
    configuration cleanups, which IMO should be applied before releasing a
    new snapshot.

    To apply this patch:

        cd <source-tree>
        patch -p1 < rtems-rc-19990709-8.diff
        ./autogen
1999-08-12 18:22:17 +00:00
Joel Sherrill
908436c1ec New configuration files added by patch from
Ralf Corsepius <corsepiu@faw.uni-ulm.de>".
1999-08-10 15:38:09 +00:00
Joel Sherrill
3a8915e6ee Patch rtems-rc-19990709-6-diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
applied.  This modified many Makefiles and custom files and makes many more
settings (network, multiprocessing, etc) gnerated by autoconf.
1999-08-06 17:55:25 +00:00
Joel Sherrill
fdb37e81ec New file from Ralf Corsepius <corsepiu@faw.uni-ulm.de> missed being added
in a previous patch.
1999-08-02 15:33:26 +00:00
Joel Sherrill
1896a650fc 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
1999-07-30 17:52:50 +00:00
Joel Sherrill
eb299afca2 This is part of a major patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
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

    12. host compiled tools (exception bsp-tools) are accessed in location
    in the build tree instead of inside the build-tree when building RTEMS.
    13. RTEMS_ROOT and PROJECT_ROOT now point to directories inside the
    build-tree - many tiny changes as consequence from this.
    14. --with-cross-host support removed (offically announced obsolete by
    cygnus)
    15. Changing the order of building libraries below c/src/lib/
    16. Former toplevel configure script broken into aclocal/*.m4 macros
    17. Newlib now detected by configure macros, RTEMS_HAS_NEWLIB removed
    from *cfg.
    18. sptables.h now generated by autoconf
    19. Rules for "mkinstalldirs temporary installation tree" moved from
    c/Makefile to subdirectories.
    20. Cpu-tools do not get installed.
    21. FIX: Use ACLOCAL_AMFLAGS instead of ACLOCAL = -I ... in Makefile.ams
    which are in directories with own configure scripts.
    22. Hardcoding BSP names into libbsp/.../tools to avoid RTEMS_BSP get
    overridden from the environment.
    22. FIX: Handling of MP_PIECES in various Makefiles
    23. FIX: Removing "::" rules from some Makefile.ins
    24. FIX: File permission chaos: (-m 444 and -m 555 vs. -m 644 and -m
    755) - Now all include files use -m 644.
    25. Removed many gnumake-conditionals in Makefile.ins - Partially
    replaced with automake-conditional, partially replaced with
    conditionalized Makefile variables (... _yes_V)
    26. Massively reworked acpolish: acpolish now parses Makefile.ins and
    interprets parts of the Makefile.ins.
    27. FIX: Some $(wildcard $(srcdir)/*.h) macros removed / replaced with
    explicit lists of files in Makefile.ins.
    28. FIX: Replacing MKLIB with RANLIB in Makefile.ins
    29. 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.

    2. 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,

    3. Stuctural dependencies between subdirectories.
    4. Depth of the source tree (Prevents multilibbing and introduces many
    unnecessary configure scripts).
    5. per cpu vs. per bsp configuration (There are no real per-cpu parts
    yets :-).
    6. 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.
    7. General redesign of the source tree
    8. 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@faw.uni-ulm.de           FAX: +49/731/501-999
    http://www.faw.uni-ulm.de
1999-07-26 20:20:22 +00:00
Joel Sherrill
83f62bfcb3 This is part of a major patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
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

    12. host compiled tools (exception bsp-tools) are accessed in location
    in the build tree instead of inside the build-tree when building RTEMS.
    13. RTEMS_ROOT and PROJECT_ROOT now point to directories inside the
    build-tree - many tiny changes as consequence from this.
    14. --with-cross-host support removed (offically announced obsolete by
    cygnus)
    15. Changing the order of building libraries below c/src/lib/
    16. Former toplevel configure script broken into aclocal/*.m4 macros
    17. Newlib now detected by configure macros, RTEMS_HAS_NEWLIB removed
    from *cfg.
    18. sptables.h now generated by autoconf
    19. Rules for "mkinstalldirs temporary installation tree" moved from
    c/Makefile to subdirectories.
    20. Cpu-tools do not get installed.
    21. FIX: Use ACLOCAL_AMFLAGS instead of ACLOCAL = -I ... in Makefile.ams
    which are in directories with own configure scripts.
    22. Hardcoding BSP names into libbsp/.../tools to avoid RTEMS_BSP get
    overridden from the environment.
    22. FIX: Handling of MP_PIECES in various Makefiles
    23. FIX: Removing "::" rules from some Makefile.ins
    24. FIX: File permission chaos: (-m 444 and -m 555 vs. -m 644 and -m
    755) - Now all include files use -m 644.
    25. Removed many gnumake-conditionals in Makefile.ins - Partially
    replaced with automake-conditional, partially replaced with
    conditionalized Makefile variables (... _yes_V)
    26. Massively reworked acpolish: acpolish now parses Makefile.ins and
    interprets parts of the Makefile.ins.
    27. FIX: Some $(wildcard $(srcdir)/*.h) macros removed / replaced with
    explicit lists of files in Makefile.ins.
    28. FIX: Replacing MKLIB with RANLIB in Makefile.ins
    29. 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.

    2. 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,

    3. Stuctural dependencies between subdirectories.
    4. Depth of the source tree (Prevents multilibbing and introduces many
    unnecessary configure scripts).
    5. per cpu vs. per bsp configuration (There are no real per-cpu parts
    yets :-).
    6. 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.
    7. General redesign of the source tree
    8. 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@faw.uni-ulm.de           FAX: +49/731/501-999
    http://www.faw.uni-ulm.de
1999-07-26 20:19:49 +00:00
Joel Sherrill
6693a68ffa This is part of a major patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
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

    12. host compiled tools (exception bsp-tools) are accessed in location
    in the build tree instead of inside the build-tree when building RTEMS.
    13. RTEMS_ROOT and PROJECT_ROOT now point to directories inside the
    build-tree - many tiny changes as consequence from this.
    14. --with-cross-host support removed (offically announced obsolete by
    cygnus)
    15. Changing the order of building libraries below c/src/lib/
    16. Former toplevel configure script broken into aclocal/*.m4 macros
    17. Newlib now detected by configure macros, RTEMS_HAS_NEWLIB removed
    from *cfg.
    18. sptables.h now generated by autoconf
    19. Rules for "mkinstalldirs temporary installation tree" moved from
    c/Makefile to subdirectories.
    20. Cpu-tools do not get installed.
    21. FIX: Use ACLOCAL_AMFLAGS instead of ACLOCAL = -I ... in Makefile.ams
    which are in directories with own configure scripts.
    22. Hardcoding BSP names into libbsp/.../tools to avoid RTEMS_BSP get
    overridden from the environment.
    22. FIX: Handling of MP_PIECES in various Makefiles
    23. FIX: Removing "::" rules from some Makefile.ins
    24. FIX: File permission chaos: (-m 444 and -m 555 vs. -m 644 and -m
    755) - Now all include files use -m 644.
    25. Removed many gnumake-conditionals in Makefile.ins - Partially
    replaced with automake-conditional, partially replaced with
    conditionalized Makefile variables (... _yes_V)
    26. Massively reworked acpolish: acpolish now parses Makefile.ins and
    interprets parts of the Makefile.ins.
    27. FIX: Some $(wildcard $(srcdir)/*.h) macros removed / replaced with
    explicit lists of files in Makefile.ins.
    28. FIX: Replacing MKLIB with RANLIB in Makefile.ins
    29. 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.

    2. 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,

    3. Stuctural dependencies between subdirectories.
    4. Depth of the source tree (Prevents multilibbing and introduces many
    unnecessary configure scripts).
    5. per cpu vs. per bsp configuration (There are no real per-cpu parts
    yets :-).
    6. 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.
    7. General redesign of the source tree
    8. 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@faw.uni-ulm.de           FAX: +49/731/501-999
    http://www.faw.uni-ulm.de
1999-07-26 20:00:37 +00:00
Joel Sherrill
8c92fa385a Patcg from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
-- configure now fails to detect the toolchain for linux-posix.

  As work-around, I have reverted to the old behavior of RTEMS_TARGET_CPU_NAME,
  thus no_cpu/no_bsp will fail badly in configure again.
1999-06-16 14:55:28 +00:00
Joel Sherrill
d2d22780d5 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
> 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.
1999-06-15 22:46:44 +00:00
Joel Sherrill
15aa5ffbfd Patch ("FIX: no_cpu/no_bsp") from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This patch should fix the nastiest configuration bugs for no_cpu/no_bsp.

    With this patch applied, configure --target=no_cpu-rtems now correctly
    acknowledges its configuration, but later fails building when trying to
    build libcsupport (I leave this problem for you :-).

    Fixes/Changes:
    * aclocal/canonicalize-target-name.m4: use RTEMS_CPU instead of
      target_cpu, switch to a native compiler setup if target = no_cpu*rtems,
      ie. implicitly use host=target (native) and RTEMS_CPU=no_cpu for
      --target=no_cpu*rtems.
    * add no_bsp/bsp_specs (Support -qrtems, -qrtems_debug; please check
      before adding :-)
    * Use RTEMS_CANONICALIZE_TARGET_CPU instead of AC_CANONICAL_SYSTEM in
      toplevel/configure.in
    * All references to $target_cpu in aclocal/*.m4, Makefile.ins and *.cfg
      files changed to RTEMS_CPU
    * bug fixes to exec/score/cpu/no_cpu/wrap (This part of the patch may
      result into patch rejections, because your recently posted patch may
      also have addressed this problem).

    After applying this patch, please do:

        cvs add c/src/lib/libbsp/no_cpu/no_bsp/bsp_specs
        ./autogen
1999-06-14 18:54:24 +00:00
Joel Sherrill
817466c863 Patch ("FIX: MKDIR/INSTALL_VARIANT") from Ralf Corsepius
<corsepiu@faw.uni-ulm.de>:

    This patch removes MKDIR from RTEMS source tree and fixes another small
    bug in the definition of INSTALL_VARIANT (cf. to the patch itself for
    details, it should be self-explanatory)

    After applying the patch please do:

        cvs rm aclocal/mkdir.m4
        ./autogen
1999-06-14 18:29:09 +00:00
Joel Sherrill
6b7ab9bf72 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
FYI: I am not talking about using "make -C <dir>", which probably
    is much faster on M$ hosts than RTEMS's implementation, but about
    removing --enable-gmake-print support and to apply a variant of
    automake's subdirectory.

    Automake's subdirectory rule seems to be a little bit faster, but I
    wouldn't bet on this.

    Attached to this mail is my proposal.

    After applying the patch, please run
        cvs rm aclocal/enable-gmake-print.m4
        ./autogen
1999-04-16 18:23:48 +00:00
Joel Sherrill
82f490f786 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> to correct the
--enable-tests problem a better way.
1999-04-12 20:24:56 +00:00
Joel Sherrill
8cdb582b49 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This patch addresses a few minor issues and contains a few (minor)
  preparations for automake.

  * configure.in: Fix for handing c/src/tests subdirectory handling (FIX)
  * aclocal/rtems-top.m4:
    + Add TARGET_SUBDIR and --with-target-subdir (preparation of future
      enhancements for cross-compiling)
    + Activate RTEMS_ROOT handling (automake preparation)
  * automake/*.am: replace comments "#" with "##" so that comments won't
    get included into Makefile.in's anymore
  * c/update-tools/* automake support (NEW)
  * ./autogen update/enhancement (cf. ./autogen for details)

  After applying this patch please run:

    ./autogen
    cvs add c/update-tools/configure.in
    cvs add c/update-tools/Makefile.am
    cvs add c/update-tools/aclocal.m4
1999-04-12 15:41:33 +00:00
Joel Sherrill
a37be5c4e2 Eric Norum <eric@skatter.usask.ca> noticed that the documentation and
configure scripts did not match on the default value of --enable-tests.
1999-04-06 20:25:40 +00:00
Joel Sherrill
7e03d107d7 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Yet some more modifications, I would recommend to be considered before
    releasing a snapshot:

    1. Cleanup to aclocal/
    cvs rm -f aclocal/cygwin.m4
    cvs rm -f aclocal/exeext.m4

    They are neither used nor needed anymore, however they also don't
    disturb (we use autoconf-2.13's AC_EXEEXT instead, now)

    ----------

    2. rtems-rc-19990328-0.diff
    Some (minor) bug-fixes:
    * make/Templates/Makefile.inc.in: use the new installation directory
    ($(prefix)/ instead of $(prefix)/rtems/)
    * c/src/exec/score/tools/generic/Makefile.am: added line to include local.am
    * c/src/exec/score/tools/*/configure.in: added CVS Id header

    ----------

    3. rtems-rc-19990328-1.diff
    Enhancements and cleanups to autogen, rtems-polish.sh, configure.in etc.

    * autogen: Use the file "VERSION" to detect RTEMS toplevel directory,
    extended usage-message, use "find -print"
    * c/update-tools/cipolish: New script to beautify configure.in scripts
    * c/update-tools/rtems-polish.sh: Use the file "VERSION" to detect RTEMS
    toplevel directory, extended usage-message, added variable for perl
    scripts' subdirectory, use "find -print", cipolish support, new options
    -ac -am -ci.
    * aclocal/*.m4, configure.in: moved some AC_SUBST lines to aclocal/*.m4
    (reduces size of configure.in
    scripts, eases splitting configure.in scripts).

    ----------
1999-03-29 21:08:04 +00:00
Joel Sherrill
9b8baa128b Automake II patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. Email
description follows:

Description:

    * automake for *all* tool subdirectories (Makefile.am, configure.in etc.)
    * autogen now also considers CONFIG_HEADER (generates stamp-h.ins and
      config.h.ins)
    * c/src/tests/tools/generic/difftest and
      c/src/tests/tools/generic/sorttimes generated by configure scripts
    * c/update-tools/ampolish, beautifier for Makefile.ams, similar to
      acpolish
    * rtems-polish.sh added to c/update-tools/ + ampolish support
    * New subdirectory ./automake, contains automake -Makefile fragments to
      support RTEMS make "debug, debug_install, profile, profile_install" for
      native Makefile.ams (== ignore these make targets).
    * aclocal/rtems-top.m4's RTEMS_TOP now reads the automake makefile
      variable VERSION from RTEMS ./VERSION file.
    * ./configure.in uses the macros from aclocal + support for the tools'
      configure scripts

  Remarks:
    * To run rtems-polish.sh, "cd <rtems-source-tree>;
      ./c/update-tools/rtems-polish.sh"
    * AFAIS, now all native subdirectories are converted to automake (Please
      drop me a note, if I forgot something).
    * Unless you notice something fatal, IMO the time has come for a public
      try (== snapshot). I do not intend to send more automake related patches
      within, say 2 weeks, to give these patches time to settle and to give me
      some time to think on how to continue.
    * The patch assumes installation to the new main installation directory
      [$(prefix)].
1999-03-23 18:02:17 +00:00
Joel Sherrill
04c308c022 Incorporated automake I patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This is the first real automake patch.

    It adds automake support to c/build-tools and cleans up a few minor
    issues.

    I consider this to be a testing probe to examine problems with automake.
    Therefore, this patch is just a more or less harmless replacement of the
    former RTEMS Makefiles and I expect it not last for long. If you want to
    give automake Makefiles a public try and if you want/need to learn about
    problems with it, then it's about time for a new snapshot, IMO. I may
    have screwed up something not directly related to automake, but I expect
    very few (none to be precise) problems with automake. However, somebody
    should at least try building on Cygwin. If you feel a bit more
    adventureous, then I also can continue to submit more patches.

    [FYI: I still have a couple of automake files laying around, but they
    need some cleanup before being submitted as patches. Now, that I am just
    into it, I'll perhaps submit another one tonight :-]

    After applying this patch (patch -p1 -E <
    <path-to>/rtems-rc-19990318-0), first run the "autogen" script from the
    toplevel source directory, before committing to CVS. Be careful about
    dependencies between Makefile.am and Makefile.ins when cutting tarballs
    from CVS. Makefile.ins are required to be newer than Makefile.ams,
    otherwise users would need to have automake, autoconf and perl. Some
    people recommend to "touch" all Makefile.in after checkout from cvs (cf.
    egcs/contrib/egcs_update).

    ATTENTION:
      * This patch adds a number of new files.
      * remove aclocal/exeext.m4 and aclocal/cygwin.m4 from CVS, They are now
        covered by autoconf-2.13`s AC_EXEEXT.

    Some features/side-effects which are probably interesting for you:
    In a configured build-tree "cd c/build-tools", then try

      * "make RTEMS_BSP=<bsp> install"
      * "make RTEMS_BSP=<bsp> dist"
1999-03-19 23:11:36 +00:00
Joel Sherrill
9ec964784b Towards automake VIII patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
OK, I 've made up my mind to cut a big chunk of my automake-patches (:-).

    Below you can find a drop-in replacement of the aclocal directory. It
    contains a lot of new macro files, most of them are directly cut from rtems
    top-level configure script, some are new some are identical to former
    versions. The motivation behind these files is to reuse parts from rtems
    current top-level configure.in script in up-coming subdirectory configure.in
    scripts.

    I'd like to ask you to untar the archive ontop of the source tree and to
    add/commit these files to CVS. Adding these files should not have any
    influence on RTEMS momentary configuration (except of you are required to
    run aclocal -I aclocal && autoconf afterwards), because most of them
    currently are not used at all.

    ---------

    BTW: Please upgrade to autoconf-2.13 and automake-2.4, if you havn't done
    this already (egcs/CVS require them, too). My upcoming automake files
    require automake-2.4 which requires autoconf-2.13 or later.
1999-03-19 21:54:36 +00:00
Joel Sherrill
b64b1ed387 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Moves some configure.in fragments to new macro files below aclocal/
   (Motivation: Prepare splitting the toplevel configure.in script)
1999-03-18 22:36:28 +00:00
Joel Sherrill
dfe7746ed9 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> 1999-03-17 23:43:32 +00:00
Joel Sherrill
2e26bbd059 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Here is a cosmetic patch which corrects a few spelling problems in parts
  written by me.

  Apparently, I must have written these under the influence of ether (:-)
1998-11-19 20:09:01 +00:00
Joel Sherrill
692b9f7fdd Merged Vista SCORE603e, Radstone PPCn_60x, and DY-4 DMV177 BSPs along
with libchip.
1998-10-28 19:17:16 +00:00
Joel Sherrill
bf1ef5ba1d Regenerated after fixing a typo. 1998-10-05 13:50:53 +00:00
Joel Sherrill
f44a81b761 Modifed i386 gas test to put each directive on its own line per
problem report from Erik Ivanenko <erik.ivanenko@utoronto.ca>.
1998-10-05 12:52:31 +00:00
Joel Sherrill
2c3840b563 Added new autoconf test for i386 code16/code32 support. The guts of the
test were suggested by Ian Taylor <ian@airs.com> and Joel did the
hard part of putting it in aclocal and editting all the offending
Makefiles and source code which could use this feature.
1998-09-30 20:58:39 +00:00