File: flymake.am

package info (click to toggle)
mutt 1.13.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 20,432 kB
  • sloc: ansic: 95,029; sh: 4,720; perl: 1,152; makefile: 708; yacc: 318; python: 211
file content (12 lines) | stat: -rw-r--r-- 554 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
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

check-syntax:
	s=$(suffix $(CHK_SOURCES));\
	if   [ "$$s" = ".c"   ]; then \
	    $(call get_cs_cmdline,C) $(call get_cs_cmdline,CPP) $(CHK_SOURCES);\
	else exit 1; fi

.PHONY: check-syntax