toplevel makefile question

Nathanael Nerode neroden@twcny.rr.com
Thu Nov 14 14:41:00 GMT 2002


I'd like to eliminate the differences between these two makefile targets in
the top level:

.PHONY: install-gcc
install-gcc:
	@if [ -f ./gcc/Makefile ] ; then \
	  r=`${PWD}`; export r; \
	  s=`cd $(srcdir); ${PWD}`; export s; \
	  $(SET_LIB_PATH) \
	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
	else \
	  true; \
	fi

.PHONY: install-gcc-cross
install-gcc-cross:
	@if [ -f ./gcc/Makefile ] ; then \
	  r=`${PWD}`; export r; \
	  s=`cd $(srcdir); ${PWD}`; export s; \
	  $(SET_LIB_PATH) \
	  (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \
	else \
	  true; \
	fi

Note that the only difference is the extra restriction of LANGUAGES for
a cross install.  This seems frankly bogus to me.  What is the purpose of
this?  If it is truly necessary, would it suffice to include a
@maybe_restrict_languages@ bit which configure set to restrict languages
if host != target ?

--Nathanael



More information about the Gcc mailing list