[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
another target variable question
From: |
cbrown |
Subject: |
another target variable question |
Date: |
Fri, 03 Aug 2007 17:37:12 -0400 |
Essentially, I want to make rules such that "make clean" will clean
the current project, but not its dependent projects. So, I have;
PROJECTS = a b
.PHONY: $(PROJECTS)
foo clean: $(CURR)
a: b
$(PROJECTS):
ifeq ($(MAKECMDGOALS),clean)
@echo "($@,$(CURR))"
ifeq ($@,$(CURR))
@echo gonna clean $@
else
@echo NOT gonna clean $@
endif
else
@echo gonna $(MAKECMDGOALS) $@
endif
When I execute "make CURR=a clean", I get;
(b,a)
NOT gonna clean b
(a,a)
NOT gonna clean a
How come the "ifeq ($@,$(CURR))" doesn't work?
Is there an easier path to my goal?
--CB
- another target variable question,
cbrown <=