Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可以在 GNU make 的静态模式规则上下文中使用通配符吗?例如:
$(BUILD_DIR)/$(DEPENDENCIES) : */%.d : $(SOURCE_DIR)/%.c ...
离开$(SOURCE_DIR)/%.c静态模式规则,并在单独的行中输入依赖项。也许:
$(SOURCE_DIR)/%.c
# Tell make "build/f.d: source/f.c" for each source file $(foreach _,${srcs},$(eval ${BUILD_DIR}/$(notdir $_): $_)) ${BUILD_DIR}/${DEPENDENCIES}: ${BUILD_DIR}/%.d: ...
这回答了这个问题,尽管我同意@Beta 的观点,即这不是你想要的。