Created
July 31, 2012 03:07
-
-
Save dcolish/3213170 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/xapian-core/Makefile.am b/xapian-core/Makefile.am | |
| index cf49159..96d84b6 100644 | |
| --- a/xapian-core/Makefile.am | |
| +++ b/xapian-core/Makefile.am | |
| @@ -140,3 +140,14 @@ xapian-config.1: xapian-config makemanpage | |
| endif | |
| MAINTAINERCLEANFILES += $(BUILT_SOURCES) | |
| + | |
| +.PHONY: check-syntax | |
| +get_cs_flags = $(foreach target,$(subst .,_,$(subst -,_,$($(2)))),$($(target)_$(1)FLAGS)) | |
| +get_cs_all_flags = $(foreach type,$(2),$(call get_cs_flags,$(1),$(type))) | |
| +get_cs_compile = $(if $(subst C,,$(1)),$($(1)COMPILE),$(COMPILE)) | |
| +get_cs_cmdline = $(call get_cs_compile,$(1)) $(call get_cs_all_flags,$(1),check_PROGRAMS bin_PROGRAMS lib_LTLIBRARIES) -fsyntax-only -gstabs+ | |
| +check-syntax: | |
| + s=$(suffix $(CHK_SOURCES));\ | |
| + if [ "$$s" = ".c" ]; then $(call get_cs_cmdline,C) $(CHK_SOURCES);\ | |
| + elif [ "$$s" = ".cpp" -o "$$s" = ".cc" -o "$$s" = ".h" -o "$$s" = ".hpp" ]; then $(call get_cs_cmdline,CXX) $(call get_cs_cmdline,CPP) $(CHK_SOURCES);\ | |
| + else exit 1; fi | |
| diff --git a/xapian-core/api/Makefile b/xapian-core/api/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/api/Makefile | |
| +++ b/xapian-core/api/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/backends/Makefile b/xapian-core/backends/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/backends/Makefile | |
| +++ b/xapian-core/backends/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/backends/brass/Makefile b/xapian-core/backends/brass/Makefile | |
| index 2877583..062b8f5 100644 | |
| --- a/xapian-core/backends/brass/Makefile | |
| +++ b/xapian-core/backends/brass/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd ../.. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/backends/chert/Makefile b/xapian-core/backends/chert/Makefile | |
| index 2877583..062b8f5 100644 | |
| --- a/xapian-core/backends/chert/Makefile | |
| +++ b/xapian-core/backends/chert/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd ../.. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/backends/inmemory/Makefile b/xapian-core/backends/inmemory/Makefile | |
| index 2877583..062b8f5 100644 | |
| --- a/xapian-core/backends/inmemory/Makefile | |
| +++ b/xapian-core/backends/inmemory/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd ../.. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/backends/multi/Makefile b/xapian-core/backends/multi/Makefile | |
| index 2877583..062b8f5 100644 | |
| --- a/xapian-core/backends/multi/Makefile | |
| +++ b/xapian-core/backends/multi/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd ../.. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/backends/remote/Makefile b/xapian-core/backends/remote/Makefile | |
| index 2877583..062b8f5 100644 | |
| --- a/xapian-core/backends/remote/Makefile | |
| +++ b/xapian-core/backends/remote/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd ../.. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/bin/Makefile b/xapian-core/bin/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/bin/Makefile | |
| +++ b/xapian-core/bin/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/common/Makefile b/xapian-core/common/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/common/Makefile | |
| +++ b/xapian-core/common/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/examples/Makefile b/xapian-core/examples/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/examples/Makefile | |
| +++ b/xapian-core/examples/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/expand/Makefile b/xapian-core/expand/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/expand/Makefile | |
| +++ b/xapian-core/expand/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/geospatial/Makefile b/xapian-core/geospatial/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/geospatial/Makefile | |
| +++ b/xapian-core/geospatial/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/include/Makefile b/xapian-core/include/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/include/Makefile | |
| +++ b/xapian-core/include/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/include/xapian/Makefile b/xapian-core/include/xapian/Makefile | |
| index 2877583..062b8f5 100644 | |
| --- a/xapian-core/include/xapian/Makefile | |
| +++ b/xapian-core/include/xapian/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd ../.. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/languages/Makefile b/xapian-core/languages/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/languages/Makefile | |
| +++ b/xapian-core/languages/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/matcher/Makefile b/xapian-core/matcher/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/matcher/Makefile | |
| +++ b/xapian-core/matcher/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/net/Makefile b/xapian-core/net/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/net/Makefile | |
| +++ b/xapian-core/net/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/queryparser/Makefile b/xapian-core/queryparser/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/queryparser/Makefile | |
| +++ b/xapian-core/queryparser/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/tests/harness/Makefile b/xapian-core/tests/harness/Makefile | |
| index 2877583..062b8f5 100644 | |
| --- a/xapian-core/tests/harness/Makefile | |
| +++ b/xapian-core/tests/harness/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd ../.. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/unicode/Makefile b/xapian-core/unicode/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/unicode/Makefile | |
| +++ b/xapian-core/unicode/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: | |
| diff --git a/xapian-core/weight/Makefile b/xapian-core/weight/Makefile | |
| index 312b949..f165255 100644 | |
| --- a/xapian-core/weight/Makefile | |
| +++ b/xapian-core/weight/Makefile | |
| @@ -2,7 +2,7 @@ | |
| SHELL = /bin/sh | |
| -all check: | |
| +all check check-syntax: | |
| cd .. && $(MAKE) $@ | |
| clean: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment