build/install failure with -jN, N > 1, and nonexistent $(prefix)
Jim Meyering
jim@meyering.net
Thu Feb 15 05:37:00 GMT 2001
DJ Delorie <dj@redhat.com> wrote:
| Jim Meyering <jim@meyering.net> writes:
| > gcc/:
| > 2001-01-20 Jim Meyering <meyering@lucent.com>
| >
| > * Makefile.in (install-common): Don't depend on installdirs here.
| > Instead, make each of the lang.install-common targets (e.g.,
| > c++.install-common in cp/Make-lang.in) depend on it.
| > (install-driver): Depend on installdirs.
|
| Looks OK to me, with two caveats:
|
| 1. The changelog patch in the patch (which shouldn't be there) doesn't
| match the changelog entry before the patch. Make sure the right
| one gets checked in.
|
| 2. Please make similar patches for the ch, f, and objc subdirectories.
| cp and java aren't the only languages gcc supports.
Ok.
I've made the change to ch/Make-lang.in.
`f' doesn't need it because the rules that use $(bindir), $(infodir),
$(man?dir), etc. already depend on installdirs.
objc doesn't need it either, because its objc.install-* rules
are all empty. However, it wouldn't hurt to make all of the per-language
install-* rules depend on installdirs, even though they don't yet
need that dependency. At the very least, it'd set a good example.
It'd certainly protect us from the day when someone adds objective C
`man' pages and doesn't know to add the dependency.
BTW, I noticed that java.install-info doesn't depend on gcj.info.
Perhaps it should do something like what's done in cp/Make-lang.in
where c++.install-info depends on `c++.info'
c++.install-info: c++.info installdirs
and c++.info is just this:
c++.info: $(srcdir)/cp/g++int.info
For now, here's the minimal change -- it fixes the build failure
when installing in parallel:
gcc/:
2001-01-20 Jim Meyering <meyering@lucent.com>
* Makefile.in (install-common): Don't depend on installdirs here.
Instead, make each of the lang.install-common targets (e.g.,
c++.install-common in cp/Make-lang.in) depend on it.
(install-driver): Depend on installdirs.
gcc/ch:
2001-02-15 Jim Meyering <meyering@lucent.com>
* Make-lang.in (CHILL.install-common): Depend on `installdirs'.
(CHILL.install-info): Likewise.
gcc/cp:
2001-01-20 Jim Meyering <meyering@lucent.com>
* Make-lang.in (c++.install-common): Depend on installdirs.
(c++.install-info): Likewise
(c++.install-man): Likewise
gcc/java:
2001-01-20 Jim Meyering <meyering@lucent.com>
* Make-lang.in (java.install-common): Depend on `installdirs'.
(java.install-info): Likewise.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.607
diff -u -p -r1.607 Makefile.in
--- Makefile.in 2001/02/14 19:44:51 1.607
+++ Makefile.in 2001/02/15 13:22:42
@@ -2493,7 +2493,7 @@ installdirs:
-if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi
# Install the compiler executables built during cross compilation.
-install-common: native installdirs $(EXTRA_PARTS) lang.install-common
+install-common: native $(EXTRA_PARTS) lang.install-common
for file in $(COMPILERS); do \
if [ -f $$file ] ; then \
rm -f $(libsubdir)/$$file; \
@@ -2552,7 +2552,7 @@ install-common: native installdirs $(EXT
# Install the driver program as $(target_alias)-gcc
# and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
-install-driver: xgcc$(exeext)
+install-driver: installdirs xgcc$(exeext)
-if [ -f gcc-cross$(exeext) ] ; then \
rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
$(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \
Index: ch/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ch/Make-lang.in,v
retrieving revision 1.19
diff -u -p -r1.19 Make-lang.in
--- Make-lang.in 2000/12/08 22:54:06 1.19
+++ Make-lang.in 2001/02/15 13:22:42
@@ -127,7 +127,7 @@ chill.dvi: $(srcdir)/ch/chill.texi $(src
CHILL.install-normal:
# Install the driver program
-CHILL.install-common:
+CHILL.install-common: installdirs
-if [ -f cc1chill$(exeext) ] ; then \
if [ -f chill.install ] ; then \
if [ -f gcc-cross$(exeext) ]; then \
@@ -144,7 +144,7 @@ CHILL.install-common:
# Don't delete $(infodir)/ch.info* unless there's actually new
# docs to install (in case LANGUAGES didn't contain chill earlier).
-CHILL.install-info:
+CHILL.install-info: installdirs
-cd $(srcdir)/ch; for i in chill.info*; do \
rm -f $(infodir)/chill.info*; \
realfile=`echo $$i | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
Index: cp/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/Make-lang.in,v
retrieving revision 1.77
diff -u -p -r1.77 Make-lang.in
--- Make-lang.in 2001/02/11 21:23:42 1.77
+++ Make-lang.in 2001/02/15 13:22:43
@@ -147,7 +147,7 @@ c++.install-normal:
# Install the driver program as $(target)-g++
# and also as either g++ (if native) or $(tooldir)/bin/g++.
-c++.install-common:
+c++.install-common: installdirs
-if [ -f cc1plus$(exeext) ] ; then \
if [ -f g++-cross$(exeext) ] ; then \
rm -f $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
@@ -185,7 +185,7 @@ c++.install-common:
fi ; \
fi
-c++.install-info: c++.info
+c++.install-info: c++.info installdirs
if [ -f cc1plus$(exeext) ] ; then \
if [ -f $(srcdir)/cp/g++int.info ]; then \
rm -f $(infodir)/g++int.info*; \
@@ -202,7 +202,7 @@ c++.install-info: c++.info
else true; fi; \
else true; fi
-c++.install-man: $(srcdir)/cp/g++.1
+c++.install-man: installdirs $(srcdir)/cp/g++.1
-if [ -f cc1plus$(exeext) ] ; then \
if [ -f g++-cross$(exeext) ] ; then \
rm -f $(man1dir)/$(GXX_CROSS_NAME)$(manext); \
Index: java/Make-lang.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/Make-lang.in,v
retrieving revision 1.53
diff -u -p -r1.53 Make-lang.in
--- Make-lang.in 2001/02/15 02:06:29 1.53
+++ Make-lang.in 2001/02/15 13:22:43
@@ -158,7 +158,7 @@ java.dvi: java/gcj.dvi
# Nothing to do here.
java.install-normal:
-java.install-common:
+java.install-common: installdirs
-if [ -f $(GCJ)$(exeext) ]; then \
if [ -f $(GCJ)-cross$(exeext) ]; then \
rm -f $(bindir)/$(JAVA_CROSS_NAME)$(exeext); \
@@ -184,7 +184,7 @@ java.uninstall:
-rm -rf $(bindir)/$(JAVA_INSTALL_NAME)$(exeext)
-rm -rf $(bindir)/$(JAVA_CROSS_NAME)$(exeext)
-java.install-info:
+java.install-info: installdirs
if [ -f jc1$(exeext) ] ; then \
if [ -f $(srcdir)/java/gcj.info ]; then \
rm -f $(infodir)/gcj.info*; \
More information about the Gcc-patches
mailing list