Files
rtems/make/host.cfg.in
Joel Sherrill 99eb5852f5 Patches rtems-rc-4.5.0-1.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
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>")
2000-02-25 15:03:10 +00:00

75 lines
1.6 KiB
INI

#
# $Id$
#
# OS-specific configuration
#
# Derived from rtems/c/make/os/*.cfg in previous RTEMS version.
#
RTEMS_HOST = @RTEMS_HOST@
#
# Stuff to clean and clobber for the OS
#
CLEAN_OS =
CLOBBER_OS = *~ *.bak TAGS tags
SHELL=@SHELL@
ECHO=echo
CAT=cat
RM=@RM@ -f
CP=@CP@
MV=@MV@
LN=@LN@
MKDIR=mkdir
CHMOD=chmod
SED=sed
# Global tools
ifndef PACKHEX
PACKHEX=$(PROJECT_BIN)/packhex
endif
ifndef INSTALL_CHANGE
INSTALL_CHANGE=$(PROJECT_BIN)/install-if-change
endif
INSTALL_VARIANT=$(INSTALL_CHANGE) -V "$(LIB_VARIANT)"
# FIXME: HACK for a bug in cygwin-hosted egcs which returns a mixture
# of '\\' and '/' as path separators.
# Should be removed as soon as this bug is fixed in egcs.
GCCSED = @GCCSED@
# ksh (or bash) is used by some shell scripts; ref build-tools/scripts/Makefile
#
# Must have shell functions. Some ksh's core dump mysteriously and
# unreliably on RTEMS shell scripts. bash appears to be the most
# reliable but late model ksh's are usually OK.
KSH=@KSH@
#
# Rule to install a shell script with the proper shell to run it.
#
# when debugging, one may want to save the previous incarnation of the
# installed script. Replace the first line of this rule to do this.
#
# -$(RM) $@.old
# -$(MV) $@ $@.old >/dev/null 2>&1
# OBSOLETE: Don't use this anymore, this may be removed in future
define make-script
-$(RM) $@
$(SED) -e '1,1s?^#!KSHELL?#!$(KSH)?' \
-e '1,1s?^#!SHELL?#!$(SHELL)?' < $< > $@
$(CHMOD) 0555 $@
endef
INSTBINFLAGS = -m 0755
INSTDATAFLAGS = -m 0644
INSTLIBFLAGS = -m 0644
INSTDIRFLAGS = -m 0755 -d
INSTINCFLAGS = -m 0644