This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Makefile.in: Simplify recursive make callings (v2)
- From: "Kelley Cook" <kelleycook at wideopenwest dot com>
- To: "Alexandre Oliva" <aoliva at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Michael Matz" <matz at suse dot de>, "Zack Weinberg" <zack at codesourcery dot com>
- Date: Tue, 09 Sep 2003 18:23:19 -0400
- Subject: Re: Makefile.in: Simplify recursive make callings (v2)
On 09 Sep 2003 14:36:28 -0300, Alexandre Oliva wrote:
>On Sep 8, 2003, Kelley Cook <kelleycook@wideopenwest.com> wrote:
>> Zack and Michael are correct
>Thanks for checking.
>> I'll revert it when I get home (cvs blocked at work).
>> Alexandre, would you like patch such as alternative that
>> Zack suggested
>$(MAKE) $(REMAKEFLAGS) looks good to me.
Here is what I recommitted after
make BOOT_CFLAGS="-O2 -fno-unit-at-a-time" restrap trapping
on i686-pc-cygwin
--
Kelley Cook
2003-09-07 Kelley Cook <kelleycook@wideopenwest.com>
* Makefile.in: Define REMAKEFLAGS for LANGUAGES & BOOT_CFLAGS
and use it throughout.
*** Makefile.in.orig Fri Sep 5 11:24:36 2003
--- Makefile.in Fri Sep 5 11:18:59 2003
*************** STAMP = echo timestamp >
*** 223,228 ****
--- 223,229 ----
# Make sure the $(MAKE) variable is defined.
@SET_MAKE@
+ REMAKEFLAGS=LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)"
# --------
# UNSORTED
*************** unstage1 unstage2 unstage3 unstage4 unst
*** 3468,3489 ****
echo $${stage}_build > stage_last
restage1: unstage1
! $(MAKE) stage1_build
restage2: unstage2
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" stage2_build
restage3: unstage3
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" stage3_build
restage4: unstage4
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" stage4_build
restageprofile: unstageprofile
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" stageprofile_build
restagefeedback: unstagefeedback
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" stagefeedback_build
# Bubble up a bugfix through all the stages. Primarily useful for fixing
# bugs that cause the compiler to crash while building stage 2.
--- 3469,3490 ----
echo $${stage}_build > stage_last
restage1: unstage1
! $(MAKE) $(REMAKEFLAGS) stage1_build
restage2: unstage2
! $(MAKE) $(REMAKEFLAGS) stage2_build
restage3: unstage3
! $(MAKE) $(REMAKEFLAGS) stage3_build
restage4: unstage4
! $(MAKE) $(REMAKEFLAGS) stage4_build
restageprofile: unstageprofile
! $(MAKE) $(REMAKEFLAGS) stageprofile_build
restagefeedback: unstagefeedback
! $(MAKE) $(REMAKEFLAGS) stagefeedback_build
# Bubble up a bugfix through all the stages. Primarily useful for fixing
# bugs that cause the compiler to crash while building stage 2.
*************** bubblestrap:
*** 3491,3521 ****
if test -f stage_last; then \
LAST=`sed -e 's/_build//' < stage_last`; \
if test "$$LAST" != "stage1"; then \
! $(MAKE) $$LAST; \
$(STAMP) $${LAST}_copy; \
fi; \
fi
if test -f stage1_copy; then $(MAKE) unstage1; fi
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" stage1_copy
if test -f stage2_copy; then $(MAKE) unstage2; fi
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" stage2_copy
if test -f stage3_copy; then $(MAKE) unstage3; fi
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" stage3_build
if test -f stage4_copy; then \
! $(MAKE) stage3_copy; $(MAKE) unstage4; \
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" stage4_build || exit 1; \
fi
quickstrap:
if test -f stage_last ; then \
! LAST=`cat stage_last`; rm $$LAST; $(MAKE) BOOT_CFLAGS="$(BOOT_CFLAGS)" LANGUAGES="$(LANGUAGES)" $$LAST; \
else \
! $(MAKE) stage1_build; \
fi
cleanstrap:
-$(MAKE) clean
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" bootstrap
unstrap:
-rm -rf stage[234]*
--- 3492,3522 ----
if test -f stage_last; then \
LAST=`sed -e 's/_build//' < stage_last`; \
if test "$$LAST" != "stage1"; then \
! $(MAKE) $(REMAKEFLAGS) $$LAST; \
$(STAMP) $${LAST}_copy; \
fi; \
fi
if test -f stage1_copy; then $(MAKE) unstage1; fi
! $(MAKE) $(REMAKEFLAGS) stage1_copy
if test -f stage2_copy; then $(MAKE) unstage2; fi
! $(MAKE) $(REMAKEFLAGS) stage2_copy
if test -f stage3_copy; then $(MAKE) unstage3; fi
! $(MAKE) $(REMAKEFLAGS) stage3_build
if test -f stage4_copy; then \
! $(MAKE) $(REMAKEFLAGS) stage3_copy; $(MAKE) unstage4; \
! $(MAKE) $(REMAKEFLAGS) stage4_build || exit 1; \
fi
quickstrap:
if test -f stage_last ; then \
! LAST=`cat stage_last`; rm $$LAST; $(MAKE) $(REMAKEFLAGS) $$LAST; \
else \
! $(MAKE) $(REMAKEFLAGS) stage1_build; \
fi
cleanstrap:
-$(MAKE) clean
! $(MAKE) $(REMAKEFLAGS) bootstrap
unstrap:
-rm -rf stage[234]*
*************** unstrap:
*** 3526,3532 ****
# not from scratch.
restrap:
$(MAKE) unstrap
! $(MAKE) LANGUAGES="$(LANGUAGES)" BOOT_CFLAGS="$(BOOT_CFLAGS)" bootstrap
# Compare the object files in the current directory with those in the
# stage2 directory.
--- 3527,3533 ----
# not from scratch.
restrap:
$(MAKE) unstrap
! $(MAKE) $(REMAKEFLAGS) bootstrap
# Compare the object files in the current directory with those in the
# stage2 directory.