| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Cherrypick from master 2001-09-19 17:19:27 UTC Joel Sherrill <joel.sherrill@OARcorp.com> '2001-09-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>':
automake/leaf.am
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ralf's description of the patch follows:
Now that make VARIANT=xxx has prooven not to be simple enough, I made up
my mind to change again the internals of the mechanism being used to
handle variants:
With the patch below, I introduce the indirection step I had mentioned
in one of my recent mails to translate settings of VARIANT.
The trick is to use the contents of VARIANT as keyword to lookup another
internal keyword (VARIANT_V), which then is used as keyword to lookup
values for setting ARCH, LIB_VARIANT, LIBSUFFIX_VA and AM_CFLAGS from
ARCH_$(VARIANT_V)_V etc. (cf automake/local.am).
This means, at first to translate
VARIANT=[optimize|OPTIMIZE] into VARIANT_V=OPTIMIZE
VARIANT=[debug|DEBUG] into VARIANT_V=DEBUG
VARIANT=[profile|PROFILE] into VARIANT_V=PROFILE
VARIANT=<anything> into VARIANT_V=<anything>
=> perform keyword conversion to uppercase and reduction from 6 to 3+1
internal keywords.
$(VARIANT_V) then is used to lookup make variables from other tables
(eg. CFLAGS_*_V). Eg. ARCH is set up this way:
ARCH_OPTIMIZE_V = o-optimize
ARCH_DEBUG_V = o-debug
ARCH_PROFILE_V = o-profile
ARCH__V = $(ARCH_OPTIMIZE_V)
ARCH = $(ARCH_$(VARIANT_V)_V)
Note the ARCH__V variable. When VARIANT=<anything> is passed to make,
VARIANT_V=<anything> will be set, resulting into ARCH =
$(ARCH_$(<anything>)_V) = $(ARCH__V) = $(ARCH_OPTIMIZE_V), ie. falling
back to OPTIMIZE.
=> o- or o-<anything> should never popup anymore.
|
|
|
|
|
|
|
|
|
|
|
| |
The patch contains:
* Many small cleanups wrt. make VARIANT=[DEBUG|PROFILE] support
* several modifications to make/custom/*.cfg
* Merger with the mvme2307.cfg you had posted two weeks ago (Please
check it, I did not check it against to version you posted today).
* Added a check to the toplevel configure.in to refuse building inside
of the source tree.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch contains:
* build variants support
* Reworked make-exe custom/*.cfg for all targets (Should be
self-explanatory, may still be incomplete)
* Several fixes to custom/*.cfgs related to setting debug flags
* Fixes to some bsp_specs for BSPs which apparently have never been
build with debugging before ;)
* pc386.cfg fix attempts (cf. my mail from earlier today)
* Updated ampolish (No need to run it, the patch contains the result
from having applied it)
Known bugs/deficiencies related to this work:
* "make [clean|distclean]" support is still incomplete (e.g. "make
clean" does not delete all Depends-o-*)
* Completely untested for linux/posix and hppa.
* Build failures of i960 BSPs (make VARIANT=DEBUG) - I guess, they are
not related to this patch.
* Successfully tested for all sh, sparc, i386, ppc, m68k BSPs (make
VARIANT=DEBUG)
* make VARIANT=PROFILE not supported by all BSPs (I don't care :)
* make VARIANT=DEBUG failures below tests/ for some BSPs (e.g. gensh1),
because of the tests's binaries being too large to fit into the target
memory layout.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that addresses the following:
* Duplicate variables in Makefiles (many Makefile.ams below c/src/test
are affected systematically)
* Erroniously using local.am instead of host.am in host-Makefile.am
(Only host Makefile.ams should be affected; Erroniously using local.am
in host-Makefiles doesn't desturb much)
* use '.' instead of '$pwd' in ./bootstrap (using $pwd does not work if
$pwd is a symlink on linux).
* Broken CVS Ids somewhere
* Removing redundant/obsolete make variables from *.cfg files.
Except of the last item from the list above, most parts of this patch
are fairly harmless, sometimes even cosmetical.
As mentioned before, this patch also contains a new ampolish script.
This script features:
* Pretty printing of Makefile.ams (eg. removal of trailing spaces,
removal of duplicate empty lines, pretty printing make variables, etc.).
* Some syntactical checks on the contents of Makefiles.am
* Proper handling of Automake conditionals
FYI:
* Applying tools/update/rtems-polish.sh -am completely reformats all
Makefile.am resulting into a very large (~500k) diff.
* Applying tools/update/rtems-polish.sh -am twice, finally does not
reformat the Makefile.ams anymore.
* Many parts of the patch above result from merging back issues which
have shown when applying this new ampolish (i.e. partially result from
extracting the essentials of reformating being proposed by applying it
on Makefile.ams).
Though this ampolish is a very nice tool, IMHO, I am hestitant if you
should apply (i.e. run tools/update/rtems-polish.sh -am) it to the
sources before the release, because
* the resulting diff is fairly large
* I am not 100% sure it doesn't break anything.
However, applying it after the release would result into compatibility
problems in applying patches ;)
I would suggest that you might consider trying it locally, then to
examine the diff and then to decide whether to apply it in general or
not.
Joel's Comments:
As Ralf points out, this patch is problematic in that applying it before
a release could break things but applying it afterwards will result in
patches being unusable for Makefiles. My inclination is to forge ahead
and apply it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that fixes numerous miscellaneous issues most related to the debug and
profile build stanzas:
Fix for the "make debug" (1) issue and an analogous issue with "make
profile" (untested).
* Fixes to mcp750.cfg (make debug, directories) (2)
* Updates/minor fixes for shgen (3)
* Updates some custom/*.cfgs to use $(LINK.c) instead of $(CC)
* Leftovers from rtems-rc-4.5.0-[0|1].diff which somehow did not make it
into cvs.
* Cleanups to the perlscripts below tools/update/
* Some unsorted minor fixes.
Footnotes/Remarks:
(1) Tested for all m68k, sh, sparc, unix and selected i386, ppc BSPs.
Known problems: I can't build the debug variant for the m68k/mvme162 and
m68k/mvme162lx (segmentation fault - signal 11 :)
(2) Tested by building the BSP, but I doubt the debug-variant is
functional. The flags used for the debug variant should be checked by
knowledgeable persons and probably at runtime #:o)
(3) I have updated shgen to use getopt_long (it should fall back to
getopt if not available), enhanced the options, cleaned up some minor
tweaks and added help2man support (rough automatic man-page generation).
Technical notes:
* make debug and make profile now work similar in target Makefile.ams as
they did in old autoconf-Makefile.ins using leaf.cfg. Unlike the rules
in leaf.cfg these Makefile.am also recurse once on themselves in
directory Makefiles before or after recursing into subdirectories, not
only in leaf-directories.
To implement this behavior, I renamed the former automake/local.am into
automake/host.am and extended local.am to provide this recursion.
I.e. host.am implements the non-self-recursive variant, while local.am
now implements the self-recursive behavior.
=> all Makefile.ams exploiting build-variants are supposed to include
local.am
=> all Makefile.ams not exploiting build-variants should include host.am
=> Rules of thumb:
- Only include one of both, either local.am or host.am into a
Makefile.am.
-Target-Makefile.ams should include local.am
-Host-Makefile.ams should include host.am (Probably, you now understand
the naming)
- There are exceptions from these rules :)
* Now, make debug|profile|all are independent of each other. However,
each of them however triggers preinstall.
* "make install" still decends into the subdirectories but does not
trigger "all|profile|debug|preinstall" in target Makefile.am anymore.
Besides triggering "install"-rules in some selected Makefile.ams, it
only packs $(PROJECT_ROOT) into a tarballs and unpacks it to $(prefix).
=> "make install" alone is not enough to install RTEMS, now use
make RTEMS_BSP=<bsps> [all] [debug] [profile]
make RTEMS_BSP=<bsp> install
I consider this to be a step back wrt. exploiting automake mechanisms,
and expect this to be reverted if we abandon building target variants in
favour of the standard convention of optionally overriding flags from
the command line (i.e. instead of "make debug", GNU standards favor
"make CFLAGS=<options> --prefix=<location>")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that fixes numerous miscellaneous issues most related to the debug and
profile build stanzas:
Fix for the "make debug" (1) issue and an analogous issue with "make
profile" (untested).
* Fixes to mcp750.cfg (make debug, directories) (2)
* Updates/minor fixes for shgen (3)
* Updates some custom/*.cfgs to use $(LINK.c) instead of $(CC)
* Leftovers from rtems-rc-4.5.0-[0|1].diff which somehow did not make it
into cvs.
* Cleanups to the perlscripts below tools/update/
* Some unsorted minor fixes.
Footnotes/Remarks:
(1) Tested for all m68k, sh, sparc, unix and selected i386, ppc BSPs.
Known problems: I can't build the debug variant for the m68k/mvme162 and
m68k/mvme162lx (segmentation fault - signal 11 :)
(2) Tested by building the BSP, but I doubt the debug-variant is
functional. The flags used for the debug variant should be checked by
knowledgeable persons and probably at runtime #:o)
(3) I have updated shgen to use getopt_long (it should fall back to
getopt if not available), enhanced the options, cleaned up some minor
tweaks and added help2man support (rough automatic man-page generation).
Technical notes:
* make debug and make profile now work similar in target Makefile.ams as
they did in old autoconf-Makefile.ins using leaf.cfg. Unlike the rules
in leaf.cfg these Makefile.am also recurse once on themselves in
directory Makefiles before or after recursing into subdirectories, not
only in leaf-directories.
To implement this behavior, I renamed the former automake/local.am into
automake/host.am and extended local.am to provide this recursion.
I.e. host.am implements the non-self-recursive variant, while local.am
now implements the self-recursive behavior.
=> all Makefile.ams exploiting build-variants are supposed to include
local.am
=> all Makefile.ams not exploiting build-variants should include host.am
=> Rules of thumb:
- Only include one of both, either local.am or host.am into a
Makefile.am.
-Target-Makefile.ams should include local.am
-Host-Makefile.ams should include host.am (Probably, you now understand
the naming)
- There are exceptions from these rules :)
* Now, make debug|profile|all are independent of each other. However,
each of them however triggers preinstall.
* "make install" still decends into the subdirectories but does not
trigger "all|profile|debug|preinstall" in target Makefile.am anymore.
Besides triggering "install"-rules in some selected Makefile.ams, it
only packs $(PROJECT_ROOT) into a tarballs and unpacks it to $(prefix).
=> "make install" alone is not enough to install RTEMS, now use
make RTEMS_BSP=<bsps> [all] [debug] [profile]
make RTEMS_BSP=<bsp> install
I consider this to be a step back wrt. exploiting automake mechanisms,
and expect this to be reverted if we abandon building target variants in
favour of the standard convention of optionally overriding flags from
the command line (i.e. instead of "make debug", GNU standards favor
"make CFLAGS=<options> --prefix=<location>")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<corsepiu@faw.uni-ulm.de> which implements automake support for some
score/cpu/<RTEMS_CPU> subdirectories and fixes a few minor configuration
bugs.
To apply:
rm -rf c/src/exec/score/cpu/i960/wrap
rm -rf c/src/exec/score/cpu/m68k/wrap
rm -rf c/src/exec/score/cpu/sh/wrap
rm -rf c/src/exec/score/cpu/sparc/wrap
rm -rf c/src/exec/score/cpu/unix/wrap
patch -p1 < rtems-rc-19991123-rc-1.diff
./bootstrap
Known bugs:
* "make debug|profile" in c/src/src/score/cpu/<RTEMS_CPU/Makefile does
not handle recursion to subdirectories correctly (recurses too often).
However, this issue is hardly visible and should be tolerable for the
moment.
|
|
|
|
| |
<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.
|
|
|
|
|
| |
Ralf Corsepius <corsepiu@faw.uni-ulm.de> which converted many
Makefile.in's to Makefile.am's. This added a lot of files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is an addition to "The big-patch"
CHANGES:
* FIX: c/Makefile.am: bogus comment which changed the behavior of
c/Makefile.am removed
* FIX: make/custom/ts_i386ex.cfg did not set HAS_NETWORKING correctly
(Me thinks it might have been me who added this bogus setting :-).
* NEW: removing make targets get, protos, debug_install, profile_install
* NEW: replacing clobber with distclean
* NEW: Reimplement distclean and clean as reverse depth first make
targets (adaptation to automake's behavior)
* NEW: removing RCS_CLEAN from make distclean (tools/build/rcs_clean is
still in - remove it?)
* NEW: "$(RM) Makefile" added to make distclean (adaptation to
automake's behavior)
* NEW: "$(RM) config.cache config.log" to CLOBBER_ADDITIONS in
[lib|exec|tests]/Makefile.in (adaptation to automake's behavior)
* NEW: "$(CLEAN_PROTOS)" removed (Not used anywhere)
* NEW: binpatch.c moved from i386 bsp tools to tools/build (AFAIS,
binpatch is not specific to the pc386 BSP at all)
* NEW: AC_EXEEXT added to all configure scripts which contain AC_PROG_CC
(Cygwin support)
* NEW/Experimental: An experimental implementation of temporary
installation tree support in libbsp/i386/pc386/tools/Makefile.am, based
on dependency tracking with make, instead of applying INSTALL_CHANGE.
REMARK:
* This patch is small in size, but changes the behavior of "make
clean|distclean|clobber" basically.
* This patch does not alter building/compiling RTEMS, ie. there should
be no need to rerun all "make all" building tests.
KNOWN BUGS:
* make RTEMS_BSP="..." distclean in c/ runs "make distclean" in BSPs
subdirectories passed through RTEMS_BSP and in "c/." only, but does not
descend into other BSP subdirectories previously configured with
different settings of make RTEMS_BSP="...".
=> Workaround: always use the same setting of RTEMS_BSP when working
inside the build-tree.
* "make [distclean|clean]" do not clean subdirectories, which have been
configured at configuration time, but which are not used due to
make-time configuration (e.g. macros/networking/rdgb subdirectories).
This will problem will vanish by itself when migrating from make-time to
configuration-time configuration
APPLYING THE PATCH
mv c/src/lib/libbsp/i386/pc386/tools/binpatch.c tools/build
patch -p1 < rtems-rc-19990709-2.diff
autogen
|
|
|
|
|
| |
> * RTEMS's 'make depend' isn't a standard automake make target and is not
> supported in automake supported subdirectories.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
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)].
|