Make sure we find configuration checks in build directory
This commit is contained in:
parent
0f1266d53b
commit
11393dc8af
|
@ -90,3 +90,4 @@ CONFIG_FLAGS=$(shell grep '// [A-Z]*FLAGS=' "$<" | sed -e 's|// [A-Z]*FLAGS=||g'
|
|||
CC_CONFIG= mkdir -p "$$(dirname "$@")" ; echo '\#define' HAVE_$(CONFIG_UPPER)_H $(shell $(CC) $(CFLAGS) $(CFLAGS_CONFIG_$*) $(CONFIG_FLAGS) "$<" -o "$<".exe > "$<".err 2>&1 && "$<".exe > "$<".out && echo 1 || echo 0) | sed -e 's|\#define \(.*\) 0|/* \#undef \1 */|g' > "$@"; [ -f "$<".out ] && cat >> "$@" "$<".out; true
|
||||
CXX_CONFIG= mkdir -p "$$(dirname "$@")" ; echo '\#define' HAVE_$(CONFIG_UPPER) $(shell $(CXX) $(CXXFLAGS) $(CXXFLAGS_CONFIG_$*) $(CONFIG_FLAGS) "$<" -o "$<".exe > "$<".err 2>&1 && "$<".exe > "$<".out && echo 1 || echo 0) | sed -e 's|\#define \(.*\) 0|/* \#undef \1 */|g' > "$@"; [ -f "$<".out ] && cat >> "$@" "$<".out; true
|
||||
LIB_CONFIG= mkdir -p "$$(dirname "$@")" ; echo '\#define HAVE_LIB'$(CONFIG_UPPER) $$($(CC) $(CCFLAGS) $(CFLAGS_CONFIG_$*) -l$* "$<" -o "$<".exe > "$<".err 2>&1 && "$<".exe && echo 1 || echo 0) | sed -e 's|\#define \(.*\) 0|/* \#undef \1 */|g' > "$@"
|
||||
FN_CONFIG= mkdir -p "$$(dirname "$@")" ; echo '\#define HAVE_'$(CONFIG_UPPER) $$($(CC) $(CCFLAGS) $(CFLAGS_CONFIG_$*) "$<" -o "$<".exe > "$<".err 2>&1 && "$<".exe && echo 1 || echo 0) | sed -e 's|\#define \(.*\) 0|/* \#undef \1 */|g' > "$@"
|
||||
|
|
4
rules.mk
4
rules.mk
|
@ -392,8 +392,8 @@ $(OBJDIR)/CONFIG_LIB%.c:
|
|||
|
||||
# Check if a function is present
|
||||
$(OBJDIR)/HAVE_%: $(OBJDIR)/CONFIG_CHECK_%.c
|
||||
$(PRINT_CONFIG) $(CC_CONFIG)
|
||||
$(OBJDIR)/CONFIG_CHECK_%.c: config/check_%.c
|
||||
$(PRINT_CONFIG) $(FN_CONFIG)
|
||||
$(OBJDIR)/CONFIG_CHECK_%.c: $(BUILD)config/check_%.c
|
||||
$(PRINT_COPY) cp $< $@
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue