Subversion Repositories FixDeps

Rev

Rev 12 | Rev 23 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

# This file is part of !FixDeps.
# Copyright © 2003 Graham Shaw.
# Distribution and use are subject to the GNU General Public License,
# a copy of which may be found in the file !FixDeps.Copyright.

-----------------------------------------------------------------------
!FixDeps

Version 0.0.1 (12 Sep 2003)
-----------------------------------------------------------------------

Purpose

  !FixDeps is a filter for converting source code dependencies from
  the form produced by GCC to a form usable by GNU Make when using
  RISC OS as a host operating system.

  On Unix systems this operation is normally performed using sed or
  an equivalent tool.  For example, the following incantation is
  suggested in the GNU Make documentation:

    set -e; $(CC) -M $(CPPFLAGS) $< \
      | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
      [ -s $@ ] || rm -f $@

  which converts (for example):

    main.o : main.c main.h

  into:

    main.o main.d : main.c main.h

  RISC OS has a much more complex path syntax than Unix.  A general
  solution has not been attempted, but this implementation will cope
  with suffix swapping and path aliases.  For example:

    o.main: gccpkg:include.unixlib.h.kernel

  will be converted to:

    main.o main.d: gccpkg<58>include.unixlib.h.kernel

  which appears to have the desired effect for the current release
  of GCC for RISC OS (2.95.4 release 3).

Installation

  The !FixDeps application directory can be located anywhere.

  Ensure that it is booted and/or run before attempting to use it.

  (If two or more versions are present, running !FixDeps will change the
  active version whereas booting it will not.)

Use

  !FixDeps has been successfully used in conjunction with the following
  pair of suffix rules:

    .cc.dd:
      $(CXX) -MM $(CPPFLAGS) $< > $@

    .dd.d:
      $(FIXDEPS) $* < $< > $@

  where:

    FIXDEPS = fixdeps

Building from Source

  No configuration is necessary.  Change the current directory to !FixDeps
  then issue the command:

  make all

Download

  !FixDeps may be downloaded from:

  http://www.sagitta.demon.co.uk/riscos/