This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[RFA] gas `dep' target overhaul
- From: Ben Elliston <bje at redhat dot com>
- To: binutils at sources dot redhat dot com
- Cc: graydon at redhat dot com
- Date: Mon, 29 Apr 2002 16:36:07 -0400 (EDT)
- Subject: [RFA] gas `dep' target overhaul
I am contributing the following patch on behalf of Graydon Hoare, who
developed the patch some time ago. The patch adds adds handling for
dependencies located in the opcodes source directory. Along the way,
it actually makes `make dep' work -- the use of $basedir to eliminate
/../ elements in the path seems to improve the situation. (<Shrug>;
we really should be using Automake's facilities for this in the near
future).
Okay to commit?
Ben
2002-04-29 Graydon Hoare <graydon@redhat.com>
* dep-in.sed: Teach about @OPCODESDIR@ rewrite.
* Makefile.am (dep.sed): Add basedir export, use in place of
srcdir/.. in edit expressions. Replace @OPCODESDIR@.
* Makefile.in: Regenerate.
Index: dep-in.sed
===================================================================
RCS file: /cvs/src/src/gas/dep-in.sed,v
retrieving revision 1.4
diff -u -p -r1.4 dep-in.sed
--- dep-in.sed 4 Apr 2002 14:06:49 -0000 1.4
+++ dep-in.sed 29 Apr 2002 20:30:54 -0000
@@ -4,12 +4,9 @@
s! \.\./! !g
s!@INCDIR@!$(INCDIR)!g
-s!@TOPDIR@/include!$(INCDIR)!g
s!@BFDDIR@!$(BFDDIR)!g
-s!@TOPDIR@/bfd!$(BFDDIR)!g
s!@SRCDIR@/config!$(srcdir)/config!g
-s!@SRCDIR@/\.\./opcodes!$(srcdir)/../opcodes!g
-s!@TOPDIR@/opcodes!$(srcdir)/../opcodes!g
+s!@OPCODESDIR@!$(srcdir)/../opcodes!g
s!@SRCDIR@/!!g
s! \$(INCDIR)/ansidecl\.h!!g
s! \$(INCDIR)/fopen-same\.h!!g
Index: Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/Makefile.am,v
retrieving revision 1.54
diff -u -p -r1.54 Makefile.am
--- Makefile.am 4 Apr 2002 14:06:49 -0000 1.54
+++ Makefile.am 29 Apr 2002 20:30:54 -0000
@@ -920,9 +920,11 @@ DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_
dep.sed: dep-in.sed config.status
srcdir=`cd $(srcdir); pwd`; \
+ basedir=`cd $(BASEDIR); pwd`; \
sed <$(srcdir)/dep-in.sed >dep.sed \
- -e "s!@INCDIR@!$${srcdir}/../include!" \
- -e "s!@BFDDIR@!$${srcdir}/../bfd!" \
+ -e "s!@INCDIR@!$${basedir}/include!" \
+ -e "s!@BFDDIR@!$${basedir}/bfd!" \
+ -e "s!@OPCODESDIR@!$${basedir}/opcodes!" \
-e "s!@SRCDIR@!$${srcdir}!" \
-e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gas,,`'!'