I'm trying to construct a system that reinvokes make 3.81 if
make 3.80 is initially used to attempt a build.  I've attached
a testcase showing the general structure.

Make 3.80 complains about a missing endif.  Why?

                                -Dave
define invoke_correct_make_impl

$(warning here 2.1)
.SUFFIXES:

.PHONY: invoke_correct_make
invoke_correct_make_rule:
        +echo PASSED

Makefile : ;
%.mk :: ;

% :: invoke_correct_make_rule ; :
$(warning here 2.2)

endef

invoke_correct_make = $(warning here 2.0) $(eval $(call 
invoke_correct_make_impl)) $(warning here 2.3)

$(check_make_version)

$(warning here 1)

ifeq ($(WRONG_MAKE_VERSION),1)
$(warning here 2)
$(call invoke_correct_make)
$(warning here 3)
endif

$(warning here 4)

all:
        @echo Already running GNU make 3.81

# Check make version.
define check_make_version_impl
WRONG_MAKE_VERSION := $$(if $$(filter $$(MAKE_VERSION),3.81),,1)
$$(call debug,WRONG_MAKE_VERSION = $$(WRONG_MAKE_VERSION))
$$(if $$(filter 1,$$(WRONG_MAKE_VERSION)),$$(warning This build system requires 
GNU make 3.81 --should get PASSED))
endef

check_make_version = $(eval $(call check_make_version_impl))

include second.mk

include top.mk

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to