This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[Patch] Makefile.am/Makefile.in, bfdver.h
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: binutils at sources dot redhat dot com, bje at gnu dot org, dan at debian dot org
- Date: Thu, 27 May 2004 16:29:47 -0400 (EDT)
- Subject: [Patch] Makefile.am/Makefile.in, bfdver.h
Here's a patch for the new bfdver.h make-rules. It's pretty close to
obvious.
The variable $< is not specified for ordinary rules, so we have to use
an explicit filename rather than $< . I noticed this when my gdb build
broke on native hppa2.0w-hp-hpux11.11 with hpux make. For reference,
here's the specification:
http://www.opengroup.org/onlinepubs/009695399/utilities/make.html
There are two other problems with Makefile.am/Makefile.in. I'm
not touching these problems at this time.
The first problem is that Makefile.am has no copyright notice.
The second problem is that somehow I can't rebuild the exact same
Makefile.in from Makefile.am with automake 1.4-p5, the automake version
indicated at the top of Makefile.in. There's a difference in the
handling of backslash-continuation lines. Check the differences between
cvs versions 1.147 and 1.148 of Makefile.in! I cheated this by tweaking
my copy of automake 1.4-p5 until it produces the exact same Makefile.in
given the same Makefile.am source.
Testing: I tested this on native i686-pc-linux-gnu and native
hppa2.0w-hp-hpux11.11. I built gdb, and I inspected bfdver.h
in the build directory afterwards.
Okay to commit?
Michael C
2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
* Makefile.am (bfdver.h): Use explicit filename, not $< .
* Makefile.in: Regenerate.
Index: Makefile.am
===================================================================
RCS file: /cvs/src/src/bfd/Makefile.am,v
retrieving revision 1.135
diff -c -3 -p -r1.135 Makefile.am
*** Makefile.am 24 May 2004 14:48:15 -0000 1.135
--- Makefile.am 27 May 2004 17:35:45 -0000
*************** DISTCLEANFILES = $(BUILD_CFILES) $(BUILD
*** 869,883 ****
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
$(SHELL) ./config.status --recheck
! bfdver.h: version.h Makefile.in
@echo "creating $@"
@bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
bfd_version_string="\"$(VERSION)\"" ;\
if test "x$(RELEASE)" = x ; then \
! bfd_version_date=`sed -n -e 's/.*DATE //p' < $<` ;\
bfd_version_string="\"$(VERSION) $${bfd_version_date}\"" ;\
fi ;\
! sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $< > $@
# What appears below is generated by a hacked mkdep using gcc -MM.
--- 869,883 ----
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
$(SHELL) ./config.status --recheck
! bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
@echo "creating $@"
@bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
bfd_version_string="\"$(VERSION)\"" ;\
if test "x$(RELEASE)" = x ; then \
! bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
bfd_version_string="\"$(VERSION) $${bfd_version_date}\"" ;\
fi ;\
! sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $(srcdir)/version.h > $@
# What appears below is generated by a hacked mkdep using gcc -MM.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/bfd/Makefile.in,v
retrieving revision 1.148
diff -c -3 -p -r1.148 Makefile.in
*** Makefile.in 24 May 2004 14:48:15 -0000 1.148
--- Makefile.in 27 May 2004 17:35:46 -0000
*************** stmp-lcoff-h: $(LIBCOFF_H_FILES)
*** 1402,1416 ****
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
$(SHELL) ./config.status --recheck
! bfdver.h: version.h Makefile.in
@echo "creating $@"
@bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
bfd_version_string="\"$(VERSION)\"" ;\
if test "x$(RELEASE)" = x ; then \
! bfd_version_date=`sed -n -e 's/.*DATE //p' < $<` ;\
bfd_version_string="\"$(VERSION) $${bfd_version_date}\"" ;\
fi ;\
! sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $< > $@
# What appears below is generated by a hacked mkdep using gcc -MM.
--- 1402,1416 ----
config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
$(SHELL) ./config.status --recheck
! bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
@echo "creating $@"
@bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
bfd_version_string="\"$(VERSION)\"" ;\
if test "x$(RELEASE)" = x ; then \
! bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
bfd_version_string="\"$(VERSION) $${bfd_version_date}\"" ;\
fi ;\
! sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $(srcdir)/version.h > $@
# What appears below is generated by a hacked mkdep using gcc -MM.