* srconv.c (wr_hd): Set afl field to 4 for bfd_arch_sh.
[deliverable/binutils-gdb.git] / binutils / Makefile.in
index 56e844d3cffb1714b5e4d2398473895397997ae4..d3ec002866b759ff9fac58ed783cbafca8dc121b 100644 (file)
@@ -70,7 +70,7 @@ LEX_OPTIONS = -I -Cem
 LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
 
 # Distribution version
-VERSION=cygnus-2.4.1
+VERSION=cygnus-2.5
 # Distribution name
 DIST_NAME=binutils-${VERSION}
 
@@ -104,13 +104,16 @@ NLMCONV_PROG=nlmconv
 
 SRCONV_PROG=srconv sysdump coffdump 
 
-MANPAGES= ar nm objdump ranlib size strings strip $(DEMANGLER_PROG) objcopy nlmconv
+MANPAGES= ar nm objdump ranlib size strings strip objcopy nlmconv
 
 PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) $(BUILD_NLMCONV) $(BUILD_SRCONV) $(SYSINFO_PROG) 
 STAGESTUFF = $(PROGS) *.o
 # Files that can be generated, but should be in the distribution.
 DISTSTUFF=arparse.c arlex.c nlmheader.c sysinfo.c syslex.c info
 
+# Stuff that goes in tooldir/ if appropriate
+TOOL_PROGS = nm.new strip.new ar ranlib
+
 BASEDIR = $(srcdir)/..
 BFDDIR = $(BASEDIR)/bfd
 INCDIR = $(BASEDIR)/include
@@ -165,16 +168,46 @@ FLAGS_TO_PASS = \
 
 all: $(ADDL_LIBS) $(PROGS)
 
-testsuite:
-       if [ -f testsuite/Makefile.in ]; then \
-               (rootme=`pwd`/ ; export rootme ; \
-                rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
-                cd testsuite; $(MAKE) FLAGS_TO_PASS=$(FLAGS_TO_PASS)); \
-       else true ; fi
-
-check: force
-       rootme=`pwd`; export rootme; cd testsuite ; \
-       $(MAKE) check $(FLAGS_TO_PASS)
+# These targets are for the dejagnu testsuites. The file site.exp 
+# contains global variables that all the testsuites will use.
+
+site.exp: ./config.status Makefile
+       @echo "Making a new config file..."
+       @rm -f ./tmp?
+       @touch site.exp
+       @mv site.exp site.bak
+       @echo "## variables are automatically generated by make ##" > ./tmp0
+       @echo "# Do not edit here. If you wish to override these" >> ./tmp0
+       @echo "# values, add them to the last section" >> ./tmp0
+       @echo "# HOST AND TARGET INFO" >> ./tmp0
+       @echo "set host_os $(host_os)" >> ./tmp0
+       @echo "set host_alias $(host_alias)" >> ./tmp0
+       @echo "set host_cpu $(host_cpu)" >> ./tmp0
+       @echo "set host_vendor $(host_vendor)" >> ./tmp0
+       @echo "set target_os $(target_os)" >> ./tmp0
+       @echo "set target_alias $(target_alias)" >> ./tmp0
+       @echo "set target_cpu $(target_cpu)" >> ./tmp0
+       @echo "set target_vendor $(target_vendor)" >> ./tmp0
+       @echo "set host_triplet $(host_canonical)" >> ./tmp0
+       @echo "set target_triplet $(target_canonical)" >> ./tmp0
+       @echo "# DIRECTORY INFO" >> ./tmp0
+       @echo "set objdir `pwd`" >> ./tmp0
+       @echo "" >> ./tmp0      
+       @echo "## Variables generated by configure. Do Not Edit ##" >> ./tmp0
+       @cat ./tmp0 > site.exp
+       @cat site.bak | sed \
+                       -e '1,/^## Variables generated by.*##/ d' >> site.exp
+       -@rm -f ./tmp?
+
+check: site.exp
+       r=`pwd`; export r; \
+       srcroot=`cd ${srcdir}; pwd` ; export srcroot ; \
+       EXPECT=${EXPECT} ; export EXPECT ; \
+       if [ -f $$r/../expect/expect ] ; then  \
+          TCL_LIBRARY=$${srcroot}/../tcl/library ; \
+          export TCL_LIBRARY ; else true; fi ; \
+       $(RUNTEST) --tool binutils --srcdir $(srcdir)/testsuite \
+         $(RUNTESTFLAGS)
 
 installcheck:
        /bin/sh $(srcdir)/sanity.sh $(bindir)
