2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
[binutils.git] / gas / mpw-make.sed
blob16f12a5055009403a83bd206a842b4c828397dff
1 # Sed commands that finish translating the GAS Unix Makefile to MPW syntax.
3 /^# @target_frag@/a\
5 HDEFINES = \
6 LOCAL_LOADLIBES = \
8 /^srcroot = /s/^/#/
9 /^target_alias = /s/^/#/
11 /INCLUDES/s/-i "{srcdir}":\([a-z]*\)/-i "{topsrcdir}"\1/
12 /INCLUDES/s/-i "{srcdir}"\.\./-i "{topsrcdir}"/
14 /^INCLUDES = .*$/s/$/ -i "{topsrcdir}"include:mpw: -i ::extra-include:/
16 /$(TARG_CPU_DEP_@target_cpu_type@)/s/$(TARG_CPU_DEP_@target_cpu_type@)/{TARG_CPU_DEP}/
18 /@OPCODES_LIB@/s/@OPCODES_LIB@/::opcodes:libopcodes.o/
19 /@BFDLIB@/s/@BFDLIB@/::bfd:libbfd.o/
21 # Point at the libraries directly.
22 /@OPCODES_DEP@/s/@OPCODES_DEP@/::opcodes:libopcodes.o/
23 /@BFDDEP@/s/@BFDDEP@/::bfd:libbfd.o/
25 # Don't need this.
26 /@HLDFLAGS@/s/@HLDFLAGS@//
28 /extra_objects@/s/extra_objects@/{EXTRA_OBJECTS}/
30 /LOADLIBES/s/{LOADLIBES}/{EXTRALIBS}/
32 /@ALL_OBJ_DEPS@/s/@ALL_OBJ_DEPS@/::bfd:bfd.h/
34 # This causes problems - not sure why.
35 /^tags TAGS/,/etags /d
37 /^make-gas.com/s/^/#/
39 /true/s/ ; @true$//
41 # Remove references to conf.in, we don't need them.
42 /conf\.in/s/conf\.in//g
44 # Use _gdbinit everywhere instead of .gdbinit.
45 /gdbinit/s/\.gdbinit/_gdbinit/g
47 /atof-targ/s/"{s}"atof-targ\.c/"{o}"atof-targ.c/g
48 /config/s/"{s}"config\.h/"{o}"config.h/g
49 /config/s/^config\.h/"{o}"config.h/
50 /obj-format/s/"{s}"obj-format\.c/"{o}"obj-format.c/g
51 /obj-format/s/"{s}"obj-format\.h/"{o}"obj-format.h/g
52 /targ-cpu/s/"{s}"targ-cpu\.c/"{o}"targ-cpu.c/g
53 /targ-cpu/s/"{s}"targ-cpu\.h/"{o}"targ-cpu.h/g
54 /targ-env/s/"{s}"targ-env\.h/"{o}"targ-env.h/g
56 /m68k-parse.c/s/"{s}"m68k-parse\.c/"{o}"m68k-parse.c/g
57 /m68k-parse.c/s/^m68k-parse\.c/"{o}"m68k-parse.c/
59 # Whack out the config.h dependency, it only causes excess rebuilds.
60 /{OBJS}/s/{OBJS} \\Option-f "{o}"config.h/{OBJS} \\Option-f/
61 /gasp.c/s/gasp\.c "{o}"config.h/gasp.c/
63 # ALL_CFLAGS includes TDEFINES, which is not desirable at link time.
64 /CC_LD/s/ALL_CFLAGS/CFLAGS/g
66 # The resource file is called mac-as.r.
67 /as.new.r/s/as\.new\.r/mac-as.r/
68 /gasp.new.r/s/gasp\.new\.r/mac-as.r/
70 # ...and the PROG_NAME doesn't have a .new in it.
71 /PROG_NAME/s/PROG_NAME='"'as.new'"'/PROG_NAME='"'as'"'/
72 /PROG_NAME/s/PROG_NAME='"'gasp.new'"'/PROG_NAME='"'gasp'"'/
74 # Whack out recursive makes, they won't work.
75 /^[     ][      ]*srcroot=/,/^[         ][      ]*(cd /d
77 # Work around quoting problems by using multiple echo commands.
78 /'#define GAS_VERSION "{VERSION}"'/c\
79         Echo -n '#define GAS_VERSION "' >> "{o}"config.new\
80         Echo -n "{VERSION}" >> "{o}"config.new\
81         Echo -n '"' >> "{o}"config.new
83 # Add a "stamps" target.
84 $a\
85 stamps \\Option-f config-stamp\
87 /^install \\Option-f/,/^$/c\
88 install \\Option-f all install-only\
90 install-only \\Option-f\
91         NewFolderRecursive "{bindir}"\
92         Duplicate -y :as.new "{bindir}"as\
93         Duplicate -y :gasp.new "{bindir}"gasp\
96 # Whack out config-rebuilding targets, they won't work.
97 /^Makefile \\Option-f/,/^$/d
98 /^config.status \\Option-f/,/^$/d
100 /^"{o}"config.h \\Option-f/s/^/#/