This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

make dep


Hello all,
  I'm about to commit this boring set of patches to prevent /usr/include
sneaking in to dependencies again, as it seems to happen from time to
time.

Regards, Alan Modra
-- 
Linuxcare.  Support for the Revolution.

gas/ChangeLog
	* dep-in.sed: Escape literal `.'s on patterns.  Trim off `../'
	first before anything else.  Add bin-bugs.h, emul.h and progress.h
	Sort list of files as for $(OBJS) in Makefile.am.

	* Makefile.am (DEP): grep for leading `/' in DEPA, and fail if we
	find one.  Remake dependencies.
	($(OBJS)): Add bin-bugs.h, emul.h, and progress.h  Sort the list.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.

bfd/ChangeLog
	* Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
	find one.
	* Makefile.in: Regenerate.

gprof/ChangeLog
	* Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
	find one.
	* Makefile.in: Regenerate.

ld/ChangeLog
	* Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
	find one.
	* Makefile.in: Regenerate.

opcodes/ChangeLog
	* Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
	find one.
	* Makefile.in: Regenerate.

Index: gas/Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/Makefile.am,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile.am
--- Makefile.am	2000/06/22 03:35:54	1.26
+++ Makefile.am	2000/06/22 11:39:34
@@ -454,9 +454,10 @@ as_new_DEPENDENCIES = $(TARG_CPU_O) $(OB
 
 # Stuff that every object file depends upon.  If anything is removed
 # from this list, remove it from dep-in.sed as well.
-$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \
-	expr.h write.h frags.h hash.h read.h symbols.h tc.h \
-	obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h asintl.h
+$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
+	$(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \
+	as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \
+	frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h
 
 gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
 gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS)
@@ -744,7 +745,11 @@ DEP: dep.sed $(DEP_FILE_DEPS) DEPTC DEPO
 	echo '$$(TARG_CPU_O): $$(DEPTC_@target''_cpu_type@_@obj''_format@)' >> DEPA
 	echo '$$(OBJ_FORMAT_O): $$(DEPOBJ_@target''_cpu_type@_@obj''_format@)' >> DEPA
 	echo '#MKDEP    DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA
-	mv -f DEPA $@
+	if grep ' /' DEPA > /dev/null 2> /dev/null; then \
+	  echo 'make DEP failed!'; exit 1; \
+	else \
+	  mv -f DEPA $@; \
+	fi
 
 DEP1: $(CFILES) $(MULTI_CFILES)
 	if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi

[snipped dependency diffs]

Index: gas/dep-in.sed
===================================================================
RCS file: /cvs/src/src/gas/dep-in.sed,v
retrieving revision 1.2
diff -u -p -r1.2 dep-in.sed
--- dep-in.sed	1999/06/03 09:06:24	1.2
+++ dep-in.sed	2000/06/22 11:39:40
@@ -2,37 +2,41 @@
 /\\$/N
 /\\$/b loop
 
-s! ../config.h!!g
-s! ../../bfd/bfd.h!!g
-s! ../itbl-parse.h!!g
+s! \.\./! !g
 s!@INCDIR@!$(INCDIR)!g
 s!@BFDDIR@!$(BFDDIR)!g
 s!@SRCDIR@/config!$(srcdir)/config!g
-s!@SRCDIR@/../opcodes!$(srcdir)/../opcodes!g
+s!@SRCDIR@/\.\./opcodes!$(srcdir)/../opcodes!g
 s!@SRCDIR@/!!g
-s! config.h!!g
-s! as.h!!g
-s! asintl.h!!g
-s! targ-env.h!!g
-s! obj-format.h!!g
-s! targ-cpu.h!!g
-s! flonum.h!!g
-s! expr.h!!g
-s! write.h!!g
-s! frags.h!!g
-s! hash.h!!g
-s! read.h!!g
-s! symbols.h!!g
-s! tc.h!!g
-s! obj.h!!g
-s! listing.h!!g
-s! bignum.h!!g
-s! bit_fix.h!!g
-s! itbl-cpu.h!!g
-s! \$(srcdir)/config/te-generic.h!!g
-s! \$(INCDIR)/libiberty.h!!g
-s! \$(INCDIR)/ansidecl.h!!g
-s! \$(INCDIR)/fopen-same.h!!g
+s! \$(INCDIR)/ansidecl\.h!!g
+s! \$(INCDIR)/fopen-same\.h!!g
+s! \$(srcdir)/config/te-generic\.h!!g
+s! \.\./bfd/bfd\.h!!g
+s! itbl-cpu\.h!!g
+s! itbl-parse\.h!!g
+
+s! \$(INCDIR)/bin-bugs\.h!!g
+s! \$(INCDIR)/libiberty\.h!!g
+s! \$(INCDIR)/progress\.h!!g
+s! obj-format\.h!!g
+s! targ-cpu\.h!!g
+s! targ-env\.h!!g
+s! as\.h!!g
+s! asintl\.h!!g
+s! bignum\.h!!g
+s! bit_fix\.h!!g
+s! config\.h!!g
+s! emul\.h!!g
+s! expr\.h!!g
+s! flonum\.h!!g
+s! frags\.h!!g
+s! hash\.h!!g
+s! listing\.h!!g
+s! obj\.h!!g
+s! read\.h!!g
+s! symbols\.h!!g
+s! tc\.h!!g
+s! write\.h!!g
 
 s/\\\n */ /g
 
Index: bfd/Makefile.am
===================================================================
RCS file: /cvs/src/src/bfd/Makefile.am,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile.am
--- Makefile.am	2000/06/20 20:40:00	1.34
+++ Makefile.am	2000/06/22 11:38:55
@@ -576,8 +576,12 @@ install-data-local: $(BFD_H)
 DEP: dep.sed $(CFILES) $(HFILES) bfd.h
 	rm -f DEP1
 	$(MAKE) MKDEP="$(MKDEP)" DEP1
-	sed -f dep.sed < DEP1 > $@
-	echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@
+	if grep ' /' DEP1 > /dev/null 2> /dev/null; then \
+	  echo 'make DEP failed!'; exit 1; \
+	else \
+	  sed -f dep.sed < DEP1 > $@; \
+	  echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@; \
+	fi
 
 DEP1: $(CFILES)
 	echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2

[snip other extremely similar Makefile.am diffs]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]