mirror of
https://github.com/emacscollective/emacs.g.git
synced 2025-07-26 11:24:25 -04:00
Merge branch 'master' into layer/essentials
This commit is contained in:
commit
6d95debefc
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -24,6 +24,9 @@
|
||||
[submodule "epkg"]
|
||||
path = lib/epkg
|
||||
url = git@github.com:emacscollective/epkg.git
|
||||
[submodule "ghub"]
|
||||
path = lib/ghub
|
||||
url = git@github.com:magit/ghub.git
|
||||
[submodule "git-modes"]
|
||||
path = lib/git-modes
|
||||
url = git@github.com:magit/git-modes.git
|
||||
|
71
Makefile
71
Makefile
@ -1,66 +1,7 @@
|
||||
# Copyright (C) 2016-2017 Jonas Bernoulli
|
||||
#
|
||||
# Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
# License: GPL v3 <https://www.gnu.org/licenses/gpl-3.0.txt>
|
||||
-include lib/borg/borg.mk
|
||||
|
||||
EMACS ?= emacs
|
||||
|
||||
.PHONY: all help build build-init quick bootstrap clean
|
||||
.FORCE:
|
||||
|
||||
all: build
|
||||
|
||||
SILENCIO = --load subr-x
|
||||
SILENCIO += --eval "(put 'if-let 'byte-obsolete-info nil)"
|
||||
SILENCIO += --eval "(put 'when-let 'byte-obsolete-info nil)"
|
||||
SILENCIO += --eval "(fset 'original-message (symbol-function 'message))"
|
||||
SILENCIO += --eval "(fset 'message\
|
||||
(lambda (format &rest args)\
|
||||
(unless (equal format \"pcase-memoize: equal first branch, yet different\")\
|
||||
(apply 'original-message format args))))"
|
||||
|
||||
help:
|
||||
$(info )
|
||||
$(info make [all|build] = rebuild all drones and init files)
|
||||
$(info make quick = rebuild most drones and init files)
|
||||
$(info make lib/DRONE = rebuild DRONE)
|
||||
$(info make build-init = rebuild init files)
|
||||
$(info make bootstrap = bootstrap collective or new drones)
|
||||
$(info make clean = remove all *.elc and *-autoloads.el)
|
||||
@printf "\n"
|
||||
|
||||
build:
|
||||
@rm -f init.elc
|
||||
@$(EMACS) -Q --batch -L lib/borg --load borg $(SILENCIO) \
|
||||
--funcall borg-initialize \
|
||||
--funcall borg-batch-rebuild 2>&1
|
||||
|
||||
build-init:
|
||||
@rm -f init.elc
|
||||
@$(EMACS) -Q --batch -L lib/borg --load borg \
|
||||
--funcall borg-initialize \
|
||||
--funcall borg-batch-rebuild-init 2>&1
|
||||
|
||||
quick:
|
||||
@rm -f init.elc
|
||||
@$(EMACS) -Q --batch -L lib/borg --load borg $(SILENCIO) \
|
||||
--funcall borg-initialize \
|
||||
--eval '(borg-batch-rebuild t)' 2>&1
|
||||
|
||||
lib/%: .FORCE
|
||||
@$(EMACS) -Q --batch -L lib/borg --load borg $(SILENCIO) \
|
||||
--funcall borg-initialize \
|
||||
--eval '(borg-build "$(@F)")' 2>&1
|
||||
|
||||
bootstrap:
|
||||
@printf "\n=== Running 'git submodule init' ===\n\n"
|
||||
@git submodule init
|
||||
@printf "\n=== Running 'bin/borg-bootstrap' ===\n"
|
||||
@bin/borg-bootstrap
|
||||
@printf "\n=== Running 'make build' ===\n\n"
|
||||
@make build
|
||||
|
||||
clean:
|
||||
@find lib -name '*-autoloads.el' -exec rm '{}' ';'
|
||||
@find lib -name '*.elc' -exec rm '{}' ';'
|
||||
@rm -f init.elc
|
||||
bootstrap-borg:
|
||||
@git submodule--helper clone --name borg --path lib/borg \
|
||||
--url git@github.com:emacscollective/borg.git
|
||||
@cd lib/borg; git symbolic-ref HEAD refs/heads/master
|
||||
@cd lib/borg; git reset --hard HEAD
|
||||
|
@ -1,82 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (C) 2016-2017 Jonas Bernoulli
|
||||
#
|
||||
# Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
# License: GPL v3 <https://www.gnu.org/licenses/gpl-3.0.txt>
|
||||
|
||||
hive_remote=$(git config -f .gitmodules borg.collective)
|
||||
push_remote=$(git config -f .gitmodules borg.pushDefault)
|
||||
|
||||
toplevel=$(git rev-parse --show-toplevel)
|
||||
test -n "$toplevel" || exit 2
|
||||
cd "$toplevel"
|
||||
|
||||
git submodule--helper list |
|
||||
while read mode sha1 stage path
|
||||
do
|
||||
if test -e "$path" && ! test -e "$path"/.git
|
||||
then
|
||||
name=$(git submodule--helper name "$path")
|
||||
|
||||
echo "\n--- [$name] ---\n"
|
||||
|
||||
git submodule--helper clone \
|
||||
--name "$name" \
|
||||
--path "$path" \
|
||||
--url $(git config -f .gitmodules submodule."$name".url)
|
||||
|
||||
git config -f .gitmodules --get-all submodule."$name".remote |
|
||||
while read remote remote_url
|
||||
do
|
||||
if ! test -e "$path"/.git
|
||||
then
|
||||
git submodule--helper clone \
|
||||
--name "$name" \
|
||||
--path "$path" \
|
||||
--url "$remote_url" &&
|
||||
git remote rename origin "$remote"
|
||||
else
|
||||
cd "$path"
|
||||
git remote add "$remote" "$remote_url"
|
||||
git fetch "$remote"
|
||||
cd "$toplevel"
|
||||
fi
|
||||
|
||||
if test -e "$path"/.git
|
||||
then
|
||||
cd "$path"
|
||||
if test "$remote" = "$hive_remote"
|
||||
then
|
||||
if test -e "$toplevel/.hive-maint"
|
||||
then
|
||||
git config remote.pushDefault "$remote"
|
||||
else
|
||||
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
test -n "$branch" &&
|
||||
git config branch.master.remote "$remote"
|
||||
fi
|
||||
elif test "$remote" = "$push_remote"
|
||||
then
|
||||
git config remote.pushDefault "$remote"
|
||||
fi
|
||||
cd "$toplevel"
|
||||
fi
|
||||
done
|
||||
|
||||
if test -e "$path"/.git
|
||||
then
|
||||
cd "$path"
|
||||
if ! git reset --hard "$sha1"
|
||||
then
|
||||
echo >&2 "futile: Checkout of '$sha1' into submodule path '$path' failed"
|
||||
git reset --hard HEAD
|
||||
exit 1
|
||||
fi
|
||||
cd "$toplevel"
|
||||
else
|
||||
echo >&2 "futile: Clone of any remote into submodule path '$path' failed"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
2
lib/borg
2
lib/borg
@ -1 +1 @@
|
||||
Subproject commit 4b908fd5b43dd9e48b3580b87cc77c4b65939f08
|
||||
Subproject commit 8399ec8f10204df92d5192823bb9bdeae7a4e3bc
|
2
lib/dash
2
lib/dash
@ -1 +1 @@
|
||||
Subproject commit 91d8cb01e62bab0d6267d3d4dbcabd6da6fdea78
|
||||
Subproject commit 528e5a51f1af668e3075f2beccd2b39785ccb2ba
|
1
lib/ghub
Submodule
1
lib/ghub
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 1395d56496c1581dda0c70a091500e2b947b8d35
|
@ -1 +1 @@
|
||||
Subproject commit 0ee62ee80eca660a5d05dab34bcf4b80a3ee749d
|
||||
Subproject commit 260e4afe32da63c32188b6a0b8262d3e3a011a2a
|
@ -1 +1 @@
|
||||
Subproject commit 865e931889f33495f3ce1b9e14b5b3e959887424
|
||||
Subproject commit 05a4033b830bf52c596ceedea10b2cbd91f85fdb
|
Loading…
x
Reference in New Issue
Block a user