]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add emacs .dir-locals.el settings for flycheck mode
authorOndřej Surý <ondrej@sury.org>
Wed, 28 Nov 2018 21:48:29 +0000 (22:48 +0100)
committerOndřej Surý <ondrej@sury.org>
Wed, 19 Dec 2018 16:03:37 +0000 (17:03 +0100)
.dir-locals.el [new file with mode: 0644]
lib/isc/win32/.dir-locals.el [new file with mode: 0644]
util/merge_copyrights

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644 (file)
index 0000000..858954a
--- /dev/null
@@ -0,0 +1,64 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+
+((c-mode .
+  ((eval .
+        (set (make-local-variable 'directory-of-current-dir-locals-file)
+             (file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
+             )
+        )
+   (eval .
+        (set (make-local-variable 'include-directories)
+             (list
+
+              ;; top directory
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "./"))
+
+              ;; current directory
+              (expand-file-name (concat default-directory "./"))
+
+              ;; libisc
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "lib/isc/include"))
+
+              ;; libdns
+
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "lib/dns/include"))
+
+              ;; libisccc
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "lib/isccc/include"))
+
+              ;; libisccfg
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "lib/isccfg/include"))
+
+              ;; libns
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "lib/ns/include"))
+
+              ;; libirs
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "lib/irs/include"))
+
+              ;; libbind9
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "lib/bind9/include"))
+
+              (expand-file-name "/usr/local/opt/openssl@1.1/include")
+              (expand-file-name "/usr/local/opt/libxml2/include/libxml2")
+              (expand-file-name "/usr/local/include")
+              )
+             )
+        )
+
+   (eval setq flycheck-clang-include-path include-directories)
+   (eval setq flycheck-cpp-include-path include-directories)
+   )
+  ))
diff --git a/lib/isc/win32/.dir-locals.el b/lib/isc/win32/.dir-locals.el
new file mode 100644 (file)
index 0000000..b16a1be
--- /dev/null
@@ -0,0 +1,35 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+
+((c-mode .
+  ((eval .
+        (set (make-local-variable 'directory-of-current-dir-locals-file)
+             (file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
+             )
+        )
+   (eval .
+        (set (make-local-variable 'include-directories)
+             (list
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "../../../"))
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "include"))
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "../include"))
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "../"))
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "./"))
+              (expand-file-name
+               (concat directory-of-current-dir-locals-file "../../dns/include"))
+              (expand-file-name "/usr/local/opt/openssl@1.1/include")
+              (expand-file-name "/usr/local/opt/libxml2/include/libxml2")
+              (expand-file-name "/usr/local/include")
+              )
+             )
+        )
+
+   (eval setq flycheck-clang-include-path include-directories)
+   (eval setq flycheck-cpp-include-path include-directories)
+   )
+  ))
index 8f90eeb0b264f9d21aea42d64b16b63fd08a943b..62d5d14cfff46427ac596b53a2ec64154b758e4d 100644 (file)
@@ -55,6 +55,7 @@ while (<CHANGES>) {
               \.zone$ |        # zone files
               \.conf$ |        # configuration files
               \.conf\.in$ |    # configuration files
+              \.dir-locals\.el | # emacs local variables
               /(dnssafe|openssl)/.*\.[ch]$ |   # imported
               doc/(draft|expired|rfc)/         # imported
             %x);