Bug 14893 - [4.0 Regression] 3.4.0-20040406, 'make install' fails on doc/gcjh.1
: [4.0 Regression] 3.4.0-20040406, 'make install' fails on doc/gcjh.1
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: bootstrap
: 3.4.0
: P1 critical
: 4.0.0
Assigned To: Not yet assigned to anyone
:
: build, patch
:
:
  Show dependency treegraph
 
Reported: 2004-04-08 17:58 UTC by Michael Elizabeth Chastain
Modified: 2004-09-13 14:15 UTC (History)
5 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2004-04-12 10:41:18


Attachments
log of 'configure ...' command (1.48 KB, text/plain)
2004-04-08 18:00 UTC, Michael Elizabeth Chastain
Details
log of 'make bootstrap' (bz2) (143.11 KB, text/plain)
2004-04-08 18:06 UTC, Michael Elizabeth Chastain
Details
log of 'make bootstrap' (bz2) (143.11 KB, application/octet-stream)
2004-04-08 18:07 UTC, Michael Elizabeth Chastain
Details
log of 'make install' (40.15 KB, text/plain)
2004-04-08 18:07 UTC, Michael Elizabeth Chastain
Details
Copy Java man pages from $(srcdir), not cwd (502 bytes, patch)
2004-04-08 19:58 UTC, Paul Jarc
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Elizabeth Chastain 2004-04-08 17:58:52 UTC
gcc 3.4.0-20040406 fails during 'make install'.
I'm building on native i686-pc-linux-gnu, red hat linux 8.
I'm using gcc 3.3.2 to build gcc 3.4.0-20040406.
Building gcc gcc-3_4-branch has been working fine for months.

Here is my configuration line:

  cd /berman/migchain/build/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14
  /berman/migchain/source/gcc-3.4.0-20040406/configure
--prefix=/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14
--disable-shared --with-gnu-as
--with-as=/berman/migchain/install/target/native/binutils-2.14/bin/as
--with-gnu-ld --with-ld=/berman/migchain/install/target/native/binutils-2.14/bin/ld

Followed by:

  make bootstrap
  make install

Here is the tail end of install.log:

rm -f
/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/gcj.1
/usr/bin/install -c -m 644
/berman/migchain/source/gcc-3.4.0-20040406/gcc/doc/gcj.1
/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/gcj.1
chmod a-x
/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/gcj.1
for tool in gcjh jv-scan jcf-dump \
        gij jv-convert rmic rmiregistry ; do \
  tool_transformed_name=`echo $tool|sed 's,y,y,'`; \
 
man_name=/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/${tool_transformed_name}.1;
\
  rm -f $man_name ; \
  /usr/bin/install -c -m 644 doc/${tool}.1 $man_name; \
  chmod a-x $man_name ; \
