all: all-in-place
+CR_EXCEPTIONS=copyright_exceptions
+.PHONY: check_copyrights
+check_copyrights:
+ @echo "Compute exceptions >$(CR_EXCEPTIONS)~"
+ @export LANG=C; \
+ (cd packages; \
+ find . -name '*.el' -print0 | \
+ xargs -0 grep -L 'Free Software Foundation, Inc' | \
+ grep -v '\(\.dir-locals\|.-\(pkg\|autoloads\)\)\.el$$'; \
+ find . -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)~"
+
## Deploy the package archive to archive/, with packages in
## archive/packages/:
archive: archive-tmp
# FIXME, we could probably speed this up significantly with
# rules like "%.tar: ../%/ChangeLog" so we only rebuild the packages
# that have indeed changed.
- cd $(ARCHIVE_TMP)/packages; \
- $(EMACS) -l $(CURDIR)/admin/archive-contents.el \
- -f batch-make-archive
- @cd $(ARCHIVE_TMP)/packages; \
- for pt in *; do \
- if [ -d $$pt ]; then \
- echo "Creating tarball $${pt}.tar" && \
- tar -cf $${pt}.tar $$pt --remove-files; \
- fi; \
+ cd $(ARCHIVE_TMP)/packages; \
+ $(EMACS) -l $(CURDIR)/admin/archive-contents.el \
+ -f batch-make-archive
+ @cd $(ARCHIVE_TMP)/packages; \
+ for pt in *; do \
+ if [ -f "$${pt}/.elpaignore" ]; then \
+ ignore="$${pt}/.elpaignore"; \
+ else \
+ ignore="/dev/null"; \
+ fi; \
+ if [ -d $$pt ]; then \
+ echo "Creating tarball $${pt}.tar" && \
+ tar -cf $${pt}.tar $$pt -X "$$ignore"; \
+ rm -r $${pt}; \
+ fi; \
done
mkdir -p archive/packages
mv archive/packages archive/packages-old
#mkdir -p archive/admin
#cp admin/* archive/admin/
+# FIXME: Turn it into an `external', which will require adding the notion of
+# "snapshot" packages.
org-fetch: archive-tmp
cd $(ARCHIVE_TMP)/packages; \
pkgname=`curl -s http://orgmode.org/elpa/|perl -ne 'push @f, $$1 if m/(org-\d{8})\.tar/; END { @f = sort @f; print "$$f[-1]\n"}'`; \
$(EMACS) -l $(CURDIR)/admin/archive-contents.el \
--eval "(archive--refresh-pkg-file)" \
--eval "(require 'package)" \
- --eval "(package-generate-autoloads '$$(basename $$(pwd)) \
+ --eval "(package-generate-autoloads \"$$(basename $$(pwd))\" \
\"$$(pwd)\")"
# Put into elcs the set of elc files we need to keep up-to-date.