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.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make