| 1 | |
| 2 | s = "{srcdir}" |
| 3 | |
| 4 | o = : |
| 5 | |
| 6 | # File in object dir can come from either the current dir or srcdir. |
| 7 | |
| 8 | "{o}" \Option-f : "{s}" |
| 9 | |
| 10 | # Default rule that puts each file into separate segment. |
| 11 | |
| 12 | .c.o \Option-f .c |
| 13 | {CC} {DepDir}{Default}.c {ALL_CFLAGS} {SymOptions} -s {Default} -o {TargDir}{Default}.c.o |
| 14 | |
| 15 | # Makefile for GNU binary-file utilities |
| 16 | # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. |
| 17 | |
| 18 | # This file is part of GNU binutils. |
| 19 | |
| 20 | # This program is free software; you can redistribute it and:or modify |
| 21 | # it under the terms of the GNU General Public License as published by |
| 22 | # the Free Software Foundation; either version 2 of the License, or |
| 23 | # (at your option) any later version. |
| 24 | # |
| 25 | # This program is distributed in the hope that it will be useful, |
| 26 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 27 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 28 | # GNU General Public License for more details. |
| 29 | # |
| 30 | # You should have received a copy of the GNU General Public License |
| 31 | # along with this program; if not, write to the Free Software |
| 32 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 33 | |
| 34 | # srcdir = : |
| 35 | |
| 36 | prefix = :usr:local |
| 37 | |
| 38 | program_transform_name = |
| 39 | exec_prefix = {prefix} |
| 40 | bindir = {exec_prefix}bin: |
| 41 | libdir = {exec_prefix}:lib |
| 42 | tooldir = {exec_prefix}:{target_alias} |
| 43 | |
| 44 | datadir = {prefix}:lib |
| 45 | mandir = {prefix}:man |
| 46 | man1dir = {mandir}:man1 |
| 47 | man2dir = {mandir}:man2 |
| 48 | man3dir = {mandir}:man3 |
| 49 | man4dir = {mandir}:man4 |
| 50 | man5dir = {mandir}:man5 |
| 51 | man6dir = {mandir}:man6 |
| 52 | man7dir = {mandir}:man7 |
| 53 | man8dir = {mandir}:man8 |
| 54 | man9dir = {mandir}:man9 |
| 55 | infodir = {prefix}:info |
| 56 | includedir = {prefix}:include |
| 57 | docdir = {datadir}:doc |
| 58 | |
| 59 | SHELL = :bin:sh |
| 60 | |
| 61 | INSTALL = Duplicate -y |
| 62 | INSTALL_PROGRAM = {INSTALL} |
| 63 | INSTALL_DATA = {INSTALL} |
| 64 | INSTALL_XFORM = {INSTALL} -t='{program_transform_name}' |
| 65 | INSTALL_XFORM1 = {INSTALL_XFORM} -b=.1 |
| 66 | |
| 67 | AR = ar |
| 68 | AR_FLAGS = qv |
| 69 | #CFLAGS = -g |
| 70 | MAKEINFO = makeinfo |
| 71 | TEXI2DVI = texi2dvi |
| 72 | RANLIB = ranlib |
| 73 | BISONFLAGS = -d |
| 74 | TEXI2ROFF=texi2roff |
| 75 | MAKEOVERRIDES= |
| 76 | |
| 77 | NM_FOR_TARGET = nm |
| 78 | NM = {NM_FOR_TARGET} |
| 79 | SYMLINK = ln -s |
| 80 | |
| 81 | BISON = byacc |
| 82 | # Comment these out if using lex. |
| 83 | LEX_OPTIONS = -i -Cem |
| 84 | LEX = flex |
| 85 | |
| 86 | # Distribution version |
| 87 | VERSION=cygnus-2.3.1 |
| 88 | # Distribution name |
| 89 | DIST_NAME=binutils-{VERSION} |
| 90 | |
| 91 | # version=`:::gcc:gcc -dumpversion` |
| 92 | |
| 93 | # Where to find texinfo.tex to format docn with TeX |
| 94 | TEXIDIR = "{srcdir}":texinfo |
| 95 | |
| 96 | MANPAGES= ar nm objdump ranlib size strings strip cplusfilt objcopy nlmconv |
| 97 | |
| 98 | #CC=gcc -Wall |
| 99 | # these two are almost the same program |
| 100 | AR_PROG=ar |
| 101 | RANLIB_PROG=ranlib |
| 102 | |
| 103 | # objcopy and strip should be the same program |
| 104 | OBJCOPY_PROG=objcopy |
| 105 | STRIP_PROG=strip |
| 106 | |
| 107 | STRINGS_PROG=strings |
| 108 | |
| 109 | # These should all be the same program too. |
| 110 | SIZE_PROG=size |
| 111 | NM_PROG=nm |
| 112 | OBJDUMP_PROG=objdump |
| 113 | |
| 114 | # This is the demangler, as a standalone program. |
| 115 | DEMANGLER_PROG=cplusfilt |
| 116 | |
| 117 | NLMCONV_PROG=nlmconv |
| 118 | |
| 119 | PROGS = {SIZE_PROG} {OBJDUMP_PROG} {NM_PROG} {AR_PROG} {STRINGS_PROG} {STRIP_PROG} {RANLIB_PROG} {DEMANGLER_PROG} {OBJCOPY_PROG} |
| 120 | STAGESTUFF = {PROGS} "{o}"\Option-x.c.o |
| 121 | # Files that can be generated, but should be in the distribution. |
| 122 | DISTSTUFF=arparse.c :arlex.c "{s}"nlmheader.c info |
| 123 | |
| 124 | BASEDIR = "{srcroot}" |
| 125 | BFDDIR = {BASEDIR}bfd |
| 126 | INCDIR = {BASEDIR}include |
| 127 | INCLUDES = -i "{INCDIR}":mpw: -i ::extra-include: -i : -i {srcdir} -i ::bfd: -i {BFDDIR} -i {INCDIR} |
| 128 | |
| 129 | #### host and target dependant Makefile fragments come in here. |
| 130 | ### |
| 131 | |
| 132 | ALL_CFLAGS = {INCLUDES} {HDEFINES} {TDEFINES} {CFLAGS} |
| 133 | |
| 134 | "{o}".c.c.o \Option-f |
| 135 | {CC} -c {ALL_CFLAGS} $< |
| 136 | |
| 137 | #\f |
| 138 | ## Random definitions |
| 139 | # Hopefully all these may be flushed once we get configuration down pat. |
| 140 | |
| 141 | # alloca only needed for systems which don't have it and when cc != gcc. |
| 142 | # ALLOCA = "{o}"alloca.c.o |
| 143 | |
| 144 | # nm tries to malloc enough space for the string table. The old GNU malloc |
| 145 | # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might |
| 146 | # fail unnecessarily. I've also seen some Unix malloc's fail, even when |
| 147 | # there is enough memory. So use the new GNU malloc. |
| 148 | # MALLOC = "{o}"gmalloc.c.o |
| 149 | # Use this if the system malloc is good enough. |
| 150 | MALLOC = |
| 151 | |
| 152 | # Use the GNU getopt unless you have problems with it. |
| 153 | # The IRIS version could probably benefit from being assembled with |
| 154 | # libmalloc rather than the ordinary malloc. |
| 155 | LIBIBERTY = ::libiberty:libiberty.o |
| 156 | |
| 157 | # Code shared by all the binutils. |
| 158 | BULIBS = "{o}"bucomm.c.o "{o}"version.c.o "{o}"filemode.c.o |
| 159 | |
| 160 | ADDL_LIBS = {MALLOC} {BULIBS} {BFD} {LIBIBERTY} |
| 161 | |
| 162 | BFD = ::bfd:libbfd.o |
| 163 | OPCODES = ::opcodes:libopcodes.o |
| 164 | |
| 165 | RUNTEST = runtest |
| 166 | RUNTEST_FLAGS = |
| 167 | FLAGS_TO_PASS = \Option-d |
| 168 | "CC={CC}" \Option-d |
| 169 | "CFLAGS={CFLAGS}" \Option-d |
| 170 | "RUNTEST={RUNTEST}" \Option-d |
| 171 | "RUNTEST_FLAGS={RUNTEST_FLAGS} \Option-d |
| 172 | SIZE=`if [ -f $$rootme:{SIZE_PROG} ] ; then echo $$rootme:{SIZE_PROG} ; else echo {SIZE_PROG}; fi` \Option-d |
| 173 | OBJCOPY=`if [ -f $$rootme:{OBJCOPY_PROG} ] ; then echo $$rootme:{OBJCOPY_PROG} ; else echo {OBJCOPY_PROG}; fi` \Option-d |
| 174 | NM=`if [ -f $$rootme:{NM_PROG} ] ; then echo $$rootme:{NM_PROG} ; else echo {NM_PROG}; fi` \Option-d |
| 175 | AR=`if [ -f $$rootme:{AR_PROG} ] ; then echo $$rootme:{AR_PROG} ; else echo {AR_PROG}; fi` \Option-d |
| 176 | OBJDUMP=`if [ -f $$rootme:{OBJDUMP_PROG} ] ; then echo $$rootme:{OBJDUMP_PROG} ; else echo {OBJDUMP_PROG}; fi` \Option-d |
| 177 | STRINGS=`if [ -f $$rootme:{STRINGS_PROG} ] ; then echo $$rootme:{STRINGS_PROG} ; else echo {STRINGS_PROG}; fi` \Option-d |
| 178 | STRIP=`if [ -f $$rootme:{STRIP_PROG} ] ; then echo $$rootme:{STRIP_PROG} ; else echo {STRIP_PROG}; fi` \Option-d |
| 179 | RANLIB=`if [ -f $$rootme:{RANLIB_PROG} ] ; then echo $$rootme:{RANLIB_PROG} ; else echo {RANLIB_PROG}; fi` \Option-d |
| 180 | DEMANGLE=`if [ -f $$rootme:{DEMANGLER_PROG} ] ; then echo $$rootme:{DEMANGLER_PROG} ; else echo {DEMANGLER_PROG}; fi`" |
| 181 | |
| 182 | #\f |
| 183 | ## The rules |
| 184 | |
| 185 | all \Option-f {ADDL_LIBS} {PROGS} |
| 186 | |
| 187 | testsuite \Option-f |
| 188 | if [ -f testsuite:Makefile.in ]; then \Option-d |
| 189 | (rootme=`pwd`: ; export rootme ; \Option-d |
| 190 | rootsrc=`cd {srcdir}; pwd`: ; export rootsrc ; \Option-d |
| 191 | cd testsuite; {MAKE} FLAGS_TO_PASS={FLAGS_TO_PASS}); \Option-d |
| 192 | else true ; fi |
| 193 | |
| 194 | check \Option-f force |
| 195 | rootme=`pwd`; export rootme; cd testsuite ; \Option-d |
| 196 | {MAKE} check {FLAGS_TO_PASS} |
| 197 | # :bin:sh "{srcdir}"sanity.sh . |
| 198 | |
| 199 | installcheck \Option-f |
| 200 | :bin:sh "{srcdir}"sanity.sh {bindir} |
| 201 | |
| 202 | info \Option-f binutils.info |
| 203 | |
| 204 | dvi \Option-f binutils.dvi |
| 205 | |
| 206 | {SIZE_PROG} \Option-f {ADDL_LIBS} "{o}"size.c.o {BFD} |
| 207 | Link {LDFLAGS} -o {SIZE_PROG} "{o}"size.c.o {ADDL_LIBS} {EXTRALIBS} |
| 208 | |
| 209 | {OBJCOPY_PROG} \Option-f {ADDL_LIBS} "{o}"objcopy.c.o "{o}"not-strip.c.o {BFD} |
| 210 | Link {LDFLAGS} -o {OBJCOPY_PROG} "{o}"objcopy.c.o "{o}"not-strip.c.o {ADDL_LIBS} {EXTRALIBS} |
| 211 | |
| 212 | {STRINGS_PROG} \Option-f {ADDL_LIBS} "{o}"strings.c.o {BFD} |
| 213 | Link {LDFLAGS} -o {STRINGS_PROG} "{o}"strings.c.o {ADDL_LIBS} {EXTRALIBS} |
| 214 | |
| 215 | {STRIP_PROG} \Option-f {ADDL_LIBS} "{o}"objcopy.c.o "{o}"is-strip.c.o {BFD} |
| 216 | Link {LDFLAGS} -o {STRIP_PROG} "{o}"objcopy.c.o "{o}"is-strip.c.o {ADDL_LIBS} {EXTRALIBS} |
| 217 | |
| 218 | {NM_PROG} \Option-f {ADDL_LIBS} "{o}"nm.c.o "{o}"demangle.c.o {BFD} |
| 219 | Link {LDFLAGS} -o {NM_PROG} "{o}"nm.c.o "{o}"demangle.c.o {ADDL_LIBS} {EXTRALIBS} |
| 220 | |
| 221 | {OBJDUMP_PROG} \Option-f {ADDL_LIBS} "{o}"objdump.c.o {BFD} {OPCODES} |
| 222 | Link {LDFLAGS} -o {OBJDUMP_PROG} "{o}"objdump.c.o {OPCODES} {ADDL_LIBS} {EXTRALIBS} |
| 223 | |
| 224 | "{o}"objdump.c.o \Option-f "{s}"objdump.c config.status |
| 225 | {CC} {INCLUDES} {HDEFINES} {TDEFINES} {ARCHDEFS} {CFLAGS} "{srcdir}"objdump.c -o "{o}"objdump.c.o |
| 226 | |
| 227 | :underscore.c \Option-f |
| 228 | echo "int prepends_underscore = 0;" >underscore.c |
| 229 | |
| 230 | "{o}"version.c.o \Option-f "{s}"version.c |
| 231 | {CC} {INCLUDES} {HDEFINES} {TDEFINES} -d VERSION='"{VERSION}"' {CFLAGS} "{srcdir}"version.c -o "{o}"version.c.o |
| 232 | |
| 233 | "{o}"demangle.c.o \Option-f "{BASEDIR}"libiberty:cplus-dem.c |
| 234 | {CC} {INCLUDES} {HDEFINES} {TDEFINES} {CFLAGS} "{BASEDIR}"libiberty:cplus-dem.c -o "{o}"cplus-dem.c.o |
| 235 | Rename -y "{o}"cplus-dem.c.o "{o}"demangle.c.o |
| 236 | |
| 237 | # For parallel compiling, depend on "{o}"demangle.c.o so that one gets done first. |
| 238 | "{o}"cplus-dem.c.o \Option-f "{BASEDIR}"libiberty:cplus-dem.c "{INCDIR}":getopt.h "{o}"demangle.c.o |
| 239 | {CC} -d MAIN {INCLUDES} {HDEFINES} {TDEFINES} {CFLAGS} "{BASEDIR}"libiberty:cplus-dem.c -o "{o}"cplus-dem.c.o |
| 240 | |
| 241 | {DEMANGLER_PROG} \Option-f "{o}"cplus-dem.c.o {LIBIBERTY} "{o}"underscore.c.o "{o}"version.c.o |
| 242 | Link {LDFLAGS} -o {DEMANGLER_PROG} "{o}"cplus-dem.c.o {LIBIBERTY} {EXTRALIBS} "{o}"underscore.c.o "{o}"version.c.o |
| 243 | |
| 244 | :arparse.h :arparse.c \Option-f "{s}"arparse.y |
| 245 | {BISON} {BISONFLAGS} "{srcdir}"arparse.y |
| 246 | Rename -y y.tab.c :arparse.c |
| 247 | Rename -y y.tab.h :arparse.h |
| 248 | |
| 249 | :arlex.c \Option-f "{s}"arlex.l |
| 250 | {LEX} {LEX_OPTIONS} "{srcdir}"arlex.l |
| 251 | Rename -y :lex.yy.c :arlex.c |
| 252 | |
| 253 | {AR_PROG} \Option-f {ADDL_LIBS} "{o}"ar.c.o "{o}"arparse.c.o "{o}"arlex.c.o "{o}"not-ranlib.c.o {BFD} "{o}"arsup.c.o |
| 254 | Link {LDFLAGS} -o {AR_PROG} "{o}"ar.c.o "{o}"arparse.c.o "{o}"arlex.c.o "{o}"arsup.c.o "{o}"not-ranlib.c.o {ADDL_LIBS} {EXTRALIBS} |
| 255 | |
| 256 | {RANLIB_PROG} \Option-f {ADDL_LIBS} "{o}"ar.c.o "{o}"is-ranlib.c.o "{o}"arparse.c.o "{o}"arlex.c.o "{o}"arsup.c.o {BFD} |
| 257 | Link {LDFLAGS} -o {RANLIB_PROG} "{o}"ar.c.o "{o}"arparse.c.o "{o}"arlex.c.o "{o}"arsup.c.o "{o}"is-ranlib.c.o {ADDL_LIBS} {EXTRALIBS} |
| 258 | |
| 259 | # This rule creates a single binary that switches between ar and ranlib |
| 260 | # by looking at argv[0]. Use this kludge to save some disk space. |
| 261 | # However, you have to install things by hand. |
| 262 | # (That is after 'make install', replace the installed ranlib by a link to ar.) |
| 263 | |
| 264 | # Alternatively, you can install ranlib.sh as ranlib. |
| 265 | |
| 266 | ar_with_ranlib \Option-f {ADDL_LIBS} "{o}"ar.c.o "{o}"maybe-ranlib.c.o {BFD} |
| 267 | Link {LDFLAGS} -o {AR_PROG} "{o}"ar.c.o "{o}"maybe-ranlib.c.o {ADDL_LIBS} {EXTRALIBS} |
| 268 | Delete -y {RANLIB_PROG} |
| 269 | # ln {AR_PROG} {RANLIB_PROG} |
| 270 | |
| 271 | # objcopy and strip in one binary that uses argv[0] to decide its action. |
| 272 | |
| 273 | objcopy_with_strip \Option-f {ADDL_LIBS} "{o}"objcopy.c.o "{o}"maybe-strip.c.o {BFD} |
| 274 | Link {LDFLAGS} -o {OBJCOPY_PROG} "{o}"objcopy.c.o "{o}"maybe-strip.c.o {ADDL_LIBS} {EXTRALIBS} |
| 275 | Delete -y {STRIP_PROG} |
| 276 | # ln {OBJCOPY_PROG} {STRIP_PROG} |
| 277 | |
| 278 | nlmheader.c \Option-f "{s}"nlmheader.y |
| 279 | {BISON} "{srcdir}"nlmheader.y |
| 280 | Delete -y "{s}"nlmheader.c |
| 281 | Rename -y y.tab.c "{s}"nlmheader.c |
| 282 | |
| 283 | "{o}"nlmconv.c.o \Option-f "{s}"nlmconv.c |
| 284 | ldname=`t='{program_transform_name}'; echo ld | sed -e "" $$t`; \Option-d |
| 285 | {CC} -d LD_NAME="\"${ldname}\"" {INCLUDES} {HDEFINES} {TDEFINES} {CFLAGS} "{srcdir}"nlmconv.c -o "{o}"nlmconv.c.o |
| 286 | |
| 287 | {NLMCONV_PROG} \Option-f "{o}"nlmconv.c.o "{o}"nlmheader.c.o {ADDL_LIBS} {BFD} |
| 288 | Link {LDFLAGS} -o $@ "{o}"nlmconv.c.o "{o}"nlmheader.c.o {ADDL_LIBS} {EXTRALIBS} |
| 289 | |
| 290 | # This list of dependencies was generated by doing a make with gcc -MM |
| 291 | # saving the output in a file and removing the gcc commands |
| 292 | # changing "::::devo:binutils:::bfd" to "{BFDDIR}" |
| 293 | # removing "::::devo:binutils:" |
| 294 | # changing "::include" to "{INCDIR}" |
| 295 | |
| 296 | "{o}"bucomm.c.o \Option-f "{s}"bucomm.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 297 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d |
| 298 | "{INCDIR}":fopen-same.h "{s}"bucomm.h |
| 299 | "{o}"filemode.c.o \Option-f "{s}"filemode.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 300 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d |
| 301 | "{INCDIR}":fopen-same.h |
| 302 | "{o}"size.c.o \Option-f "{s}"size.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 303 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d |
| 304 | "{INCDIR}":fopen-same.h "{INCDIR}":getopt.h |
| 305 | "{o}"objdump.c.o \Option-f "{s}"objdump.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 306 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d |
| 307 | "{INCDIR}":fopen-same.h "{INCDIR}":getopt.h \Option-d |
| 308 | "{INCDIR}":dis-asm.h "{INCDIR}":aout:aout64.h \Option-d |
| 309 | "{INCDIR}":elf:internal.h {INCDIR}:aout:stab.def |
| 310 | "{o}"nm.c.o \Option-f "{s}"nm.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 311 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d |
| 312 | "{INCDIR}":fopen-same.h "{s}"bucomm.h "{INCDIR}":getopt.h \Option-d |
| 313 | "{INCDIR}":aout:stab_gnu.h {INCDIR}:aout:stab.def \Option-d |
| 314 | "{INCDIR}":aout:ranlib.h "{INCDIR}":demangle.h |
| 315 | "{o}"ar.c.o \Option-f "{s}"ar.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 316 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d |
| 317 | "{INCDIR}":fopen-same.h "{s}"bucomm.h "{INCDIR}":aout:ar.h \Option-d |
| 318 | "{BFDDIR}":libbfd.h "{s}"arsup.h |
| 319 | "{o}"arparse.c.o \Option-f :arparse.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 320 | "{INCDIR}":obstack.h "{s}"arsup.h |
| 321 | "{o}"arlex.c.o \Option-f :arlex.c :arparse.h |
| 322 | "{o}"not-ranlib.c.o \Option-f "{s}"not-ranlib.c |
| 323 | "{o}"arsup.c.o \Option-f "{s}"arsup.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 324 | "{INCDIR}":obstack.h "{s}"arsup.h "{s}"bucomm.h |
| 325 | "{o}"strings.c.o \Option-f "{s}"strings.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 326 | "{INCDIR}":obstack.h "{s}"bucomm.h |
| 327 | "{o}"objcopy.c.o \Option-f "{s}"objcopy.c ::bfd:bfd.h "{INCDIR}":ansidecl.h \Option-d |
| 328 | "{INCDIR}":obstack.h ::bfd:sysdep.h "{BFDDIR}":hosts:std-host.h \Option-d |
| 329 | "{INCDIR}":fopen-same.h "{s}"bucomm.h |
| 330 | "{o}"is-strip.c.o \Option-f "{s}"is-strip.c |
| 331 | "{o}"is-ranlib.c.o \Option-f "{s}"is-ranlib.c |
| 332 | "{o}"underscore.c.o \Option-f :underscore.c |
| 333 | "{o}"not-strip.c.o \Option-f "{s}"not-strip.c |
| 334 | "{o}"nlmheader.c.o \Option-f "{s}"nlmheader.c "{s}"nlmconv.h "{INCDIR}":nlm:common.h \Option-d |
| 335 | "{INCDIR}":nlm:internal.h |
| 336 | "{o}"nlmconv.c.o \Option-f "{INCDIR}":nlm:common.h "{INCDIR}":nlm:internal.h \Option-d |
| 337 | "{BFDDIR}":libnlm.h "{s}"bucomm.h |
| 338 | |
| 339 | stage1 \Option-f force |
| 340 | mkdir stage1 |
| 341 | Rename -y {STAGESTUFF} stage1 |
| 342 | |
| 343 | stage2 \Option-f force |
| 344 | mkdir stage2 |
| 345 | Rename -y {STAGESTUFF} stage2 |
| 346 | |
| 347 | stage3 \Option-f force |
| 348 | mkdir stage3 |
| 349 | Rename -y {STAGESTUFF} stage3 |
| 350 | |
| 351 | against=stage2 |
| 352 | |
| 353 | comparison \Option-f force |
| 354 | for i in {STAGESTUFF} ; do cmp $$i {against}:$$i ; done |
| 355 | |
| 356 | de-stage1 \Option-f force |
| 357 | (cd stage1 ; mv -f \Option-x ..) |
| 358 | rmdir stage1 |
| 359 | |
| 360 | de-stage2 \Option-f force |
| 361 | (cd stage2 ; mv -f \Option-x ..) |
| 362 | rmdir stage2 |
| 363 | |
| 364 | de-stage3 \Option-f force |
| 365 | (cd stage3 ; mv -f \Option-x ..) |
| 366 | rmdir stage3 |
| 367 | |
| 368 | ###################################################################### |
| 369 | # DOCUMENTATION TARGETS |
| 370 | # TeX output |
| 371 | binutils.dvi \Option-f "{srcdir}"binutils.texi |
| 372 | TEXINPUTS={TEXIDIR} \Option-f $$TEXINPUTS {TEXI2DVI} "{srcdir}"binutils.texi |
| 373 | |
| 374 | # info file for online browsing |
| 375 | binutils.info \Option-f "{srcdir}"binutils.texi |
| 376 | {MAKEINFO} -o binutils.info "{srcdir}"binutils.texi |
| 377 | |
| 378 | # different targets for -ms, -mm, -me |
| 379 | # Try to use a recent texi2roff. v2 was put on prep in jan91. |
| 380 | # If you want an index, see texi2roff doc for postprocessing |
| 381 | # and add -i to texi2roff invocations below. |
| 382 | # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete |
| 383 | # corresponding -e lines when later texi2roff's are current) |
| 384 | # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs. |
| 385 | # + @c's deleted explicitly because texi2roff sees texinfo commands in them |
| 386 | # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank |
| 387 | # + @alphaenumerate is ridiculously new, turned into @enumerate |
| 388 | |
| 389 | # roff output (-ms) |
| 390 | binutils.ms \Option-f "{srcdir}"binutils.texi |
| 391 | sed -e ':\\input texinfo:d' \Option-d |
| 392 | e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d |
| 393 | e ':^end ifinfo:d' \Option-d |
| 394 | e ':^@c:d' \Option-d |
| 395 | e 's:{.\Option-x,,:{:' \Option-d |
| 396 | e 's:@ : :g' \Option-d |
| 397 | e 's:^enumerate:g' \Option-d |
| 398 | e 's:^@end alphaenumerate:@end enumerate:g' \Option-d |
| 399 | "{srcdir}"binutils.texi | \Option-d |
| 400 | {TEXI2ROFF} -ms | \Option-d |
| 401 | sed -e 's:---:\\(em:g' \Option-d |
| 402 | >binutils.ms |
| 403 | |
| 404 | # roff output (-mm) |
| 405 | # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, |
| 406 | # try leaving them in |
| 407 | binutils.mm \Option-f "{srcdir}"binutils.texi |
| 408 | sed -e ':\\input texinfo:d' \Option-d |
| 409 | e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d |
| 410 | e ':^end ifinfo:d' \Option-d |
| 411 | e ':^@c:d' \Option-d |
| 412 | e 's:{.\Option-x,,:{:' \Option-d |
| 413 | e ':@noindent:d' \Option-d |
| 414 | e 's:@ : :g' \Option-d |
| 415 | e 's:^enumerate:g' \Option-d |
| 416 | e 's:^@end alphaenumerate:@end enumerate:g' \Option-d |
| 417 | "{srcdir}"binutils.texi | \Option-d |
| 418 | {TEXI2ROFF} -mm | \Option-d |
| 419 | sed -e 's:---:\\(em:g' \Option-d |
| 420 | >binutils.mm |
| 421 | |
| 422 | # roff output (-me) |
| 423 | binutils.me \Option-f "{srcdir}"binutils.texi |
| 424 | sed -e ':\\input texinfo:d' \Option-d |
| 425 | e ':@c TEXI2ROFF-KILL:,:@c END TEXI2ROFF-KILL:d' \Option-d |
| 426 | e ':^end ifinfo:d' \Option-d |
| 427 | e ':^@c:d' \Option-d |
| 428 | e 's:{.\Option-x,,:{:' \Option-d |
| 429 | e 's:@ : :g' \Option-d |
| 430 | e 's:^enumerate:g' \Option-d |
| 431 | e 's:^@end alphaenumerate:@end enumerate:g' \Option-d |
| 432 | "{srcdir}"binutils.texi | \Option-d |
| 433 | {TEXI2ROFF} -me | \Option-d |
| 434 | sed -e 's:---:\\(em:g' \Option-d |
| 435 | >binutils.me |
| 436 | |
| 437 | |
| 438 | ###################################################################### |
| 439 | |
| 440 | mostlyclean \Option-f |
| 441 | Delete -y "{o}"\Option-x.c.o \Option-x~ \#\Option-x core binutils.?? binutils.??? |
| 442 | clean \Option-f mostlyclean |
| 443 | @if [ -d testsuite ] ; then \Option-d |
| 444 | cd testsuite ; {MAKE} {FLAGS_TO_PASS} clean ; \Option-d |
| 445 | else true; fi |
| 446 | Delete -y {PROGS} :underscore.c |
| 447 | distclean \Option-f |
| 448 | @if [ -d testsuite ] ; then \Option-d |
| 449 | cd testsuite ; {MAKE} {FLAGS_TO_PASS} distclean ; \Option-d |
| 450 | else true; fi |
| 451 | Delete -y Makefile config.status "{s}"sysdep.h "{o}"\Option-x.c.o \Option-x~ \#\Option-x core \Option-d |
| 452 | binutils.?? binutils.??s binutils.aux "{s}"binutils.log binutils.toc |
| 453 | realclean \Option-f clean distclean |
| 454 | Delete -y {DISTSTUFF} TAGS |
| 455 | |
| 456 | etags tags \Option-f TAGS |
| 457 | |
| 458 | TAGS \Option-f force |
| 459 | etags {INCDIR}:\Option-x.h "{srcdir}"\Option-x.[hc] |
| 460 | |
| 461 | install \Option-f all install-only |
| 462 | |
| 463 | install-only \Option-f |
| 464 | If "`Exists "{prefix}"`" == "" |
| 465 | Echo "{prefix}" does not exist, cannot install anything |
| 466 | Exit 1 |
| 467 | End If |
| 468 | If "`Exists "{bindir}"`" == "" |
| 469 | NewFolder "{bindir}" |
| 470 | End If |
| 471 | # Need to copy all the tools |
| 472 | For prog in {PROGS} |
| 473 | Duplicate -y :{prog} "{bindir}"{prog} |
| 474 | End For |
| 475 | |
| 476 | # Use binutils.info as the target so that VPATH will DTRT. |
| 477 | # (Use "$<\Option-x" in case the output is multiple files, though.) |
| 478 | install-info \Option-f binutils.info |
| 479 | for i in $<\Option-x ; do \Option-d |
| 480 | {INSTALL_DATA} $$i {infodir}:$$i ; \Option-d |
| 481 | done |
| 482 | |
| 483 | clean-info \Option-f |
| 484 | Delete -y -rf \Option-x.info\Option-x |
| 485 | |
| 486 | # Making a dist \Option-f |
| 487 | # cvs rtag binutils-x-yy ld+utils |
| 488 | # cvs co -r binutils-x-yy ld+utils |
| 489 | # Sanitize |
| 490 | # cd {HERE}; make dist [-f Makefile.in] |
| 491 | |
| 492 | dist \Option-f {DIST_NAME}.tar.z |
| 493 | |
| 494 | diststuff \Option-f {DISTSTUFF} |
| 495 | |
| 496 | {DIST_NAME}.tar.z \Option-f |
| 497 | cd ::..; rm -f {DIST_NAME}; ln -s devo {DIST_NAME} |
| 498 | make diststuff -f Makefile.in |
| 499 | cd ::ld; make diststuff -f Makefile.in |
| 500 | cd ::gprof; make diststuff -f Makefile.in |
| 501 | cd ::texinfo; mv texinfo.tex ..; rm -rf \Option-x; mv ::texinfo.tex . |
| 502 | # Take out texinfo from configurable dirs |
| 503 | Rename -y ::configure.in tmp; \Option-d |
| 504 | sed -e ':^host_tools=:s:texinfo ::' <tmp >::configure.in; rm tmp |
| 505 | cd ..; chmod og=u `find . -print` |
| 506 | cd ::..; tar chf - {DIST_NAME} | gzip >{DIST_NAME}.tar.z |
| 507 | Delete -y -rf ::::{DIST_NAME} |
| 508 | |
| 509 | #----------------------------------------------------------------------------- |
| 510 | # 'STANDARD' GNU:960 TARGETS BELOW THIS POINT |
| 511 | # |
| 512 | # 'VERSION' file must be present and contain a string of the form "{s}""x.y" |
| 513 | #----------------------------------------------------------------------------- |
| 514 | |
| 515 | ver960.c \Option-f FORCE |
| 516 | Delete -y "{s}"ver960.c |
| 517 | echo "char {TARG}_ver[]= \"{TARG} `cat VERSION`, `date`\";" > "{s}"ver960.c |
| 518 | |
| 519 | |
| 520 | # Dummy target to force execution of dependent targets. |
| 521 | # |
| 522 | force \Option-f |
| 523 | |
| 524 | # Target to uncomment host-specific lines in this makefile. Such lines must |
| 525 | # have the following string beginning in column 1 \Option-f #__<hostname>__# |
| 526 | # Original Makefile is backed up as "{o}"'Makefile.c.old'. |
| 527 | # |
| 528 | # Invoke with \Option-f make make HOST=xxx |
| 529 | # |
| 530 | make \Option-f |
| 531 | @if test {HOST}x = x ; then \Option-d |
| 532 | echo '\aSpecify "make make HOST=???"'; \Option-d |
| 533 | exit 1; \Option-d |
| 534 | fi ; \Option-d |
| 535 | grep -s "^#The next line was generated by 'make make'" Makefile; \Option-d |
| 536 | if test $$? = 0 ; then \Option-d |
| 537 | echo "\aMakefile has already been processed with 'make make'";\Option-d |
| 538 | exit 1; \Option-d |
| 539 | fi ; \Option-d |
| 540 | Rename -y Makefile "{o}"Makefile.c.old; \Option-d |
| 541 | echo "#The next line was generated by 'make make'" >Makefile ; \Option-d |
| 542 | echo "HOST={HOST}" >>Makefile ; \Option-d |
| 543 | echo >>Makefile ; \Option-d |
| 544 | sed "s:^#__{HOST}__#::" < "{o}"Makefile.c.old >>Makefile |
| 545 | |
| 546 | Makefile \Option-f "{srcdir}"Makefile.in {host_makefile_frag} {target_makefile_frag} |
| 547 | {SHELL} :config.status |
| 548 | |
| 549 | ### Local Variables \Option-f \Option-x\Option-x\Option-x |
| 550 | ### mode \Option-f fundamental \Option-x\Option-x\Option-x |
| 551 | ### page-delimiter \Option-f "^#\f" \Option-x\Option-x\Option-x |
| 552 | ### End \Option-f \Option-x\Option-x\Option-x |
| 553 | ### end of file |