done
/usr/bin/install: cannot stat `doc/gcjh.1': No such file or directory
chmod: failed to get attributes of
`/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/gcjh.1':
No such file or directory
usr/bin/install: cannot stat `doc/jv-scan.1': No such file or directory
chmod: failed to get attributes of
`/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/jv-scan.1':
No such file or directory
/usr/bin/install: cannot stat `doc/jcf-dump.1': No such file or directory
chmod: failed to get attributes of
`/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/jcf-dump.1':
No such file or directory
/usr/bin/install: cannot stat `doc/gij.1': No such file or directory
chmod: failed to get attributes of
`/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/gij.1':
No such file or directory
/usr/bin/install: cannot stat `doc/jv-convert.1': No such file or directory
chmod: failed to get attributes of
`/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/jv-convert.1':
No such file or directory
/usr/bin/install: cannot stat `doc/rmic.1': No such file or directory
chmod: failed to get attributes of
`/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/rmic.1':
No such file or directory
/usr/bin/install: cannot stat `doc/rmiregistry.1': No such file or directory
chmod: failed to get attributes of
`/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/rmiregistry.1':
No such file or directory
make[1]: *** [java.install-man] Error 1
make[1]: Leaving directory
`/berman/migchain/build/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/gcc'
make: *** [install-gcc] Error 2

I will attach the complete logs: configure.log, build.log, install.log.
Comment 1 Michael Elizabeth Chastain 2004-04-08 18:00:03 UTC
Created attachment 6055 [details]
log of 'configure ...' command
Comment 2 Michael Elizabeth Chastain 2004-04-08 18:06:16 UTC
Created attachment 6056 [details]
log of 'make bootstrap' (bz2)
Comment 3 Michael Elizabeth Chastain 2004-04-08 18:07:04 UTC
Created attachment 6057 [details]
log of 'make bootstrap' (bz2)
Comment 4 Michael Elizabeth Chastain 2004-04-08 18:07:29 UTC
Created attachment 6058 [details]
log of 'make install'
Comment 5 Paul Jarc 2004-04-08 19:58:05 UTC
Created attachment 6059 [details]
Copy Java man pages from $(srcdir), not cwd

This patch works for me.
Comment 6 Michael Elizabeth Chastain 2004-04-09 18:17:57 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make install' fails on
doc/gcjh.1

This patch looks wrong to me.

I did a bit of digging and will do some more.  The problem is with
java documentation files such as gcjh.1.

In the CVS version, these files are built in the build tree and
then 'make install' installs them from the build tree to the
install tree.  That's why 'make install' works fine for the CVS tree.

  # build.log, gcc gcc-3_4-branch from CVS
  perl
/berman/fsf/_today_/source/gcc/gcc-3_4-branch/gcc/gcc/../contrib/texi2pod.pl -D
gcjh < /berman/fsf/_today_/source/gcc/gcc-3_4-branch/gcc/gcc/java/gcj.texi >
gcjh.pod
  echo timestamp > doc/gcjh.1
  (pod2man --center="GNU" --release="gcc-3.4.0" --section=1 gcjh.pod >
doc/gcjh.1.T$$ && \
    mv -f doc/gcjh.1.T$$ doc/gcjh.1) || \
    (rm -f doc/gcjh.1.T$$ && exit 1)

  # install.log, gcc gcc-3_4-branch from CVS
  for tool in gcjh jv-scan jcf-dump \
      gij jv-convert rmic rmiregistry ; do \
    tool_transformed_name=`echo $tool|sed 's,y,y,'`; \
   
man_name=/berman/fsf/_today_/berman/install/target/native/gcc/gcc-3_4-branch-as-2.14-ld-2.14/man/man1/${tool_transformed_name}.1;
\
    rm -f $man_name ; \
    /usr/bin/install -c -m 644 doc/${tool}.1 $man_name; \
    chmod a-x $man_name ; \
  done

In the tarball version, gcjh.1 is already present in the source tree,
and is not copied into the build tree.

  # build.log, gcc 3.4.0-20040406
  ... pattern not found: gcjh.1

  # install.log, gcc 3.4.0-20040406
  for tool in gcjh jv-scan jcf-dump \
      gij jv-convert rmic rmiregistry ; do \
    tool_transformed_name=`echo $tool|sed 's,y,y,'`; \
   
man_name=/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/${tool_transformed_name}.1;
\
    rm -f $man_name ; \
    /usr/bin/install -c -m 644 doc/${tool}.1 $man_name; \
    chmod a-x $man_name ; \
  done
  /usr/bin/install: cannot stat `doc/gcjh.1': No such file or directory
  chmod: failed to get attributes of
