]> git.eshelyaron.com Git - emacs.git/commitdiff
Configurable location for git checkout
authorPhillip Lord <phillip.lord@russet.org.uk>
Fri, 25 Jan 2019 21:08:22 +0000 (21:08 +0000)
committerPhillip Lord <phillip.lord@russet.org.uk>
Fri, 25 Jan 2019 21:08:22 +0000 (21:08 +0000)
configure.ac
elpa/Makefile.in
elpa/bin/extract-package.sh

index b6f760e378be6d9785a33808c178e4f4da4cf748..9b47db955f0f68b6ab8a9687d1b54740a646af80 100644 (file)
@@ -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,
index 91c003807721b3c6a8fa1aa6eee7c2df455256f3..2a3b28dbb8d93fee7b09c64bb612e8039c580ab1 100644 (file)
@@ -1,12 +1,17 @@
-ELPA_IN_CORE=@ELPA_IN_CORE@
 ELPA_LOCAL_PATH=@ELPA_LOCAL_PATH@
+
+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))
 
index 507b1dbf855198ae5dbeec91c587f1beda7a4e3f..cb2da55d20cbe20ac167c0cf060889203cf7f56c 100755 (executable)
@@ -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