[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bizarre "missing endif"
From: |
David Greene |
Subject: |
Bizarre "missing endif" |
Date: |
Tue, 13 Feb 2007 11:59:35 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.0 |
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
- Bizarre "missing endif",
David Greene <=