`/berman/migchain/install/target/native/gcc-3.4.0-20040406-as-2.14-ld-2.14/man/man1/gcjh.1':
No such file or directory

Paul's patch changes the /usr/bin/install line from the current
directory to the source directory:

-      $(INSTALL_DATA) doc/$${tool}.1 $$man_name; \
+      $(INSTALL_DATA) $(srcdir)/doc/$${tool}.1 $$man_name; \

I believe this will work for the tarball version such as gcc
3.4.0-20040406, but will fail for the CVS version such as gcc
gcc-3_4-branch.  In the CVS version, these files are not present in
$(srcdir) and are not built there.  So I think that this patch would
work for the tarball, but would break installation for cvs checkouts.

I haven't actually tested this on my system.  I can do that if you
think it will useful.

My next step is to figure out how other files like g++.1, g77.1, and
gcj.1 are getting succesfully processed and then see if copying
that code is feasible for gcc/java/Make-lang.in.

Michael C
Comment 7 prj 2004-04-09 18:32:18 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make
 install' fails on doc/gcjh.1

mec.gnu@mindspring.com (Michael Elizabeth Chastain) wrote:
> I haven't actually tested this on my system.  I can do that if you
> think it will useful.

I'd say don't bother - I haven't tried building a CVS checkout, but
your explanation sounds plausible.

> My next step is to figure out how other files like g++.1, g77.1, and
> gcj.1 are getting succesfully processed and then see if copying
> that code is feasible for gcc/java/Make-lang.in.

g++.1 uses $<, so it gets make's magic VPATH treatment.  The Java man
pages are handled more directly by the shell.  That shell loop would
probably have to be rewritten as a Makefile pattern rule.


paul
Comment 8 Michael Elizabeth Chastain 2004-04-09 19:46:53 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make install' fails on
doc/gcjh.1

Yeah, I think the $< technique is the right approach.
Here's a patch for it.

I haven't tested this yet but I will do that this evening.  I'm mailing
the patch in now so that people can consider the idea.

This is ugly because of the limitations of make.  Also, I could very
easily have done something wrong, so you might want to get Nathanael or
Joe Myers or someone to check it out.  Comments welcomed.

An alternative would be to change the build procedure so that
files like doc/gcjh.1 are always present in the build directory:
either copy them from doc/gcj1.h in the source directory or
compile them from source if the pre-compiled version is not
available.  But that is more invasive so I didn't attempt it.

Michael C

===

2004-04-09  Michael Chastain  <mec.gnu@mindspring.com>

        * Make-lang.in (java.install-man): Use $< for every man page.


Index: java/Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Make-lang.in,v
retrieving revision 1.128.2.5
diff -c -3 -p -r1.128.2.5 Make-lang.in
*** java/Make-lang.in    22 Feb 2004 20:46:00 -0000    1.128.2.5
--- java/Make-lang.in    9 Apr 2004 19:43:22 -0000
*************** GCJ = gcj
*** 51,60 ****
  java: jc1$(exeext) $(GCJ)$(exeext) jvgenmain$(exeext) \
        gcjh$(exeext) jv-scan$(exeext) jcf-dump$(exeext)

- # Define the name of target independent tools to be installed in $(bindir)
- # Names are subject to changes
- JAVA_TARGET_INDEPENDENT_BIN_TOOLS = gcjh jv-scan jcf-dump
- 
  # Tell GNU make to ignore these if they exist.
  .PHONY: java

--- 51,56 ----
*************** java.install-common: installdirs
*** 200,206 ****
            $(LN) $(JAVA_INSTALL_NAME)$(exeext)
$(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \
        fi ; \
      fi ; \
!         for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS); do \
        tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
            if [ -f $$tool$(exeext) ]; then \
          rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
--- 196,202 ----
            $(LN) $(JAVA_INSTALL_NAME)$(exeext)
$(JAVA_TARGET_INSTALL_NAME)$(exeext) ); \
        fi ; \
      fi ; \
!         for tool in gcjh jv-scan jcf-dump; do \
        tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
            if [ -f $$tool$(exeext) ]; then \
          rm -f $(DESTDIR)$(bindir)/$$tool_transformed_name$(exeext); \
*************** rmiregistry.pod: java/gcj.texi
*** 394,411 ****
  # Install the man pages.
  java.install-man: installdirs \
                    $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) \
!           $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS:%=doc/%.1) \
!           doc/gij.1 doc/jv-convert.1 doc/rmic.1 doc/rmiregistry.1
!     for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS) \
!         gij jv-convert rmic rmiregistry ; do \
!       tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
!       man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
!       rm -f $$man_name ; \
!       $(INSTALL_DATA) doc/$${tool}.1 $$man_name; \
!       chmod a-x $$man_name ; \
!     done

! $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext): doc/gcj.1
      -rm -f $@
      -$(INSTALL_DATA) $< $@
      -chmod a-x $@
--- 390,453 ----
  # Install the man pages.
  java.install-man: installdirs \
                    $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) \
!           java.install-man.gcjh \
!           java.install-man.jv-scan \
!           java.install-man.jcf-dump \
!           java.install-man.gij 
!           java.install-man.jv-convert \
!           java.install-man.rmic \
!           java.install-man.rmiregistry

! $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext): doc/gcj.1 installdirs
      -rm -f $@
      -$(INSTALL_DATA) $< $@
      -chmod a-x $@
+ 
+ java.install-man.gcjh: doc/gcjh.1 installdirs
+     tool_transformed_name=`echo gcjh|sed '$(program_transform_name)'`; \
+     man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
+     rm -f $$man_name; \
+     $(INSTALL_DATA) $< $$man_name; \
+     chmod a-x $$man_name
+ 
+ java.install-man.jv-scan: doc/jv-scan.1 installdirs
+     tool_transformed_name=`echo jv-scan|sed '$(program_transform_name)'`; \
+     man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
+     rm -f $$man_name; \
+     $(INSTALL_DATA) $< $$man_name; \
+     chmod a-x $$man_name
+ 
+ java.install-man.jcf-dump: doc/jcf-dump.1 installdirs
+     tool_transformed_name=`echo jcf-dump|sed '$(program_transform_name)'`; \
+     man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
+     rm -f $$man_name; \
+     $(INSTALL_DATA) $< $$man_name; \
+     chmod a-x $$man_name
+ 
+ java.install-man.gij: doc/gij.1 installdirs
+     tool_transformed_name=`echo gij|sed '$(program_transform_name)'`; \
+     man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
+     rm -f $$man_name; \
+     $(INSTALL_DATA) $< $$man_name; \
+     chmod a-x $$man_name
+ 
+ java.install-man.jv-convert: doc/jv-convert.1 installdirs
+     tool_transformed_name=`echo jv-convert|sed '$(program_transform_name)'`;
\
+     man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
+     rm -f $$man_name; \
+     $(INSTALL_DATA) $< $$man_name; \
+     chmod a-x $$man_name
+ 
+ java.install-man.rmic: doc/rmic.1 installdirs
+     tool_transformed_name=`echo rmic|sed '$(program_transform_name)'`; \
+     man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
+     rm -f $$man_name; \
+     $(INSTALL_DATA) $< $$man_name; \
+     chmod a-x $$man_name
+ 
+ java.install-man.rmiregistry: doc/rmiregistry.1 installdirs
+     tool_transformed_name=`echo rmiregistry|sed '$(program_transform_name)'`;
\
+     man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
+     rm -f $$man_name; \
+     $(INSTALL_DATA) $< $$man_name; \
+     chmod a-x $$man_name
Comment 9 prj 2004-04-09 20:32:09 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make
 install' fails on doc/gcjh.1

Comment 10 Michael Elizabeth Chastain 2004-04-09 21:10:05 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make install' fails on
doc/gcjh.1
Comment 11 Michael Elizabeth Chastain 2004-04-10 02:39:21 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make install' fails on
doc/gcjh.1

Your patch works for me, after I deleted the duplicate line for
java.install-man.gij.

I tested on:

  native i686-pc-linux-gnu, gnu make 3.79.1, gcc 3.4.0-20040406
  native i686-pc-linux-gnu, gnu make 3.79.1, gcc 3.4.0-20040406
  native hppa2.0w-hp-hpux11.11, gnu make 3.79.1, gcc 3.4.0-20040406

On hpux11.11, 'make install' got through this part and gcjh.1 showed up
in the right place.  But 'make install' failed a little bit later for an
unrelated reason: doc/grepjar.1 is not in the pre-built tarball, so it
has to be built from source, which requires perl, which I intentionally
don't have in my $PATH on hpux11.11 so that I can find issues like this.
I will file a separate PR for that.

Michael C

--- gcc-3.4.0-20040406/gcc/java/Make-lang.in~    2004-02-22 15:45:38.000000000
-0500
+++ gcc-3.4.0-20040406/gcc/java/Make-lang.in    2004-04-09 16:25:33.000000000
-0400
@@ -393,19 +393,20 @@

 # Install the man pages.
 java.install-man: installdirs \
-                  $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) \
-          $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS:%=doc/%.1) \
-          doc/gij.1 doc/jv-convert.1 doc/rmic.1 doc/rmiregistry.1
-    for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS) \
-        gij jv-convert rmic rmiregistry ; do \
-      tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
-      man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
-      rm -f $$man_name ; \
-      $(INSTALL_DATA) doc/$${tool}.1 $$man_name; \
-      chmod a-x $$man_name ; \
-    done
+          java.install-man.gcj \
+          java.install-man.gcjh \
+          java.install-man.jv-scan \
+          java.install-man.jcf-dump \
+          java.install-man.gij \
+          java.install-man.gij \
+          java.install-man.jv-convert \
+          java.install-man.rmic \
+          java.install-man.rmiregistry

-$(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext): doc/gcj.1
-    -rm -f $@
-    -$(INSTALL_DATA) $< $@
-    -chmod a-x $@
+java.install-man.%: doc/%.1 installdirs
+    tool=`echo $@ | sed 's/^java\.install-man\.//'`; \
+    tool_transformed_name=`echo "$$tool"|sed '$(program_transform_name)'`; \
+    man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
+    rm -f "$$man_name"; \
+    $(INSTALL_DATA) $< "$$man_name"; \
+    chmod a-x "$$man_name"
Comment 12 prj 2004-04-10 02:47:02 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make
 install' fails on doc/gcjh.1

mec.gnu@mindspring.com (Michael Elizabeth Chastain) wrote:
> Your patch works for me, after I deleted the duplicate line for
> java.install-man.gij.

It worked for me even with the duplicate, but of course I agree it
should be removed.  Native i686-pc-linux-gnu, GNU make 3.80, gcc
3.4.0-20040406.


paul
Comment 13 Mark Mitchell 2004-04-11 19:10:20 UTC
Please apply the last patch in this PR to 3.4.0 and the mainline.
Comment 14 Michael Elizabeth Chastain 2004-04-11 20:06:36 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make install' fails on
doc/gcjh.1

Mark Mitchell writes:
> Please apply the last patch in this PR to 3.4.0 and the mainline.

I don't have write access to the gcc cvs repository.
(I do have an FSF assignment on file for gcc, but I mostly work on gdb).
So someone else has to do the actual commit.  Paul maybe?

Michael C
Comment 15 prj 2004-04-12 02:41:19 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make
 install' fails on doc/gcjh.1

I don't have CVS write access either, nor copyright paperwork.  (I've
done papers for Emacs and Guile, but not GCC.)  It looks like my patch
is short enough, though - I hope?


paul
Comment 16 Alexandre Oliva 2004-04-12 10:41:16 UTC
This patch is not correct.  The man page may be generated in both the source
and
the build tree, depending on configure options and on what's in the source
tree.
 In CVS builds, it's going to be created in the build tree by default; in
release tarballs, that have documentation files already generated in the source
tree, they won't be rebuilt, so you get to install them from the source tree.

The correct approach is to test for the file's existence in the build tree and
source tree, in this order, and install only the first hit.  Michael Chastain's
approach gets the right effect, but $< is only portable in suffix rules.  We
shall code the loop explicitly, with something along these lines:

for f in foo.1 bar.1 etc.1; do
  for g in $$f $(srcdir)/$$f; do
    if test -f $$g; then install $g $(man1dir); break; fi
  done
done
Comment 17 Paul Jarc 2004-04-12 15:41:12 UTC
(In reply to comment #16)
> This patch is not correct.

Which one?  My gcc-javaman.patch is indeed wrong, but I think my later patch
(which appears in Michael's comment #11) is ok.

> Michael Chastain's approach gets the right effect, but $< is only portable
> in suffix rules.

AIUI, gcc already depends on GNU make in other places.  $< is already used in
other non-suffix rules, such as installing g++.1 in gcc/cp/Make-lang.in.

> We shall code the loop explicitly, with something along these lines:

That could work too, but I don't think it buys much over my second patch.
Comment 18 Alexandre Oliva 2004-04-13 02:41:24 UTC
Ah, yes, sorry, I was too much in the mood of automake mailing lists.  GCC can
indeed take advantage of GNU make-specific features, and, in this regard, the
patch looks good.  Sorry.
Comment 19 Michael Elizabeth Chastain 2004-04-13 19:51:05 UTC
Subject: Re:  [3.4 Regression] 3.4.0-20040406, 'make install' fails on
doc/gcjh.1

Okay, here's a patch to do what Alexander Oliva suggests.  I like this
better because the patch is much shorter.

I feel a bit caught in the middle here about the right approach to take.
I know we're trying to get 3.4.0 out but I'm getting up to speed here
as a contributor.

I tested this on:

  native i686-pc-linux-gnu, gnu make 3.79.1, 3.4.0-20040406
  native i686-pc-linux-gnu, gnu make 3.79.1, gcc gcc-3_4-branch
  native i686-pc-linux-gnu, gnu make 3.79.1, gcc HEAD

Alexander O: will you approve this for mainline?

Mark M: will you approve this for gcc-3_4-branch?

Michael C

2004-04-12  Michael Chastain  <mec.gnu@mindspring.com>

    * Make-lang.in (java.install-man): Install from either build
    tree or source tree, whichever has the file first.

Index: Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Make-lang.in,v
retrieving revision 1.128.2.5
diff -c -3 -p -r1.128.2.5 Make-lang.in
*** Make-lang.in    22 Feb 2004 20:46:00 -0000    1.128.2.5
--- Make-lang.in    13 Apr 2004 01:31:08 -0000
***************
*** 1,6 ****
  # Top level -*- makefile -*- fragment for the GNU compiler for the Java(TM)
  # language.
! #   Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.

  #This file is part of GCC.

--- 1,7 ----
  # Top level -*- makefile -*- fragment for the GNU compiler for the Java(TM)
  # language.
! #   Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
! #   Free Software Foundation, Inc.

  #This file is part of GCC.

*************** java.install-man: installdirs \
*** 401,407 ****
        tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
        man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
        rm -f $$man_name ; \
!       $(INSTALL_DATA) doc/$${tool}.1 $$man_name; \
        chmod a-x $$man_name ; \
      done

--- 402,413 ----
        tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
        man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
        rm -f $$man_name ; \
!       for source_name in doc/$${tool}.1 $(srcdir)/doc/$${tool}.1 ; do \
!         if test -f $$source_name; then \
!           $(INSTALL_DATA) $$source_name $$man_name; \
!           break; \
!         fi; \
!       done ; \
        chmod a-x $$man_name ; \
      done
Comment 20 Mark Mitchell 2004-04-14 08:06:28 UTC
Please apply this patch to 3.4.0.

Thanks!
Comment 21 CVS Commits 2004-04-14 19:45:23 UTC
Subject: Bug 14893

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	chastain@gcc.gnu.org	2004-04-14 19:45:18

Modified files:
	gcc/java       : ChangeLog Make-lang.in 

Log message:
	2004-04-12  Michael Chastain  <mec.gnu@mindspring.com>
	
	PR bootstrap/14893:
	* Make-lang.in (java.install-man): Install from either build
	tree or source tree, whichever has the file first.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1315.2.13&r2=1.1315.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/Make-lang.in.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.128.2.5&r2=1.128.2.6

Comment 22 Andrew Pinski 2004-04-14 21:44:24 UTC
This is still needed for 3.5.0, right?
Comment 23 Alexandre Oliva 2004-04-15 05:10:28 UTC
Yeah, this is ok for mainline.

Putting on my paranoid Makefile writer hat, I'd recommend adding an `else :'
between if/fi, just because some shells carry over the exit status of the if
test command to the whole if command, and, if that turns out to be a failure and
we're in `set -e' mode, which Makefile generally enbles, the whole thing falls
apart.  I don't quite recall whether shells with this behavior are common, but I
do remember they exist (I'd guess Ultrix if I had to).  I'm not sure we care
about it at this point, but there are several such constructs in the gcc
Makefiles, so perhaps we should stick to it.

Sorry that I forgot about it in my previous posting.
Comment 24 Giovanni Bajo 2004-06-06 03:53:00 UTC
Micheal,

what's the status of this? Alexandre approved the patch for mainline, but I 
cannot see the CVS commit log for this. Did you apply the patch to mainline? 
Can we close this bug?

Thanks
Comment 25 Michael Elizabeth Chastain 2004-06-06 04:08:10 UTC
Subject: Re:  [3.5 Regression] 3.4.0-20040406, 'make install' fails on
doc/gcjh.1

Hi Giovanni and Alexandre,

Thanks for catching this, it looks like something obvious fell through
the cracks.  It is needed for 3.5.0.

The status of this patch is: Alexandre said "this is ok for mainline"
but then he asked for a small portability tweak.  I did the tweak and
re-tested the patch and re-submitted the patch here:

  http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01529.html

But then I didn't hear back from Alexandre.

Maybe Alexandre meant "yeah, this is okay after you make that small
fix, I trust you know what you are doing", and I was too pedantic
asking for another approval?  Anyways, not trying to point any fingers,
just trying to clean up the loose edge.

Alexandre, can you review this PR (14893), and then look at my
silly little patch again, and say whether it's okay?

Thanks,

Michael C
Comment 26 Alexandre Oliva 2004-08-03 22:56:16 UTC
Sorry that I dropped the ball.  Revised patch is ok.  Thanks,
Comment 27 CVS Commits 2004-08-05 19:29:12 UTC
Subject: Bug 14893

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	chastain@gcc.gnu.org	2004-08-05 19:29:10

Modified files:
	gcc/java       : ChangeLog Make-lang.in 

Log message:
	2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
	
	PR bootstrap/14893
	* Make-lang.in (java.install-man): Install from either build
	tree or source tree, whichever has the file first.
	
	(See the PR for more information and the approval from Alexandre Oliva.
	This fix has been in gcc-3_4-branch for about four months).

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1431&r2=1.1432
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/Make-lang.in.diff?cvsroot=gcc&r1=1.140&r2=1.141

Comment 28 Andrew Pinski 2004-08-05 19:35:01 UTC
Fixed.