* Makefile.in (AS_FOR_TARGET, LD_FOR_TARGET,

DLLTOOL_FOR_TARGET, WINDRES_FOR_TARGET, AR_FOR_TARGET,
RANLIB_FOR_TARGET, NM_FOR_TARGET): Don't use double quotes to
avoid quotes nesting problems.
(NATIVE_CHECK_MODULES): Ditto, just for consistency.
(DO_X): Export only variables that are set.
This commit is contained in:
Alexandre Oliva 2001-09-21 05:14:32 +00:00
parent 923f08ff7a
commit 3f152009fa
2 changed files with 25 additions and 14 deletions

View File

@ -1,3 +1,12 @@
2001-09-21 Alexandre Oliva <aoliva@redhat.com>
* Makefile.in (AS_FOR_TARGET, LD_FOR_TARGET,
DLLTOOL_FOR_TARGET, WINDRES_FOR_TARGET, AR_FOR_TARGET,
RANLIB_FOR_TARGET, NM_FOR_TARGET): Don't use double quotes to
avoid quotes nesting problems.
(NATIVE_CHECK_MODULES): Ditto, just for consistency.
(DO_X): Export only variables that are set.
2001-09-19 Ben Elliston <bje@redhat.com> 2001-09-19 Ben Elliston <bje@redhat.com>
* configure.in (sparc-sun-solaris2*): Don't use /usr/bin/which on * configure.in (sparc-sun-solaris2*): Don't use /usr/bin/which on

View File

@ -234,7 +234,7 @@ AS_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \ elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=as ; \ $(CC_FOR_TARGET) -print-prog-name=as ; \
else \ else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(AS); \ echo $(AS); \
else \ else \
t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \ t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
@ -247,7 +247,7 @@ LD_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \ elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=ld ; \ $(CC_FOR_TARGET) -print-prog-name=ld ; \
else \ else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(LD); \ echo $(LD); \
else \ else \
t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \ t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
@ -258,7 +258,7 @@ DLLTOOL_FOR_TARGET = ` \
if [ -f $$r/binutils/dlltool ] ; then \ if [ -f $$r/binutils/dlltool ] ; then \
echo $$r/binutils/dlltool ; \ echo $$r/binutils/dlltool ; \
else \ else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(DLLTOOL); \ echo $(DLLTOOL); \
else \ else \
t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \ t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
@ -269,7 +269,7 @@ WINDRES_FOR_TARGET = ` \
if [ -f $$r/binutils/windres ] ; then \ if [ -f $$r/binutils/windres ] ; then \
echo $$r/binutils/windres ; \ echo $$r/binutils/windres ; \
else \ else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(WINDRES); \ echo $(WINDRES); \
else \ else \
t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \ t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
@ -280,7 +280,7 @@ AR_FOR_TARGET = ` \
if [ -f $$r/binutils/ar ] ; then \ if [ -f $$r/binutils/ar ] ; then \
echo $$r/binutils/ar ; \ echo $$r/binutils/ar ; \
else \ else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(AR); \ echo $(AR); \
else \ else \
t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \ t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
@ -291,8 +291,12 @@ RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \ if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \ echo $$r/binutils/ranlib ; \
else \ else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(RANLIB); \ if [ x'$(RANLIB)' != x ]; then \
echo $(RANLIB); \
else \
echo ranlib; \
fi; \
else \ else \
t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \ t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
fi; \ fi; \
@ -304,7 +308,7 @@ NM_FOR_TARGET = ` \
elif [ -f $$r/gcc/xgcc ]; then \ elif [ -f $$r/gcc/xgcc ]; then \
$(CC_FOR_TARGET) -print-prog-name=nm ; \ $(CC_FOR_TARGET) -print-prog-name=nm ; \
else \ else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(NM); \ echo $(NM); \
else \ else \
t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \ t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
@ -979,16 +983,15 @@ $(DO_X):
case $$i in \ case $$i in \
gcc) \ gcc) \
for flag in $(EXTRA_GCC_FLAGS); do \ for flag in $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \ done; \
;; \ ;; \
*) \ *) \
for flag in $(EXTRA_HOST_FLAGS); do \ for flag in $(EXTRA_HOST_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \ done; \
;; \ ;; \
esac ; \ esac ; \
export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
if (cd ./$$i; \ if (cd ./$$i; \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@ -1005,9 +1008,8 @@ $(DO_X):
for i in $(TARGET_CONFIGDIRS) -dummy-; do \ for i in $(TARGET_CONFIGDIRS) -dummy-; do \
if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
for flag in $(EXTRA_TARGET_FLAGS); do \ for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \ done; \
export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
if (cd $(TARGET_SUBDIR)/$$i; \ if (cd $(TARGET_SUBDIR)/$$i; \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@ -1213,7 +1215,7 @@ $(ALL_MODULES) all-gui all-libproc:
.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
$(NATIVE_CHECK_MODULES): $(NATIVE_CHECK_MODULES):
@if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
dir=`echo $@ | sed -e 's/check-//'`; \ dir=`echo $@ | sed -e 's/check-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \ if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \ r=`pwd`; export r; \