[rfa] java/Make-lang.in: fix pr bootstrap/14893

Michael Elizabeth Chastain mec.gnu@mindspring.com
Fri Apr 23 01:17:00 GMT 2004


Here's a patch for PR bootstrap/14893.   This is the same code that
I committed to gcc-3_4-branch.  I've tested it on gcc HEAD (again)
and it works fine.

Okay to commit to gcc HEAD?

I know it's backwards to do stuff on the branch first and then commit to
mainline later.

The problem is with generated files: in this case, some java man pages.
There are two use cases: CVS checkouts and snapshot/prerelease/release
tarballs.  The two source trees have different file arrangements
(generated files are in one tree but not the other).  The makefile
machinery has to deal with both cases, but only one case gets tested
during normal development.  So never-before-seen bugs pop up during a
pre-release.

Michael C

2004-04-22  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.

Index: Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Make-lang.in,v
retrieving revision 1.136
diff -c -3 -p -r1.136 Make-lang.in
*** Make-lang.in	17 Feb 2004 05:20:25 -0000	1.136
--- Make-lang.in	22 Apr 2004 20:07:08 -0000
*************** java.install-man: installdirs \
*** 404,410 ****
  	  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
  
--- 404,416 ----
  	  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; \
! 	      else : ; \
! 	    fi; \
! 	  done ; \
  	  chmod a-x $$man_name ; \
  	done
  



More information about the Gcc-patches mailing list