]> code.delx.au - gnu-emacs-elpa/blobdiff - Makefile.am
Add loc-changes:alist-describe to show what marks have been set.
[gnu-emacs-elpa] / Makefile.am
index a631c55bf868dc13f9da0332473606dc6580c04e..0b381fc71ef935403fd9cf4c9bea1514ef57a1d0 100644 (file)
@@ -24,7 +24,25 @@ test: check
 
 #: Run all tests without bloated output
 check-short:
-       $(MAKE) check 2>&1  | ruby make-check-filter.rb
+       $(MAKE) check 2>&1  | ruby test/make-check-filter.rb
 
 check:
        $(MAKE) -C test $@
+
+CR_EXCEPTIONS=copyright_exceptions
+#: Check for GNU Copyrights.
+check_copyrights:
+       @echo "Compute exceptions >$(CR_EXCEPTIONS)~"
+       @export LANG=C;                                                 \
+       find . -name '.git' -prune -o -name '*.el' -print0 |            \
+           xargs -0 grep -L 'Free Software Foundation, Inc' |          \
+           grep -v '\(\.dir-locals\|.-\(pkg\|autoloads\)\)\.el$$';     \
+       find . -name '.git' -prune -o -name '*.el' -print |             \
+           while read f; do                                            \
+               fquoted="$$(echo $$f|tr '|' '_')";                      \
+               sed -n -e '/[Cc]opyright.*, *[1-9][-0-9]*,\?$$/N'       \
+                   -e '/Free Software Foundation/d'                    \
+                   -e "s|^\\(.*[Cc]opyright\\)|$$fquoted:\\1|p"        \
+                  "$$f";                                               \
+           done | sort >$(CR_EXCEPTIONS)~
+       diff -u "$(CR_EXCEPTIONS)" "$(CR_EXCEPTIONS)~"