# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# Tell GNU make 3.79 not to run the top level in parallel. This
-# prevents contention for $builddir/$target/config.cache, as well
-# as minimizing scatter in file system caches.
-NOTPARALLEL = .NOTPARALLEL
-$(NOTPARALLEL):
-
VPATH=@srcdir@
links=@configlinks@
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(AS); \
else \
- t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
+ echo as | sed '$(program_transform_name)' ; \
fi; \
fi`
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(LD); \
else \
- t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
+ echo ld | sed '$(program_transform_name)' ; \
fi; \
fi`
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(DLLTOOL); \
else \
- t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
+ echo dlltool | sed '$(program_transform_name)' ; \
fi; \
fi`
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(WINDRES); \
else \
- t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
+ echo windres | sed '$(program_transform_name)' ; \
fi; \
fi`
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(AR); \
else \
- t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
+ echo ar | sed '$(program_transform_name)' ; \
fi; \
fi`
echo ranlib; \
fi; \
else \
- t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
+ echo ranlib | sed '$(program_transform_name)' ; \
fi; \
fi`
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(NM); \
else \
- t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
+ echo nm | sed '$(program_transform_name)' ; \
fi; \
fi`
.PHONY: all
#### host and target specific makefile fragments come in here.
+@target_makefile_frag@
+@alphaieee_frag@
+@ospace_frag@
+@host_makefile_frag@
###
# Flags to pass down to all sub-makes.
done; \
;; \
esac ; \
- if (cd ./$$i; \
+ (cd ./$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+target+]); \
- then true; else exit 1; fi; \
+ [+target+]) \
+ || exit 1; \
else true; fi; \
done
# Break into two pieces
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- if (cd $(TARGET_SUBDIR)/$$i; \
+ (cd $(TARGET_SUBDIR)/$$i && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+target+]); \
- then true; else exit 1; fi; \
+ [+target+]) \
+ || exit 1; \
else true; fi; \
done
[+ ENDFOR recursive_targets +]
local-distclean:
-rm -f Makefile config.status config.cache mh-frag mt-frag
+ -rm -f multilib.out multilib.ts multilib.tmp maybedep.tmp serdep.tmp
-if [ "$(TARGET_SUBDIR)" != "." ]; then \
rm -rf $(TARGET_SUBDIR); \
else true; fi
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
+ (cd $${dir} && $(MAKE) $(FLAGS_TO_PASS) clean); \
else \
true; \
fi
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
+ (cd $(TARGET_SUBDIR)/$${dir} && $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
else \
true; \
fi
@if [ -f ./gcc/Makefile ] ; then \
r=`${PWD}` ; export r ; \
$(SET_LIB_PATH) \
- (cd ./gcc; \
+ (cd ./gcc && \
$(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
else \
true ; \
# built are.
TAGS: do-TAGS
-
# --------------------------------------
# Modules which run on the build machine
# --------------------------------------
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+
+ (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
IF with_x
+] $(X11_FLAGS_TO_PASS)[+
ENDIF with_x +] all)
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+
+ (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
IF with_x
+] $(X11_FLAGS_TO_PASS)[+
ENDIF with_x +] check); \
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+
+ (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
IF with_x
+] $(X11_FLAGS_TO_PASS)[+
ENDIF with_x +] check)
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd [+module+]; $(MAKE) $(FLAGS_TO_PASS)[+
+ (cd [+module+] && $(MAKE) $(FLAGS_TO_PASS)[+
IF with_x
+] $(X11_FLAGS_TO_PASS)[+
ENDIF with_x +] install)
maybe-configure-target-[+module+]:
configure-target-[+module+]: $(TARGET_SUBDIR)/[+module+]/Makefile
-# Don't manually override CC_FOR_TARGET at make time; get it set right
-# at configure time. Otherwise multilibs may be wrong.
-$(TARGET_SUBDIR)/[+module+]/multilib.out: maybe-all-gcc
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+$(TARGET_SUBDIR)/[+module+]/multilib.out: multilib.out
@[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\
- r=`${PWD}`; export r; \
- echo "Configuring multilibs for [+module+]"; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/[+module+]/multilib.out 2> /dev/null
+ cp multilib.out $(TARGET_SUBDIR)/[+module+]/multilib.out
$(TARGET_SUBDIR)/[+module+]/Makefile: config.status $(TARGET_SUBDIR)/[+module+]/multilib.out
@[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/[+module+]; \
+ (cd $(TARGET_SUBDIR)/[+module+] && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) [+
IF raw_cxx
+] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/[+module+]; \
+ (cd $(TARGET_SUBDIR)/[+module+] && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) [+
IF raw_cxx
+] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
@r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/[+module+]; \
+ (cd $(TARGET_SUBDIR)/[+module+] && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
[+ ENDIF no_install +]
[+ ENDFOR target_modules +]
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
else \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
fi
# Building GCC uses some tools for rebuilding "source" files
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
else \
true; \
fi
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \
else \
true; \
fi
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
$(SET_LIB_PATH) \
- (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
+ (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
else \
true; \
fi
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}` ; export s; \
$(SET_LIB_PATH) \
- (cd ./gcc; \
+ (cd ./gcc && \
$(MAKE) $(GCC_FLAGS_TO_PASS) install); \
rm -rf gcc/include; \
mv gcc/tmp-include gcc/include 2>/dev/null; \
# Regenerating top level configury
# --------------------------------
+# Multilib.out tells target dirs what multilibs they should build.
+# There is really only one copy. We use the 'timestamp' method to
+# work around various timestamp bugs on some systems.
+# We use move-if-change so that it's only considered updated when it
+# actually changes, because it has to depend on a phony target.
+multilib.out: multilib.ts
+ @if [ -f multilib.out ] ; then : else \
+ rm -f multilib.ts; $(MAKE) multilib.ts; \
+ fi
+
+multilib.ts: maybe-all-gcc
+ @r=`${PWD}`; export r; \
+ echo "Checking multilib configuration..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \
+ echo timestamp > multilib.ts
+
# Rebuilding Makefile.in, using autogen.
+AUTOGEN = autogen
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def
- cd $(srcdir) && autogen Makefile.def
-
-# with the gnu make, this is done automatically.
+ cd $(srcdir) && $(AUTOGEN) Makefile.def
-host_makefile_frag=@host_makefile_frag@
-target_makefile_frag=@target_makefile_frag@
+# Rebuilding Makefile.
+Makefile: $(srcdir)/Makefile.in config.status
+ CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
- $(SHELL) ./config.status
+config.status: configure $(gcc_version_trigger)
+ $(SHELL) ./config.status --recheck
+# Rebuilding configure.
+AUTOCONF = autoconf
+$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/config/acx.m4
+ cd $(srcdir) && $(AUTOCONF)
#
.NOEXPORT:
MAKEOVERRIDES=
+# Tell GNU make 3.79 not to run the top level in parallel. This
+# prevents contention for $builddir/$target/config.cache, as well
+# as minimizing scatter in file system caches.
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+
# end of Makefile.in