]> code.delx.au - gnu-emacs-elpa/blobdiff - Makefile
Update AUCTeX ELPA package to the new 11.87 release.
[gnu-emacs-elpa] / Makefile
index 71686a07d51a5df0fb684552627689eae7badcdd..47043f9d37bb6d887bde0d03a9ca59ee3b7a4363 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,14 +3,20 @@
 EMACS=emacs
 
 ARCHIVE_TMP=archive-tmp
-PACKAGE_SITE_DIR=site
+SITE_DIR=site
+
+.PHONY: archive-tmp process-archive archive-full org-fetch clean all do-it
 
 ## Set up the source files for direct usage, by pointing
-## `package-directory-list' to site/
+## `package-directory-list' to the site/ directory.
 site: packages
-       mkdir -p $(PACKAGE_SITE_DIR)
+       mkdir -p $(SITE_DIR)
+       $(EMACS) -batch -l $(CURDIR)/admin/archive-contents.el \
+         --eval "(batch-make-site-dir \"packages\" \"$(SITE_DIR)\")"
 
-.PHONY: archive-tmp process-archive archive-full org-fetch
+site/%: do-it
+       $(EMACS) -batch -l $(CURDIR)/admin/archive-contents.el \
+         --eval "(progn (setq debug-on-error t) (batch-make-site-package \"$@\"))"
 
 ## Deploy the package archive to archive/, with packages in
 ## archive/packages/:
@@ -18,10 +24,19 @@ archive: archive-tmp
        $(MAKE) $(MFLAGS) process-archive
 
 archive-tmp: packages
+       -rm -r $(ARCHIVE_TMP)
        mkdir -p $(ARCHIVE_TMP)
-       cp -r packages $(ARCHIVE_TMP)
+       cp -a packages/. $(ARCHIVE_TMP)/packages
 
 process-archive:
+       # First, refresh the ChangeLog files.  This needs to be done in
+       # the source tree, because it needs the Bzr data!
+       cd packages; \
+       $(EMACS) -batch -l $(CURDIR)/admin/archive-contents.el \
+                       -f batch-prepare-packages
+       # 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) -batch -l $(CURDIR)/admin/archive-contents.el -f batch-make-archive
        @cd $(ARCHIVE_TMP)/packages; \
        for pt in *; do \
@@ -37,19 +52,23 @@ process-archive:
        rm -rf archive/packages-old
        rm -rf $(ARCHIVE_TMP)
 
-## Deploy the package archive to archive/ including the Org daily and
-## admin scripts:
+## Deploy the package archive to archive/ including the Org daily:
 archive-full: archive-tmp org-fetch
        $(MAKE) $(MFLAGS) process-archive
-       mkdir -p archive/admin
-       cp admin/* archive/admin/
+       #mkdir -p archive/admin
+       #cp admin/* archive/admin/
 
 org-fetch: archive-tmp
-       cd archive-tmp/packages; \
-       pkgname=`curl -s http://orgmode.org/pkg/daily/|perl -ne 'push @f, $$1 if m/(org-\d{8})\.tar/; END { @f = sort @f; print "$$f[-1]\n"}'`; \
-       wget http://orgmode.org/pkg/daily/$${pkgname}.tar -O $${pkgname}.tar; \
+       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"}'`; \
+       wget -q http://orgmode.org/elpa/$${pkgname}.tar -O $${pkgname}.tar; \
        if [ -f $${pkgname}.tar ]; then \
                tar xf $${pkgname}.tar; \
                rm -f $${pkgname}.tar; \
                mv $${pkgname} org; \
        fi
+
+clean:
+       rm -rf archive $(ARCHIVE_TMP) $(SITE_DIR)
+
+all: site