[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Implicit rules and directory names
From: |
René Rebe |
Subject: |
Implicit rules and directory names |
Date: |
Wed, 21 Sep 2005 10:27:49 +0200 |
User-agent: |
KMail/1.8.2 |
Hi all,
to gain some benefits I convert our Makefiles from recursion to non-recursion
and using the various "Recursive Make considered harmful" or "Recursive Make
reloaded" papers on the net.
So far this worked out quite nicely, however I have trouble with multiple
executables per directory. I would either like an implicit rule, in the form:
$($(X_MODULE)_OUTPUT)/%: %.o $(DEPS)
@echo ' LINK EXEC $@'
$(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -o '$@' $^ $(LDFLAGS)
However due to the full patch (I think) this rule does not match, and also if
I (for testing) modify this to not use pathes it does not use the $(DEPS) and
ignores the prerequisits.
I fear implicit rules are not intended to be used this way - what also would
work out is generating a explicit rule for each target like (pseudo code):
foreach x $(X_MODULE_BINARY)
$($(X_MODULE)_OUTPUT)/$(x)%: $(X_MODULE)/$(x).o $(DEPS)
@echo ' LINK EXEC $@'
$(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -o '$@' $^ $(LDFLAGS)
endeach
Thoght I find nothing in the make info page to allow such a construct.
Any ideas?
--
René Rebe - Rubensstr. 64 - 12157 Berlin (Europe / Germany)
http://www.exactcode.de | http://www.t2-project.org
+49 (0)30 255 897 45
- Implicit rules and directory names,
René Rebe <=