X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=mpw-config.in;h=8028737a8b61fce6aef69e25f6ddf949f3380ef2;hb=38985a1cb4890f44601f781654c6d79485634120;hp=57b6b35e7b96a7dda2fc30f6b4e658508334b005;hpb=498d098a30a6f26c02252ffe2b33d2f5daec59d4;p=deliverable%2Fbinutils-gdb.git diff --git a/mpw-config.in b/mpw-config.in index 57b6b35e7b..8028737a8b 100644 --- a/mpw-config.in +++ b/mpw-config.in @@ -1,13 +1,42 @@ # Configuration fragment for Cygnus source tree. -Set host_libs "mmalloc libiberty opcodes bfd readline" +# Check that we can find all the special tools that we will need. +# The test for sed is semi-pointless, because it's already been invoked +# by the calculation of target_cpu in the main configure script, but +# the test will also show which one is being used. -Set host_tools "byacc flex binutils ld gas gcc gdb" +Set Exit 0 +Echo byacc is `Which byacc` +Echo flex is `Which flex` +Echo forward-include is `Which forward-include` +Echo MoveIfChange is `Which MoveIfChange` +Echo mpw-touch is `Which mpw-touch` +Echo mpw-true is `Which mpw-true` +Echo NewFolderRecursive is `Which NewFolderRecursive` +Echo null-command is `Which null-command` +Echo open-brace is `Which open-brace` +Echo sed is `Which sed` +Echo 'tr-7to8' is `Which tr-7to8` +Echo true is `Which true` +Set Exit 1 -Set target_libs "" +Set host_libs "mmalloc libiberty opcodes bfd readline gash tcl tk tclX" -Set target_tools "" +Set host_tools "texinfo byacc flex bison binutils ld gas gcc gdb make patch \Option-d + prms send-pr gprof gdbtest tgas etc expect dejagnu sim bash \Option-d + m4 autoconf ispell grep diff rcs cvs fileutils shellutils time \Option-d + textutils wdiff find emacs emacs19 uudecode hello tar gzip indent \Option-d + recode release sed utils guile perl apache inet gawk" +Set target_libs "newlib" + +Set target_tools "examples" + +# Configure the resource compiler if targeting Macs. +If {target_os} =~ /macos/ || {target_os} =~ /mpw/ + Set host_tools "{host_tools} grez" +End If + Set configdirs "{host_libs} {host_tools} {target_libs} {target_tools}" Export configdirs @@ -17,82 +46,68 @@ If "`Exists "{objdir}"extra-include`" == "" NewFolder "{objdir}"extra-include End If -Set extradir "{objdir}extra-include:" - -Echo '/* Imitation sys/types.h. */' >"{extradir}"'sys/types.h' -Echo '#ifndef __SYS_TYPES_H__' >>"{extradir}"'sys/types.h' -Echo '#define __SYS_TYPES_H__' >>"{extradir}"'sys/types.h' -Echo '#include ' >>"{extradir}"'sys/types.h' -Echo 'typedef short dev_t' >>"{extradir}"'sys/types.h' -Echo 'typedef short ino_t' >>"{extradir}"'sys/types.h' -Echo 'typedef unsigned short mode_t' >>"{extradir}"'sys/types.h' -Echo 'typedef unsigned short uid_t' >>"{extradir}"'sys/types.h' -Echo 'typedef unsigned short gid_t' >>"{extradir}"'sys/types.h' -Echo 'typedef long off_t' >>"{extradir}"'sys/types.h' -Echo '#endif /* __SYS_TYPES_H__ */' >>"{extradir}"'sys/types.h' - -Echo '/* Imitation sys/time.h. */' >"{extradir}"'sys/time.h' -Echo '#ifndef __SYS_TIME_H__' >>"{extradir}"'sys/time.h' -Echo '#define __SYS_TIME_H__' >>"{extradir}"'sys/time.h' -Echo '#include ' >"{extradir}"'sys/time.h' -Echo 'struct timeval {' >>"{extradir}"'sys/time.h' -Echo ' long tv_sec;' >>"{extradir}"'sys/time.h' -Echo ' long tv_usec;' >>"{extradir}"'sys/time.h' -Echo '};' >>"{extradir}"'sys/time.h' -Echo '#endif /* __SYS_TIME_H__ */' >>"{extradir}"'sys/time.h' - -Echo '/* Imitation sys/resource.h. */' >"{extradir}"'sys/resource.h' -Echo '#ifndef __SYS_RESOURCE_H__' >>"{extradir}"'sys/resource.h' -Echo '#define __SYS_RESOURCE_H__' >>"{extradir}"'sys/resource.h' -Echo 'struct rusage {' >"{extradir}"'sys/resource.h' -Echo ' struct timeval ru_utime;' >>"{extradir}"'sys/resource.h' -Echo ' struct timeval ru_stime;' >>"{extradir}"'sys/resource.h' -Echo '};' >>"{extradir}"'sys/resource.h' -Echo '#endif /* __SYS_RESOURCE_H__ */' >>"{extradir}"'sys/resource.h' - -Echo "/* varargs.h. */" >"{extradir}"varargs.h -Echo "#ifndef __va_list__" >>"{extradir}"varargs.h -Echo "#define __va_list__" >>"{extradir}"varargs.h -Echo "typedef char *va_list;" >>"{extradir}"varargs.h -Echo "#endif" >>"{extradir}"varargs.h -Echo "#define va_dcl int va_alist;" >>"{extradir}"varargs.h -Echo "#define va_start(list) list = (char *) &va_alist" >>"{extradir}"varargs.h -Echo "#define va_end(list)" >>"{extradir}"varargs.h -Echo "#define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]" >>"{extradir}"varargs.h - -Echo '/* empty */' >"{extradir}"'sys/param.h' - -Echo '/* empty */' >"{extradir}"'sys/file.h' - -Echo '/* Imitation stat.h */' >"{extradir}"'sys/stat.h' -Echo '#ifndef __SYS_STAT_H__' >>"{extradir}"'sys/stat.h' -Echo '#define __SYS_STAT_H__' >>"{extradir}"'sys/stat.h' -Echo '#include ' >>"{extradir}"'sys/stat.h' -Echo '#include ' >>"{extradir}"'sys/stat.h' -Echo 'struct stat {' >>"{extradir}"'sys/stat.h' -Echo ' dev_t st_dev;' >>"{extradir}"'sys/stat.h' -Echo ' ino_t st_ino;' >>"{extradir}"'sys/stat.h' -Echo ' mode_t st_mode;' >>"{extradir}"'sys/stat.h' -Echo ' short st_nlink;' >>"{extradir}"'sys/stat.h' -Echo ' uid_t st_uid;' >>"{extradir}"'sys/stat.h' -Echo ' gid_t st_gid;' >>"{extradir}"'sys/stat.h' -Echo ' dev_t st_rdev;' >>"{extradir}"'sys/stat.h' -Echo ' off_t st_size;' >>"{extradir}"'sys/stat.h' -Echo ' time_t st_atime;' >>"{extradir}"'sys/stat.h' -Echo ' int st_spare1;' >>"{extradir}"'sys/stat.h' -Echo ' time_t st_mtime;' >>"{extradir}"'sys/stat.h' -Echo ' int st_spare2;' >>"{extradir}"'sys/stat.h' -Echo ' time_t st_ctime;' >>"{extradir}"'sys/stat.h' -Echo ' int st_spare3;' >>"{extradir}"'sys/stat.h' -Echo ' long st_blksize;' >>"{extradir}"'sys/stat.h' -Echo ' long st_blocks;' >>"{extradir}"'sys/stat.h' -Echo ' long st_spare4[2];' >>"{extradir}"'sys/stat.h' -Echo '};' >>"{extradir}"'sys/stat.h' -Echo '#define S_IFDIR 0x0010' >>"{extradir}"'sys/stat.h' -Echo '#define S_IFMT 0x0020' >>"{extradir}"'sys/stat.h' -Echo '#define S_IREAD 0x0040' >>"{extradir}"'sys/stat.h' -Echo '#define S_IWRITE 0x0080' >>"{extradir}"'sys/stat.h' -Echo '#define S_IEXEC 0x0100' >>"{extradir}"'sys/stat.h' -Echo 'int stat (char *path, struct stat *buf);' >>"{extradir}"'sys/stat.h' -Echo 'int fstat(int, struct stat *);' >>"{extradir}"'sys/stat.h' -Echo '#endif /* __SYS_STAT_H___ */' >>"{extradir}"'sys/stat.h' +Set edir "{objdir}extra-include:" + +forward-include "{srcdir}"include:mpw:sys:file.h "{edir}"'sys/file.h' +forward-include "{srcdir}"include:mpw:sys:ioctl.h "{edir}"'sys/ioctl.h' +forward-include "{srcdir}"include:mpw:sys:param.h "{edir}"'sys/param.h' +forward-include "{srcdir}"include:mpw:sys:resource.h "{edir}"'sys/resource.h' +forward-include "{srcdir}"include:mpw:sys:stat.h "{edir}"'sys/stat.h' +forward-include "{srcdir}"include:mpw:sys:time.h "{edir}"'sys/time.h' +forward-include "{srcdir}"include:mpw:sys:types.h "{edir}"'sys/types.h' + +forward-include "{srcroot}"include:aout:aout64.h "{edir}"'aout/aout64.h' +forward-include "{srcroot}"include:aout:ar.h "{edir}"'aout/ar.h' +forward-include "{srcroot}"include:aout:ranlib.h "{edir}"'aout/ranlib.h' +forward-include "{srcroot}"include:aout:reloc.h "{edir}"'aout/reloc.h' +forward-include "{srcroot}"include:aout:stab.def "{edir}"'aout/stab.def' +forward-include "{srcroot}"include:aout:stab_gnu.h "{edir}"'aout/stab_gnu.h' + +If "`Exists "{srcroot}"include:aout:"{target_cpu}".h`" != "" + forward-include "{srcroot}"include:aout:"{target_cpu}".h "{edir}"'aout/'"{target_cpu}"'.h' +End If + +forward-include "{srcroot}"include:coff:ecoff.h "{edir}"'coff/ecoff.h' +forward-include "{srcroot}"include:coff:internal.h "{edir}"'coff/internal.h' +forward-include "{srcroot}"include:coff:sym.h "{edir}"'coff/sym.h' +forward-include "{srcroot}"include:coff:symconst.h "{edir}"'coff/symconst.h' + +If "`Exists "{srcroot}"include:coff:"{target_cpu}".h`" != "" + forward-include "{srcroot}"include:coff:"{target_cpu}".h "{edir}"'coff/'"{target_cpu}"'.h' +End If +If "{target_cpu}" =~ /powerpc/ + forward-include "{srcroot}"include:coff:rs6000.h "{edir}"'coff/rs6000.h' +End If + +forward-include "{srcroot}"include:elf:common.h "{edir}"'elf/common.h' +forward-include "{srcroot}"include:elf:dwarf.h "{edir}"'elf/dwarf.h' +forward-include "{srcroot}"include:elf:dwarf2.h "{edir}"'elf/dwarf2.h' +forward-include "{srcroot}"include:elf:external.h "{edir}"'elf/external.h' +forward-include "{srcroot}"include:elf:internal.h "{edir}"'elf/internal.h' + +# Believe it or not, GDB needs this for all targets. +forward-include "{srcroot}"include:elf:mips.h "{edir}"'elf/mips.h' + +If "`Exists "{srcroot}"include:elf:"{target_cpu}".h`" != "" + forward-include "{srcroot}"include:elf:"{target_cpu}".h "{edir}"'elf/'"{target_cpu}"'.h' +End If +If "{target_cpu}" =~ /powerpc/ + forward-include "{srcroot}"include:elf:ppc.h "{edir}"'elf/ppc.h' +End If + +If "`Exists "{srcroot}"include:opcode:"{target_cpu}".h`" != "" + forward-include "{srcroot}"include:opcode:"{target_cpu}".h "{edir}"'opcode/'"{target_cpu}"'.h' +End If +If "{target_cpu}" =~ /powerpc/ + forward-include "{srcroot}"include:opcode:ppc.h "{edir}"'opcode/ppc.h' +End If + +# Add some bfd includes that get mentioned outside the bfd dir. + +forward-include "{srcroot}"bfd:libcoff.h "{edir}"'bfd/libcoff.h' +forward-include "{srcroot}"bfd:libecoff.h "{edir}"'bfd/libecoff.h' + +# Translate random files into MPW-only character set. + +tr-7to8 "{srcdir}"mpw-README > "{objdir}Read Me for MPW" +tr-7to8 "{srcdir}"mpw-install > "{objdir}"Install