emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] feature/core-elpa-by-copy 9594e37 09/13: Configurable loca


From: Phillip Lord
Subject: [Emacs-diffs] feature/core-elpa-by-copy 9594e37 09/13: Configurable location for git checkout
Date: Sat, 26 Jan 2019 05:29:37 -0500 (EST)

branch: feature/core-elpa-by-copy
commit 9594e3711ef55a696bd764ed782cf4e54d37fa20
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>

    Configurable location for git checkout
---
 configure.ac                |  4 +++-
 elpa/Makefile.in            | 24 +++++++++++++++---------
 elpa/bin/extract-package.sh | 15 +++++++++------
 3 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/configure.ac b/configure.ac
index b6f760e..9b47db9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -545,8 +545,10 @@ fi)
 AC_ARG_ENABLE(elpa,
 [AS_HELP_STRING([--enable-elpa],
                [Copy Selected ELPA files into core])],
-  ELPA_IN_CORE=$enableval,
+  ELPA_IN_CORE=yes
+  ELPA_LOCAL_PATH=$enableval,
   ELPA_IN_CORE=
+  ELPA_LOCAL_PATH=
 )
 
 AC_ARG_ENABLE(checking,
diff --git a/elpa/Makefile.in b/elpa/Makefile.in
index 91c0038..2a3b28d 100644
--- a/elpa/Makefile.in
+++ b/elpa/Makefile.in
@@ -1,12 +1,17 @@
address@hidden@
 address@hidden@
+
+ifdef ELPA_LOCAL_PATH
+       ELPA_PATH=$(ELPA_LOCAL_PATH)
+else
+       ELPA_PATH=elpa-git
+endif
+
 ## Get this stuff from above
 dirstate = .git/logs/HEAD
 VCSWITNESS = $(if $(wildcard $(srcdir)/$(dirstate)),$$(srcdir)/../$(dirstate))
 
 
-all:
-       echo Lets build ELPA!
+all: all-packages
 
 ../lisp/elpa:
        mkdir ../lisp/elpa
@@ -17,12 +22,12 @@ all:
 packages:
        mkdir packages
 
-# The location of this needs to be configurable in some way
-elpa-git:
-       git clone --mirror https://git.savannah.gnu.org/git/emacs/elpa.git 
elpa-git
+$(ELPA_PATH):
+       echo Hello: $(ELPA_PATH)
+       git clone --mirror https://git.savannah.gnu.org/git/emacs/elpa.git 
$(ELPA_PATH)
 
-elpa-update: $(VCSWITNESS) elpa-git
-       cd elpa-git;git fetch --all
+elpa-update: $(VCSWITNESS) $(ELPA_PATH)
+       cd $(ELPA_PATH);git fetch --all
 
 directories: packages ../lisp/elpa ../test/lisp/elpa
 
@@ -31,7 +36,7 @@ directories: packages ../lisp/elpa ../test/lisp/elpa
 PACKAGES=
 define package_template
   packages/$(1)-$(2): elpa-update directories
-       ./bin/extract-package.sh -p $(1) -s $(2) $(3)
+       ./bin/extract-package.sh -g $$(ELPA_PATH) -p $(1) -s $(2) $(3)
 
   $(1): packages/$(1)-$(2)
        $$(MAKE) -C packages/$(1)-$(2)/$(1) -f package-makefile.mk deploy 
PACKAGE=$(1)
@@ -41,6 +46,7 @@ endef
 
 $(info $(call 
package_template,pabbrev,d28cf8632d2691dc93afbb28500126242d37961c,-e))
 $(eval $(call 
package_template,pabbrev,d28cf8632d2691dc93afbb28500126242d37961c,-e))
+
 $(eval $(call 
package_template,darkroom,73701d95133ba6581a95cec9489224b87f483cc0))
 $(eval $(call package_template,queue,cf2001d3e83e05af5820174e9fa1f9638a4f8c08))
 
diff --git a/elpa/bin/extract-package.sh b/elpa/bin/extract-package.sh
index 507b1db..cb2da55 100755
--- a/elpa/bin/extract-package.sh
+++ b/elpa/bin/extract-package.sh
@@ -3,10 +3,10 @@
 function grab_external {
     rm -rf packages/$PACKAGE*
     mkdir --parents $PACKAGE_LOC
-    cd elpa-git
+    pushd $GIT_LOC
     git archive $SHA \
         | tar xv -C ../$PACKAGE_LOC
-    cd ..
+    popd
     cp --no-clobber bin/package-makefile.mk $PACKAGE_LOC
 }
 
@@ -14,18 +14,18 @@ function grab_external {
 function grab_subtree {
     rm -rf packages/*$PACKAGE
     mkdir --parents $PACKAGE_LOC
-    cd elpa-git
+    pushd $GIT_LOC
     git archive $SHA packages/$PACKAGE \
         | tar xv  --strip-components=2 -C ../$PACKAGE_LOC
-    cd ..
+    popd
     cp --no-clobber bin/package-makefile.mk $PACKAGE_LOC
 }
 
 SHA=
 PACKAGE=
 EXTERNAL=0
-
-while getopts "s:p:e" opt; do
+GIT_LOC=
+while getopts "g:s:p:e" opt; do
     case $opt in
         s)
             SHA=$OPTARG
@@ -36,6 +36,9 @@ while getopts "s:p:e" opt; do
         e)
             EXTERNAL=1
             ;;
+        g)
+            GIT_LOC=$OPTARG
+            ;;
     esac
 done
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]