* MAINTAINERS: Add self as CRIS port maintainer.
[deliverable/binutils-gdb.git] / Makefile.in
index 9eae8e65edcc45e11b072b529ef70ffed0e3d461..f1acbd07f5c8e3099fdeed489baf66b9f536d710 100644 (file)
@@ -111,6 +111,7 @@ NM = nm
 LD = ld
 
 BZIPPROG = bzip2
+MD5PROG = md5sum
 
 # These values are substituted by configure.
 DEFAULT_YACC = yacc
@@ -215,14 +216,14 @@ CC_FOR_TARGET = ` \
     if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
       case "$(target_canonical)" in \
         i[3456]86-*-cygwin*) \
-          echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
+          echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/winsup/cygwin/include -idirafter $$s/winsup/w32api/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
           ;; \
         *) \
           echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
          ;; \
       esac \
     else \
-      echo $$r/gcc/xgcc -B$$r/gcc/; \
+      echo $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -isystem $(build_tooldir)/include; \
     fi; \
   else \
     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
@@ -236,7 +237,7 @@ CC_FOR_TARGET = ` \
 # variable is passed down to the gcc Makefile, where it is used to
 # build libgcc2.a.  We define it here so that it can itself be
 # overridden on the command line.
-GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
+GCC_FOR_TARGET = $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -I$(build_tooldir)/include
 
 CHILL_FOR_TARGET = ` \
   if [ -f $$r/gcc/xgcc ] ; then \
@@ -254,14 +255,14 @@ CXX_FOR_TARGET = ` \
     if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
       case "$(target_canonical)" in \
         i[3456]86-*-cygwin*) \
-          echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
+          echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/cygwin/include -idirafter $$s/winsup/w32api/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \
           ;; \
         *) \
           echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
          ;; \
       esac \
     else \
-      echo $$r/gcc/xgcc -B$$r/gcc/; \
+      echo $$r/gcc/g++ -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -I$(build_tooldir)/include; \
     fi; \
   else \
     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
@@ -1414,17 +1415,6 @@ $(INSTALL_X11_MODULES): installdirs
 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
 .PHONY: all-gcc
 all-gcc:
-       # When configured with --enable-shared, libtool creates a
-       # script in the build directory which automatically relinks
-       # the program to search for shared libraries in the build
-       # directory.  However, when ld/ld-new is called the first time
-       # from the new gcc, all the compiler environment variables are
-       # set to use the new gcc. ld/ld-new will use the new gcc to
-       # relink the new linker. It is incorrect. We cannot run
-       # ld/ld-new the first time from the new gcc. It is a very
-       # special case. We deal with it here.
-       -if test -f gcc/Makefile -a -x ld/ld-new -a -x ld/.libs/ld-new; then \
-         ld/ld-new -v >/dev/null 2>&1; fi
        @if [ -f ./gcc/Makefile ] ; then \
          r=`pwd`; export r; \
          s=`cd $(srcdir); pwd`; export s; \
@@ -1639,7 +1629,7 @@ all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap
 configure-target-winsup: configure-target-newlib
 all-uudecode: all-libiberty
 all-zip:
-configure-target-libiberty: $(ALL_GCC)
+configure-target-libiberty: $(ALL_GCC) configure-target-newlib
 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
 all-target: $(ALL_TARGET_MODULES)
 install-target: $(INSTALL_TARGET_MODULES)
@@ -1701,9 +1691,52 @@ ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
 # this macro.
 SUPPORT_FILES = list-of-support-files-for-tool-in-question
 
-.PHONY: taz
+# NOTE: No double quotes in the below.  It is used within shell script
+# as VER="$(VER)"
+VER = `        if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
+         sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
+       else \
+         sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
+       fi`
+PACKAGE = $(TOOL)
 
+.PHONY: taz
 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+       $(MAKE) -f Makefile.in do-proto-toplev \
+               TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+               MD5PROG="$(MD5PROG)" \
+               SUPPORT_FILES="$(SUPPORT_FILES)"
+       $(MAKE) -f Makefile.in do-md5sum \
+               TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+               MD5PROG="$(MD5PROG)" \
+               SUPPORT_FILES="$(SUPPORT_FILES)"
+       $(MAKE) -f Makefile.in do-tar-bz2 \
+               TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+               MD5PROG="$(MD5PROG)" \
+               SUPPORT_FILES="$(SUPPORT_FILES)"
+
+.PHONY: gdb-taz
+gdb-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+       $(MAKE) -f Makefile.in do-proto-toplev \
+               TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+               MD5PROG="$(MD5PROG)" \
+               SUPPORT_FILES="$(SUPPORT_FILES)"
+       $(MAKE) -f Makefile.in do-md5sum \
+               TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+               MD5PROG="$(MD5PROG)" \
+               SUPPORT_FILES="$(SUPPORT_FILES)"
+       $(MAKE) -f Makefile.in do-djunpack \
+               TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+               MD5PROG="$(MD5PROG)" \
+               SUPPORT_FILES="$(SUPPORT_FILES)"
+       $(MAKE) -f Makefile.in do-tar-bz2 \
+               TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
+               MD5PROG="$(MD5PROG)" \
+               SUPPORT_FILES="$(SUPPORT_FILES)"
+
+.PHONY: do-proto-toplev
+do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
+       echo "==> Making $(PACKAGE)-$(VER)/"
        # Take out texinfo from a few places.
        sed -e '/^all\.normal: /s/\all-texinfo //' \
            -e '/^      install-texinfo /d' \
