[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make 3.81rc2: automatic variables strip leading "./"
From: |
Angel Tsankov |
Subject: |
Re: make 3.81rc2: automatic variables strip leading "./" |
Date: |
Thu, 30 Mar 2006 21:32:33 +0300 |
at> Thank you very much for the detailed explanation, but I have to
at> disappoint you - it was not necessary since I perfectly understand
at> the issue.
OK, sorry.
at> I need a way to compare lists to work around an inconvenience that
at> this issue poses and this inconvenience happens to involve
at> patsubst.
Well, I guess I don't understand what you're asking. You'll need to be
more clear or, preferably, provide a specific example.
OK, here it is. Consider the following makefile:
DEPENDENCIES_FROM_SOURCES = $(patsubst
$(SOURCE_PATH)/%$(SOURCE_FILE_EXT),$(DEPENDENCY_PATH)/%$(DEPENDENCY_FILE_EXT),$(1))
$(INTERMEDIATE_PATH)/%$(OBJECT_FILE_EXT): \
$(SOURCE_PATH)/%$(SOURCE_FILE_EXT) \
$(DEPENDENCY_PATH)/%$(DEPENDENCY_FILE_EXT)
@$(eval DEPENDENCY_FILE := $(call DEPENDENCIES_FROM_SOURCES,$<))
# On the last line "$<" is canonical. Now conisder the case when SOURCE_PATH is "." - DEPENDENCIES_FROM_SOURCES does not perform any
substitution, which is a problem.
# In order to work around it, I consider cononizing the argument to
DEPENDENCIES_FROM_SOURCE, e.g. like this:
CANONIZE = \
$(eval TEMP := $(patsubst ./%,%,$(1))) \
$(if $(TEMP)==$(1),$(call CANONICALIZE,TEMP))
# The problem with this approach is that I need to compare two lists for equality, or check if patsubst has performed any
substitution.
- make 3.81rc2: automatic variables strip leading "./", Angel Tsankov, 2006/03/29
- Re: make 3.81rc2: automatic variables strip leading "./", Paul D. Smith, 2006/03/29
- Re: make 3.81rc2: automatic variables strip leading "./", Angel Tsankov, 2006/03/30
- Re: make 3.81rc2: automatic variables strip leading "./", Paul D. Smith, 2006/03/30
- Re: make 3.81rc2: automatic variables strip leading "./", Angel Tsankov, 2006/03/30
- Re: make 3.81rc2: automatic variables strip leading "./", Paul D. Smith, 2006/03/30
- Re: make 3.81rc2: automatic variables strip leading "./",
Angel Tsankov <=
- Re: make 3.81rc2: automatic variables strip leading "./", Paul D. Smith, 2006/03/30
- Re: make 3.81rc2: automatic variables strip leading "./", Angel Tsankov, 2006/03/31
- Re: make 3.81rc2: automatic variables strip leading "./", Paul D. Smith, 2006/03/31