summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elpa/Makefile.in40
-rwxr-xr-xelpa/bin/deploy-elpa28
-rwxr-xr-xelpa/bin/deploy-to-core69
3 files changed, 97 insertions, 40 deletions
diff --git a/elpa/Makefile.in b/elpa/Makefile.in
index c4c25261610..14737dc9927 100644
--- a/elpa/Makefile.in
+++ b/elpa/Makefile.in
@@ -1,9 +1,4 @@
-all: ensure-dir repo working/pabbrev
-
-ensure-dir:
- - mkdir working
- - mkdir ../lisp/elpa
- - mkdir ../test/lisp/elpa
+all: repo working/pabbrev working/stream working/sml-mode working/seq
repo:
git clone --mirror https://git.savannah.gnu.org/git/emacs/elpa.git repo
@@ -11,13 +6,34 @@ repo:
repo-update: repo
cd repo;git fetch --all
-working/pabbrev:
- ./bin/deploy-elpa d28cf8632d2691dc93afbb28500126242d37961c pabbrev
+.PHONY: repo-update
+
+## pabbrev is an external -- so it's on a branch
+## d28cf86 is the last release of pabbrev
+working/pabbrev: Makefile.in
+ ./bin/deploy-to-core -e d28cf86 pabbrev
+
+## stream is interesting because it has tests. Also, while it does not
+## have an info there is a stream.info in core which documents
+## something else.
+## 110b174643707 was master/HEAD when I happened to checkout elpa
+working/stream: Makefile.in
+ ./bin/deploy-to-core 110b174643707 stream
+
+working/sml-mode: Makefile.in
+ ./bin/deploy-to-core -d progmodes 110b174643707 sml-mode
+
+working/seq: Makefile.in
+ ./bin/deploy-to-core -d emacs-lisp 110b174643707 seq
+
clean:
- rm -rf working
- rm -rf ../lisp/elpa
- rm -rf ../test/lisp/elpa
+ - rm -rf working
+ - rm -rf ../lisp/elpa
+ - rm -rf ../test/lisp/elpa
distclean: clean
- rm -rf repo
+ - rm -rf repo
+
+
+.PHONY: clean distclean
diff --git a/elpa/bin/deploy-elpa b/elpa/bin/deploy-elpa
deleted file mode 100755
index 6a826495aac..00000000000
--- a/elpa/bin/deploy-elpa
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-shopt -s extglob
-
-generate_source(){
- git_treeish=$1
- package_name=$2
-
- echo git_treeish $git_treeish
- echo package_name $package_name
- mkdir working/$package_name
-
- cd repo
- git archive $git_treeish | tar xv --directory ../working/$package_name
- cd ..
-}
-
-deploy_source(){
- package_name=$1
-
- cd working/$package_name
- rsync -i --ignore-missing-args *!(test)*.el ../../../lisp/elpa
- rsync -i --ignore-missing-args *.texi ../../../doc/elpa
- rsync -i --ignore-missing-args *test*.el ../../../test/lisp/elpa
-}
-
-generate_source $1 $2
-deploy_source $2
diff --git a/elpa/bin/deploy-to-core b/elpa/bin/deploy-to-core
new file mode 100755
index 00000000000..77eafca0c16
--- /dev/null
+++ b/elpa/bin/deploy-to-core
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+shopt -s extglob
+
+ensure_dir(){
+ mkdir -p working
+ mkdir -p ../lisp/elpa
+ mkdir -p ../lisp/elpa/$SUBDIR
+ mkdir -p ../test/lisp/elpa
+ mkdir -p ../test/lisp/elpa/$SUBDIR
+}
+
+
+generate_source(){
+ git_treeish=$1
+ package_name=$2
+
+ mkdir -p working/$package_name
+
+ cd repo
+ if [ "$EXTERNAL" = true ] ; then
+ git archive $git_treeish | tar xv --directory ../working/$package_name
+ else
+ git archive $git_treeish packages/$package_name | \
+ tar xv --strip=2 --directory ../working/$package_name
+ fi
+
+ cd ..
+}
+
+deploy_source(){
+ package_name=$1
+
+ cd working/$package_name
+ if [ -e core-deploy.sh ]
+ then
+ ## General extensibility point for complicated packages
+ ./core-deploy.sh
+ else
+ rsync -i --ignore-missing-args *!(tests)*.el ../../../lisp/elpa/$SUBDIR
+ rsync -i --ignore-missing-args *.texi ../../../doc/elpa/$SUBDIR
+ rsync -i --ignore-missing-args *tests*.el ../../../test/lisp/elpa/$SUBDIR
+ if [ -e tests ]
+ then
+ rsync -i --ignore-missing-args tests/*.el ../../../test/lisp/elpa/$SUBDIR
+ fi
+ fi
+}
+
+
+SUBDIR=
+EXTERNAL=false
+
+while getopts "ed:" opt; do
+ case $opt in
+ e)
+ EXTERNAL=true
+ ;;
+ d)
+ SUBDIR=$OPTARG
+ ;;
+ esac
+done
+
+shift $((OPTIND -1))
+
+ensure_dir
+generate_source $1 $2
+deploy_source $2