mutt stable branch with some hacks
at jcs 12 lines 554 B view raw
1get_cs_flags = $(foreach target,$(subst .,_,$(subst -,_,$($(2)))),$($(target)_$(1)FLAGS)) 2get_cs_all_flags = $(foreach type,$(2),$(call get_cs_flags,$(1),$(type))) 3get_cs_compile = $(if $(subst C,,$(1)),$($(1)COMPILE),$(COMPILE)) 4get_cs_cmdline = $(call get_cs_compile,$(1)) $(call get_cs_all_flags,$(1),check_PROGRAMS bin_PROGRAMS lib_LTLIBRARIES) -fsyntax-only 5 6check-syntax: 7 s=$(suffix $(CHK_SOURCES));\ 8 if [ "$$s" = ".c" ]; then \ 9 $(call get_cs_cmdline,C) $(call get_cs_cmdline,CPP) $(CHK_SOURCES);\ 10 else exit 1; fi 11 12.PHONY: check-syntax