@@ -195,42 +228,35 @@ $(STRINGS_PROG): $(ADDL_LIBS) strings.o $(BFD)
 $(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(BFD)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(ADDL_LIBS) $(EXTRALIBS)
 
-$(NM_PROG): $(ADDL_LIBS) nm.o demangle.o $(BFD)
-       $(CC) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o demangle.o $(ADDL_LIBS) $(EXTRALIBS)
+$(NM_PROG): $(ADDL_LIBS) nm.o $(BFD)
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(EXTRALIBS)
 
 $(OBJDUMP_PROG): $(ADDL_LIBS) objdump.o $(BFD) $(OPCODES)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS)
 
-underscore.c:
-       echo "int xxy_us_dummy;" >dummy.c
-       $(CC) -c dummy.c
+underscore.c: Makefile
        rm -f underscore.c
-       echo '/*WARNING: This file is automatically generated!*/' >underscore.c
-       if [ "`$(NM) dummy.o | grep _xxy_us_dummy ; true`" != "" ]; then \
-         echo "int prepends_underscore = 1;" >>underscore.c; \
-       else \
-         echo "int prepends_underscore = 0;" >>underscore.c; \
-       fi
-       -rm -f dummy.c dummy.o
+       echo '/*WARNING: This file is automatically generated!*/' >underscore.t
+       echo "int prepends_underscore = $(UNDERSCORE);" >>underscore.t
+       mv -f underscore.t underscore.c
 
-version.o: version.c
+version.o: version.c Makefile
        $(CC) $(INCLUDES) $(HDEFINES) $(TDEFINES) -DVERSION='"$(VERSION)"' $(CFLAGS) -c $(srcdir)/version.c
 