@@ -1753,25 +1786,35 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
          ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
        else true; fi
        chmod -R og=u . || chmod og=u `find . -print`
-       if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
-         ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
-       else \
-         ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
-       fi; \
-       if test x"$(PACKAGE)" = x; then \
-         package="$(TOOL)"; \
-       else \
-         package="$(PACKAGE)"; \
-       fi; \
-       $(MAKE) -f Makefile.in do-tar-bz2 TOOL=$(TOOL) VER=$$ver PACKAGE=$$package
+       #
+       -rm -f $(PACKAGE)-$(VER)
+       ln -s proto-toplev $(PACKAGE)-$(VER)
 
+.PHONY: do-tar-bz2
 do-tar-bz2:
        echo "==> Making $(PACKAGE)-$(VER).tar.bz2"
-       -rm -f $(PACKAGE)-$(VER)
-       ln -s proto-toplev $(PACKAGE)-$(VER)
-       tar cfh $(PACKAGE)-$(VER).tar $(PACKAGE)-$(VER)
+       -rm -f $(PACKAGE)-$(VER).tar.bz2
+       find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \
+               | tar cTfh - $(PACKAGE)-$(VER).tar
        $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar
 
+.PHONY: do-md5sum
+do-md5sum:
+       echo "==> Adding md5 checksum to top-level directory"
+       cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \
+               | xargs $(MD5PROG) > ../md5.sum
+       mv md5.sum proto-toplev
+
+.PHONY: do-djunpack
+do-djunpack:
+       echo "==> Adding updated djunpack.bat to top-level directory"
+       echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/'
+       sed < djunpack.bat > djunpack.new \
+               -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/'
+       mv djunpack.new djunpack.bat
+       -rm -f proto-toplev/djunpack.bat
+       ln -s ../djunpack.bat proto-toplev/djunpack.bat
+
 TEXINFO_SUPPORT= texinfo/texinfo.tex
 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
 
@@ -1779,6 +1822,7 @@ DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
 GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep
 gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
        $(MAKE) -f Makefile.in taz TOOL=gas \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
 
 # The FSF "binutils" release includes gprof and ld.
@@ -1786,53 +1830,62 @@ gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep
 binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
        $(MAKE) -f Makefile.in taz TOOL=binutils \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)"
 
 .PHONY: gas+binutils.tar.bz2
 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
 gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
        $(MAKE) -f Makefile.in taz TOOL=gas \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
 
 .PHONY: libg++.tar.bz2
 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
 libg++.tar.bz2: $(DIST_SUPPORT) libg++
        $(MAKE) -f Makefile.in taz TOOL=libg++ \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
 
 GNATS_SUPPORT_DIRS=include libiberty send-pr
 gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
        $(MAKE) -f  Makefile.in taz TOOL=gnats \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
 
 .PHONY: gdb.tar.bz2
 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl
 gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
-       $(MAKE) -f Makefile.in taz TOOL=gdb \
+       $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
 
 .PHONY: dejagnu.tar.bz2
 DEJAGNU_SUPPORT_DIRS=  tcl expect libiberty
 dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu
        $(MAKE) -f Makefile.in taz TOOL=dejagnu \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)"
 
 .PHONY: gdb+dejagnu.tar.bz2
 GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu
 gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb
-       $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=gdb+dejagnu \
+       $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)"
 
 .PHONY: insight.tar.bz2
 INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui
 insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
-       $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=insight \
+       $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
 
 .PHONY: insight+dejagnu.tar.bz2
 INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu
 insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb
-       $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE="insight+dejagnu" \
+       $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)"
 
 .PHONY: newlib.tar.bz2
@@ -1850,6 +1903,7 @@ NEWLIB_SUPPORT_DIRS=libgloss
 # supports newlib (if only minimally).
 newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
        $(MAKE) -f Makefile.in taz TOOL=newlib \
+               MD5PROG="$(MD5PROG)" \
                SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
                DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
 
This page took 0.055645 seconds and 4 git commands to generate.