* srconv.c (wr_hd): Set afl field to 4 for bfd_arch_sh.
[deliverable/binutils-gdb.git] / binutils / Makefile.in
index 63735952275204d2038383c2fa7e6989421204f7..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,7 +104,7 @@ 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
@@ -168,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)
@@ -210,7 +240,7 @@ underscore.c: Makefile
        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
 
 cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
@@ -219,10 +249,14 @@ cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
 $(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
@@ -257,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: sysroff.c srconv.o sysroff.c  coffgrok.o $(ADDL_LIBS)
+srconv.o: srconv.c sysroff.h sysroff.c coffgrok.h $(INCDIR)/coff/internal.h \
+  ../bfd/libcoff.h
+
+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)
@@ -458,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
@@ -485,6 +537,7 @@ 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 $(TOOL_PROGS) ; do \
@@ -506,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.025309 seconds and 4 git commands to generate.