Link and execute the test program for completeness
This commit is contained in:
parent
0a88f02d71
commit
3293ab17f8
|
@ -84,5 +84,5 @@ AS_DEPEND= $(CC) $(CPPFLAGS) $(CPPFLAGS_$*) -MM -MP -MF $@ -MT $(@:.d=) $<
|
|||
# Configuration checks
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
CC_CONFIG= mkdir -p "$$(dirname "$@")" ; echo '\#define HAVE_$*_H' $$($(CC) $(CFLAGS) -Werror -c "$<" -o "$<".o > "$<".err 2>&1 && echo 1 || echo 0) | tr '[:lower:]' '[:upper:]' | sed -e 's|[^[:alnum:]]|_|g' -e 's|_DEFINE_\(.*\)_0|/* \#undef \1 */|g' -e 's|_DEFINE_\(.*\)_1|\#define \1 1|g' > "$@"
|
||||
CXX_CONFIG= mkdir -p "$$(dirname "$@")" ; echo '\#define HAVE_$*' $$($(CXX) $(CXXFLAGS) -Werror -c "$<" -o "$<".o > "$<".err 2>&1 && echo 1 || echo 0) | tr '[:lower:]' '[:upper:]' | sed -e 's|[^[:alnum:]]|_|g' -e 's|_DEFINE_\(.*\)_0|/* \#undef \1 */|g' -e 's|_DEFINE_\(.*\)_1|\#define \1 1|g' > "$@"
|
||||
CC_CONFIG= mkdir -p "$$(dirname "$@")" ; echo '\#define HAVE_$*_H' $$($(CC) $(CFLAGS) "$<" -o "$<".exe > "$<".err 2>&1 && "$<".exe && echo 1 || echo 0) | tr '[:lower:]' '[:upper:]' | sed -e 's|[^[:alnum:]]|_|g' -e 's|_DEFINE_\(.*\)_0|/* \#undef \1 */|g' -e 's|_DEFINE_\(.*\)_1|\#define \1 1|g' > "$@"
|
||||
CXX_CONFIG= mkdir -p "$$(dirname "$@")" ; echo '\#define HAVE_$*' $$($(CXX) $(CXXFLAGS) "$<" -o "$<".exe > "$<".err 2>&1 && "$<".exe && echo 1 || echo 0) | tr '[:lower:]' '[:upper:]' | sed -e 's|[^[:alnum:]]|_|g' -e 's|_DEFINE_\(.*\)_0|/* \#undef \1 */|g' -e 's|_DEFINE_\(.*\)_1|\#define \1 1|g' > "$@"
|
||||
|
|
4
rules.mk
4
rules.mk
|
@ -375,13 +375,13 @@ config.h: $(CONFIG:%=$(OBJDIR)/%)
|
|||
$(OBJDIR)/HAVE_<%.h>: $(OBJDIR)/CONFIG_HAVE_%.c
|
||||
$(PRINT_CONFIG) $(CC_CONFIG)
|
||||
$(OBJDIR)/CONFIG_HAVE_%.c: $(OBJDIR)/.mkdir
|
||||
$(PRINT_GENERATE) mkdir -p "$$(dirname "$@")" ; echo '#include' "<$*.h>" > "$@"
|
||||
$(PRINT_GENERATE) mkdir -p "$$(dirname "$@")" ; echo '#include' "<$*.h>" > "$@"; echo 'int main() { return 0; }' >> "$@"
|
||||
|
||||
# C++ Standard headers, e.g. HAVE_<iostream>
|
||||
$(OBJDIR)/HAVE_<%>: $(OBJDIR)/CONFIG_HAVE_%.cpp
|
||||
$(PRINT_CONFIG) $(CXX_CONFIG)
|
||||
$(OBJDIR)/CONFIG_HAVE_%.cpp: $(OBJDIR)/.mkdir
|
||||
$(PRINT_GENERATE) mkdir -p "$$(dirname "$@")" ; echo '#include' "<$*>" > "$@"
|
||||
$(PRINT_GENERATE) mkdir -p "$$(dirname "$@")" ; echo '#include' "<$*>" > "$@"; echo 'int main() { return 0; }' >> "$@"
|
||||
|
||||
# Check if a function is present
|
||||
$(OBJDIR)/HAVE_%: $(OBJDIR)/CONFIG_CHECK_%.c
|
||||
|
|
Loading…
Reference in New Issue