Question on Makefile.in's program_transform_cross_name

Kelley Cook kcook34@ford.com
Fri Dec 5 16:54:00 GMT 2003


Nathaneal,

As suggested, I was attempting to get rid of the copying of the doc 
directory from source to objdir in the PR12744 patch.  My first attempt 
was just to delete those four lines from my proposed patch which due to 
the $(docobjdir) -> doc/ transformation theoretically should just work.

A make-install from a simulated tarball works great for the .info files, 
but it does not yet work for the man files, since the install-man rules 
were never adjusted to be like the install-info file rules with a 
generic pattern.  Obviously making them similar should fix that problem.

However, I have a question, which I think you can answer.
In the install-man rules there is currently a shelled out

-if [ -f gcc-cross$(exeext) ] ; then \
  rm -f $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
  $(INSTALL_DATA) $(docobjdir)/gcc.1 
$(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
  chmod a-x $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \
else \
  rm -f $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
  $(INSTALL_DATA) $(docobjdir)/gcc.1 
$(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
  chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \
fi

Now looking look at the definitions of GCC_INSTALL_NAME and 
GCC_CROSS_NAME we get:

GCC_INSTALL_NAME = `echo gcc|sed '$(program_transform_name)'`
GCC_CROSS_NAME = `echo gcc|sed '$(program_transform_cross_name)'`

Continuing to check the definitions of those two $(program...) 
definitions, I see

program_transform_name = @program_transform_name@
program_transform_cross_name = @program_transform_name@

So those are always the same, which consequently means GCC_INSTALL_NAME 
and GCC_CROSS_NAME are always the same which means I could just delete 
the *_CROSS_NAME lines as well as the numerous spots in the makefile 
which differentiate on them.

Is my analysis of the current situation correct and more importantly if 
so should GCC_INSTALL_NAME always be the same as GCC_CROSS_NAME?  I 
think that the answer is yes since configure.in seems to take care of 
adjusting the sed script to prefix the target name.

If it is then I can submit a separate patch for cleaning up *_CROSS_NAME 
the Makefile and */Make-lang.in files.

Thanks,
Kelley Cook



More information about the Gcc mailing list