Subversion Repositories FixDeps

Rev

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

Rev Author Line No. Line
5 gdshaw 1
# This file is part of !FixDeps.
2
# Copyright  2003 Graham Shaw.
3
# Distribution and use are subject to the GNU General Public License,
4
# a copy of which may be found in the file !FixDeps.Copyright.
5
 
12 gdshaw 6
-----------------------------------------------------------------------
7
!FixDeps
5 gdshaw 8
 
15 gdshaw 9
Version 0.0.1 (12 Sep 2003)
12 gdshaw 10
-----------------------------------------------------------------------
11
 
5 gdshaw 12
Purpose
13
 
14
  !FixDeps is a filter for converting source code dependencies from
15
  the form produced by GCC to a form usable by GNU Make when using
16
  RISC OS as a host operating system.
17
 
18
  On Unix systems this operation is normally performed using sed or
19
  an equivalent tool.  For example, the following incantation is
20
  suggested in the GNU Make documentation:
21
 
22
    set -e; $(CC) -M $(CPPFLAGS) $< \
23
      | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
24
      [ -s $@ ] || rm -f $@
25
 
26
  which converts (for example):
27
 
28
    main.o : main.c main.h
29
 
30
  into:
31
 
32
    main.o main.d : main.c main.h
33
 
34
  RISC OS has a much more complex path syntax than Unix.  A general
35
  solution has not been attempted, but this implementation will cope
36
  with suffix swapping and path aliases.  For example:
37
 
38
    o.main: gccpkg:include.unixlib.h.kernel
39
 
40
  will be converted to:
41
 
42
    main.o main.d: gccpkg<58>include.unixlib.h.kernel
43
 
44
  which appears to have the desired effect for the current release
45
  of GCC for RISC OS (2.95.4 release 3).
46
 
47
Installation
48
 
49
  The !FixDeps application directory can be located anywhere.
50
 
51
  Ensure that it is booted and/or run before attempting to use it.
52
 
53
  (If two or more versions are present, running !FixDeps will change the
54
  active version whereas booting it will not.)
55
 
56
Use
57
 
58
  !FixDeps has been successfully used in conjunction with the following
59
  pair of suffix rules:
60
 
61
    .cc.dd:
62
      $(CXX) -MM $(CPPFLAGS) $< > $@
63
 
64
    .dd.d:
65
      $(FIXDEPS) $* < $< > $@
66
 
67
  where:
68
 
69
    FIXDEPS = fixdeps
70
 
71
Building from Source
72
 
73
  No configuration is necessary.  Change the current directory to !FixDeps
74
  then issue the command:
75
 
76
  make all
77
 
78
Download
79
 
80
  !FixDeps may be downloaded from:
81
 
82
  http://www.sagitta.demon.co.uk/riscos/