-demangle.o: $(BASEDIR)/libiberty/cplus-dem.c
-       $(CC) -c $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c
-       mv cplus-dem.o demangle.o
-
-# For parallel compiling, depend on demangle.o so that one gets done first.
-cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h demangle.o
+cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
        $(CC) -c -DMAIN $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c
 
 $(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o version.o
        $(CC) $(CFLAGS) $(LDFLAGS)  -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o version.o
 
-arparse.h arparse.c: arparse.y
+arparse.c: arparse.y
        $(BISON) $(BISONFLAGS)  $(srcdir)/arparse.y
-       -mv y.tab.c arparse.c
-       -mv y.tab.h arparse.h
+       mv -f y.tab.c arparse.c
+       mv -f y.tab.h arparse.h
+
+# Separate from arparse.c so that a parallel make doesn't try to build
+# both arparse.c and arparse.h simultaneously.
+arparse.h: arparse.c
 
 arlex.c: arlex.l
        $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l
@@ -265,44 +291,67 @@ sysroff.c: sysinfo sysroff.info
        ./sysinfo -c <$(srcdir)/sysroff.info >sysroff.c
        ./sysinfo -i <$(srcdir)/sysroff.info >>sysroff.c
        ./sysinfo -g <$(srcdir)/sysroff.info >>sysroff.c
+
+sysroff.h: sysinfo sysroff.info
        ./sysinfo -d <$(srcdir)/sysroff.info >sysroff.h 
 
-sysinfo.h sysinfo.c: sysinfo.y 
+# Depend upon arparse.c to avoid building both arparse.c and sysinfo.c
+# simultaneously.
+sysinfo.c: sysinfo.y arparse.c
        $(BISON) -tvd $(srcdir)/sysinfo.y
        rm -f sysinfo.c
-       -mv y.tab.c sysinfo.c
-       -mv y.tab.h sysinfo.h
+       mv -f y.tab.c sysinfo.c
+       mv -f y.tab.h sysinfo.h
+
+# Separate from sysinfo.c so that a parallel make doesn't try to build
+# both sysinfo.c and sysinfo.h simultaneously.
+sysinfo.h: sysinfo.c
 
 syslex.c : syslex.l
        $(LEX) $(LEX_OPTIONS) $(srcdir)/syslex.l
        mv lex.yy.c syslex.c
        
-sysinfo: sysinfo.o syslex.o $(ADDL_LIBS)
+sysinfo: sysinfo.o syslex.o
        $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o 
 
 syslex.o: syslex.c sysinfo.h
-       $(CC_FOR_BUILD) -c -I. $(CFLAGS)  syslex.c 
+       if [ -r syslex.c ]; then \
+         $(CC_FOR_BUILD) -c -I. $(CFLAGS)  syslex.c  ; \
+       else \
+         $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/syslex.c ;\
+       fi
 
 sysinfo.o: sysinfo.c
-       $(CC_FOR_BUILD) -c -I. $(CFLAGS)  sysinfo.c 
+       if [ -r sysinfo.c ]; then \
+         $(CC_FOR_BUILD) -c -I. $(CFLAGS)  sysinfo.c  ; \
+       else \
+         $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
+       fi
+
+srconv.o: srconv.c sysroff.h sysroff.c coffgrok.h $(INCDIR)/coff/internal.h \
+  ../bfd/libcoff.h
 
-srconv: sysroff.c srconv.o sysroff.c  coffgrok.o $(ADDL_LIBS)
+srconv: srconv.o coffgrok.o $(ADDL_LIBS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srconv.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
 
 coffdump: coffdump.o coffgrok.o $(ADDL_LIBS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@  coffdump.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
 
-sysdump: sysroff.c sysdump.o $(ADDL_LIBS)
+sysdump.o: sysdump.c sysroff.h sysroff.c
+
+sysdump: sysdump.o $(ADDL_LIBS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ sysdump.o $(ADDL_LIBS) $(EXTRALIBS)
 
-nlmheader.c: nlmheader.y
+# Depend upon sysinfo.c to avoid building both nlmheader.c and sysinfo.c
+# simultaneously.
+nlmheader.c: nlmheader.y sysinfo.c
        $(BISON) $(srcdir)/nlmheader.y
        rm -f nlmheader.c
-       -mv y.tab.c nlmheader.c
+       mv -f y.tab.c nlmheader.c
 
 nlmconv.o: nlmconv.c
        ldname=`t='$(program_transform_name)'; echo ld | sed -e "s/brokensed/brokensed/" $$t`; \
-       $(CC) -c -DLD_NAME="\"$${ldname}\"" $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(srcdir)/nlmconv.c
+       $(CC) -c -DLD_NAME="\"$${ldname}\"" $(INCLUDES) $(HDEFINES) $(TDEFINES) $(NLMCONV_DEFS) $(CFLAGS) $(srcdir)/nlmconv.c
 
 $(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS)
@@ -466,15 +515,10 @@ binutils.me: $(srcdir)/binutils.texi
 
 mostlyclean:
        -rm -f *.o *~ \#* core binutils.?? binutils.???
+       -rm -rf tmpdir
 clean: mostlyclean
-       @if [ -d testsuite ] ; then \
-         cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) clean ; \
-       else true; fi
        -rm -f $(PROGS) underscore.c
 distclean:
-       @if [ -d testsuite ] ; then \
-         cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) distclean ; \
-       else true; fi
        -rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
                binutils.?? binutils.??s binutils.aux binutils.log binutils.toc
        -rm -f $(PROGS) underscore.c
@@ -493,9 +537,10 @@ install: all $(DEMANGLER_PROG).1
        for i in $(MANPAGES) ; do \
          $(INSTALL_XFORM1) $(srcdir)/$$i.1 $(man1dir)/$$i.1 ; \
        done
+       $(INSTALL_XFORM1) $(DEMANGLER_PROG).1 $(man1dir)/$(DEMANGLER_PROG).1
        -if [ -d $(tooldir) ]; then \
          if [ -d $(tooldir)/bin ]; then true; else mkdir $(tooldir)/bin; fi; \
-         for i in nm.new strip.new ar ranlib; do \
+         for i in $(TOOL_PROGS) ; do \
            j=`echo $$i | sed -e 's/.new//'`; \
            rm -f $(tooldir)/bin/$$j; \
            k=`t='$(program_transform_name)'; echo $$j | sed -e s/x/x/ $$t`; \
@@ -514,7 +559,7 @@ install-info: binutils.info
          dir=$(srcdir) ; \
        fi ; \
        for i in `cd $$dir; echo binutils.info*` ; do \
-               $(INSTALL_DATA) $$i $(infodir)/$$i ; \
+               $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
        done
 
 clean-info:
This page took 0.025842 seconds and 4 git commands to generate.