Changeset 89 for trunk/Makefile


Ignore:
Timestamp:
May 5, 2003, 1:56:10 AM (22 years ago)
Author:
bird
Message:

Symlinking attempt / binutils.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    • Property cvs2svn:cvs-rev changed from 1.11 to 1.12
    r88 r89  
    9393                all-preload \
    9494                all-builttools-initial \
     95                all-symlinks \
    9596                \
     97        all-binutils \
    9698                all-gcc \
    97         all-binutils \
    9899        all-emx \
    99100                \
     
    238239
    239240
    240 
     241###############################################################################
     242###############################################################################
     243###############################################################################
     244#
     245#    S y m l i n k s
     246#
     247#
     248#               We use symlinking of binutils stuff into the gcc tree so we can
     249#               build everything in one go and take advantage of the gcc
     250#               makesystem which will use the binutils we built when doing the
     251#               gcc libraries and such.
     252#
     253#               On OS/2 symlinks doesn't exist so, we'll copy the source trees.
     254#               Copy because this will for directories work ok with cvs, moving
     255#               directories would cause 'cvs update -d' to refetch stuff.
     256#
     257#
     258#w##############################################################################
     259###############################################################################
     260###############################################################################
     261all-symlinks:
     262# Don't do this till we've got binutils working.
     263#               all-symlinks-binutils
     264
     265ifeq "$(BUILD_PLATFORM)" "OS2"
     266TOOL_SYMLINK_FILE   = cp
     267TOOL_SYMLINK_DIR    = cp -Rf
     268TOOL_SYMLINK_MKDIR  = mkdir
     269TOOL_UNSYMLINK_DIR  = rm -Rf
     270else
     271TOOL_SYMLINK_FILE   = ln -s
     272TOOL_SYMLINK_DIR    = ln -s
     273TOOL_SYMLINK_MKDIR  = true
     274TOOL_UNSYMLINK_DIR  = rm
     275endif
     276                       
     277SYMLINKS_BINUTILS_TO_GCC_DIRS = \
     278bfd \
     279binutils \
     280etc \
     281gas \
     282gprof \
     283intl \
     284ld \
     285opcodes \
     286texinfo \
     287include/aout \
     288include/coff \
     289include/elf     \
     290include/nlm     \
     291include/opcode \
     292include/regs \
     293
     294SYMLINKS_BINUTILS_TO_GCC_FILES = \
     295include/alloca-conf.h \
     296include/ansidecl.h \
     297include/bfdlink.h \
     298include/bin-bugs.h \
     299include/bout.h \
     300include/callback.h \
     301include/ChangeLog \
     302include/COPYING \
     303include/demangle.h \
     304include/dis-asm.h \
     305include/dyn-string.h \
     306include/filenames.h \
     307include/floatformat.h \
     308include/fnmatch.h \
     309include/fopen-bin.h \
     310include/fopen-same.h \
     311include/fopen-vms.h \
     312include/gdbm.h \
     313include/getopt.h \
     314include/hashtab.h \
     315include/hp-symtab.h \
     316include/ieee.h \
     317include/libiberty.h \
     318include/MAINTAINERS \
     319include/md5.h \
     320include/oasys.h \
     321include/objalloc.h \
     322include/obstack.h \
     323include/os9k.h \
     324include/partition.h \
     325include/progress.h \
     326include/remote-sim.h \
     327include/safe-ctype.h \
     328include/sim-d10v.h \
     329include/sort.h \
     330include/splay-tree.h \
     331include/symcat.h \
     332       
     333# Symlink binutils stuff to gcc.
     334#       Note the test should've been "! -e", but that doesn' work in ash... :/
     335all-symlinks-binutils:
     336        for file in $(SYMLINKS_BINUTILS_TO_GCC_FILES); do \
     337                if [ ! -f "$(PATH_TOP)/src/gcc/$$file" ]; then  \
     338                        $(TOOL_SYMLINK_FILE)  $(PATH_TOP)/src/binutils/$$file $(PATH_TOP)/src/gcc/$$file && \
     339                        touch                 $(PATH_TOP)/src/gcc/$${file}.symlinked ; \
     340                fi ; \
     341        done
     342        for dir in $(SYMLINKS_BINUTILS_TO_GCC_DIRS) ; do \
     343                if [ ! -d "$(PATH_TOP)/src/gcc/$$dir" ] ; then  \
     344                        $(TOOL_SYMLINK_MKDIR) $(PATH_TOP)/src/gcc/$$dir && \
     345                        touch                 $(PATH_TOP)/src/gcc/$${dir}.symlinked && \
     346                        $(TOOL_SYMLINK_DIR)   $(PATH_TOP)/src/binutils/$$dir $(PATH_TOP)/src/gcc/ ; \
     347                fi ; \
     348        done
     349
     350all-symlinks-unlink-binutils:
     351        for file in $(SYMLINKS_BINUTILS_TO_GCC_FILES); do \
     352                if [ -f "$(PATH_TOP)/src/gcc/$${file}.symlinked" ]; then  \
     353                        rm  $(PATH_TOP)/src/gcc/$${file} && \
     354                        rm  $(PATH_TOP)/src/gcc/$${file}.symlinked ; \
     355                fi ; \
     356        done
     357        for dir in $(SYMLINKS_BINUTILS_TO_GCC_DIRS) ; do \
     358                if [ -f "$(PATH_TOP)/src/gcc/$$dir.symlinked" ] ; then  \
     359                        $(TOOL_UNSYMLINK_DIR) $(PATH_TOP)/src/gcc/$${dir} && \
     360                        rm                    $(PATH_TOP)/src/gcc/$${dir}.symlinked ; \
     361                fi ; \
     362        done
     363                                               
    241364
    242365###############################################################################
     
    271394gcc/libjava/libltdl \
    272395gcc/libobjc \
     396\
     397gcc/bfd \
     398gcc/binutils \
     399gcc/gas \
     400gcc/gprof \
     401gcc/intl \
     402gcc/ld \
     403gcc/libiberty \
     404gcc/opcodes \
    273405
    274406GCC_CONFIGURE_DIRS = $(GCC_DIRS)
     
    369501###############################################################################
    370502all-binutils  binutils:
    371         echo "Successfully build BinUtils."
    372         echo "Warning!!! BinUtils not yet done!"
    373 
    374                
    375                
    376 
    377 
     503        echo "Binutils are build together with the other GNU Tools in GCC."
     504        echo "Separate building of binutils is not configured."
     505
     506
     507
     508# Generate diffs for GCC (v3.2.2) - part of packing a release.
     509.PHONY: binutils-diff $(PATH_BIN)/usr/src/binutils/binutils-2.11.2.diff
     510binutils-diff: $(PATH_BIN)/usr/src/binutils/binutils-2.11.2.diff
     511$(PATH_BIN)/usr/src/binutils/binutils-2.11.2.diff:
     512        mkdir -p $(@D)
     513        -cvs diff -R -N -w -c -r BINUTILS_2-11-2 src/binutils > $@
     514       
    378515
    379516###############################################################################
Note: See TracChangeset for help on using the changeset viewer.