LOCAL ONLY! Add Makefile rule to generate a .dir-locals.el file
This commit is contained in:
parent
1c6e7f82ee
commit
4e964da1ae
1
.gitignore
vendored
1
.gitignore
vendored
@ -36,6 +36,7 @@ Makefile.in
|
||||
/GTAGS
|
||||
/INSTALL
|
||||
/ChangeLog
|
||||
/.dir-locals.el
|
||||
/src/matrix-version.h
|
||||
/src/matrix-enumtypes.[ch]
|
||||
/src/matrix-marshalers.[ch]
|
||||
|
20
Makefile.am
20
Makefile.am
@ -63,4 +63,22 @@ ChangeLog:
|
||||
echo A git checkout and git-log is required to generate this file >> $@); \
|
||||
fi
|
||||
|
||||
.PHONY: ChangeLog
|
||||
.PHONY: ChangeLog .dir-locals.el
|
||||
|
||||
.dir-locals.el:
|
||||
@echo -n ""; \
|
||||
includes=`echo -I$(top_srcdir) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(SOUP_CFLAGS) $(JSON_CFLAGS) $(VALA_CFLAGS) | tr " " "\n" | grep '^-I' | sed 's/^-I//'`; \
|
||||
flycheck_path='('; \
|
||||
company_path='('; \
|
||||
for incl in $$includes; \
|
||||
do \
|
||||
if [ "$$incl" == "." ]; \
|
||||
then \
|
||||
incl="$(abs_top_srcdir)"; \
|
||||
fi; \
|
||||
flycheck_path="$$flycheck_path \"$$incl\""; \
|
||||
company_path="$$company_path \"-I$$incl\""; \
|
||||
done; \
|
||||
flycheck_path="$$flycheck_path)"; \
|
||||
company_path="$$company_path)"; \
|
||||
echo "((c-mode . ((flycheck-clang-include-path . $$flycheck_path) (company-clang-arguments . $$company_path))))" > $@
|
||||
|
Loading…
Reference in New Issue
Block a user