mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
projects-dir.mk: Minor code beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
9b532fd601
commit
bd7f22e54e
1 changed files with 21 additions and 21 deletions
|
|
@ -93,16 +93,16 @@ endif
|
|||
|
||||
# ------------ external programs II
|
||||
|
||||
PGIT = /bin/bash $(MOD_SCRIPT_DIR)/pgit.sh
|
||||
BROWSER ?= xdg-open
|
||||
EDITOR ?= xdg-open
|
||||
PROJECTS_PY = python2 $(MOD_SCRIPT_DIR)/projects.py --prefix $(shell pwd) $(PROJECTS_PY_EXTRA_OPTS)
|
||||
PROJECTS_PY_BUILD = $(PROJECTS_PY) build $(PROJECTS_PY_EXTRA_BUILD_OPTS)
|
||||
PGIT_SH = /bin/bash $(MOD_SCRIPT_DIR)/pgit.sh
|
||||
PURGE_SH = /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/purge-stale-projects.sh /opt/jw-build/bin/purge-stale-projects.sh) purge-not-found)
|
||||
PKG_MANAGER_SH ?= /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/pkg-manager.sh /opt/jw-build/bin/pkg-manager.sh) pkg-manager-not-found)
|
||||
CREATE_PROJECT_SH ?= /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/jw-build-create-project.sh /opt/jw-build/bin/jw-build-create-project.sh) jw-build-create-project-not-found)
|
||||
LIST_VCS_FILES = /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/list-vcs-files.sh /opt/jw-build/bin/list-vcs-files.sh) list-vcs-files-not-found)
|
||||
LIST_VCS_FILES_SH = /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/list-vcs-files.sh /opt/jw-build/bin/list-vcs-files.sh) list-vcs-files-not-found)
|
||||
JW_PKG = /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/jw-pkg /opt/jw-build/bin/jw-pkg) jw-pkg-not-found)
|
||||
BROWSER ?= xdg-open
|
||||
EDITOR ?= xdg-open
|
||||
GIT_SRV_ADMIN_SH = JW_BUILD_SSH_EXTRA_OPTS="$(JW_BUILD_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@git.janware.com /opt/jw-build/bin/git-srv-admin.sh
|
||||
CVS_ADMIN_SH = JW_BUILD_SSH_EXTRA_OPTS="$(JW_BUILD_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@git.janware.com /opt/jw-build/bin/cvs-admin.sh
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ doc-project doc-module:
|
|||
status: $(SSH_WRAPPER_SH)
|
||||
for p in $(CVS_PROJECTS); do test -f $$d/CVS || echo $$p; done
|
||||
cvs status $(addsuffix VERSION,$(CVS_PROJECTS))
|
||||
$(PGIT) -uno status
|
||||
$(PGIT_SH) -uno status
|
||||
|
||||
build-order-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
|
||||
$(PROJECTS_PY_BUILD) --build-order $* $(TARGET_PROJECTS) | sed 's/ */\n/g'
|
||||
|
|
@ -169,7 +169,7 @@ edit-%: | $(TEXT_FILES_CACHE)
|
|||
|
||||
list-files:
|
||||
@for p in $(PROJECTS); do \
|
||||
$(LIST_VCS_FILES) -znf $$p | sed -z "s/^/$$p\//" | \
|
||||
$(LIST_VCS_FILES_SH) -znf $$p | sed -z "s/^/$$p\//" | \
|
||||
xargs -0 realpath ;\
|
||||
done
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ pull-all: purge cvs-update git-clone git-pull-all
|
|||
touch pull.done
|
||||
|
||||
diff-all diff: $(SSH_WRAPPER_SH)
|
||||
cvs diff -u; $(PGIT) diff
|
||||
cvs diff -u; $(PGIT_SH) diff
|
||||
|
||||
cvs-diff: $(SSH_WRAPPER_SH)
|
||||
cvs diff -u
|
||||
|
|
@ -285,39 +285,39 @@ cvs-update: $(SSH_WRAPPER_SH)
|
|||
make $@.done
|
||||
|
||||
git-push push: $(SSH_WRAPPER_SH)
|
||||
$(PGIT) push
|
||||
$(PGIT_SH) push
|
||||
|
||||
git-push-all: $(SSH_WRAPPER_SH)
|
||||
$(PGIT) push --all --recurse-submodules=on-demand
|
||||
$(PGIT_SH) push --all --recurse-submodules=on-demand
|
||||
|
||||
git-diff: $(SSH_WRAPPER_SH)
|
||||
$(PGIT) diff
|
||||
$(PGIT_SH) diff
|
||||
|
||||
git-short-diff: $(SSH_WRAPPER_SH)
|
||||
$(PGIT) diff --shortstat
|
||||
$(PGIT_SH) diff --shortstat
|
||||
|
||||
git-status:
|
||||
$(PGIT) status -uno
|
||||
$(PGIT_SH) status -uno
|
||||
|
||||
|
||||
git-pull: $(SSH_WRAPPER_SH)
|
||||
$(PGIT) clone
|
||||
$(PGIT_SH) clone
|
||||
|
||||
git-pull-mini: $(SSH_WRAPPER_SH)
|
||||
PGIT_CLONE_PROJECTS="$(patsubst %/.git,%,$(wildcard $(addsuffix /.git,$(shell make -s build-order))))" $(PGIT) clone
|
||||
PGIT_CLONE_PROJECTS="$(patsubst %/.git,%,$(wildcard $(addsuffix /.git,$(shell make -s build-order))))" $(PGIT_SH) clone
|
||||
|
||||
git-pull-all: $(SSH_WRAPPER_SH)
|
||||
$(PGIT) pull --all
|
||||
$(PGIT_SH) pull --all
|
||||
|
||||
git-clone: $(SSH_WRAPPER_SH)
|
||||
$(PGIT) clone
|
||||
$(PGIT_SH) clone
|
||||
touch clone.done
|
||||
|
||||
git-clone-%: $(SSH_WRAPPER_SH)
|
||||
PGIT_CLONE_FROM_USER=$* $(PGIT) clone
|
||||
PGIT_CLONE_FROM_USER=$* $(PGIT_SH) clone
|
||||
|
||||
git-show-non-master-branches:
|
||||
@$(PGIT) branch 2>&1 | \
|
||||
@$(PGIT_SH) branch 2>&1 | \
|
||||
sed '/^#\|^*/!d; s/.*git -C //; s/ *branch *//; s/ *\* *//' | \
|
||||
while read p; do \
|
||||
read b ;\
|
||||
|
|
@ -335,10 +335,10 @@ git-update-project-descriptions: $(SSH_WRAPPER_SH)
|
|||
$(GIT_SRV_ADMIN_SH) -j update-descriptions all
|
||||
|
||||
git-pull-%: $(SSH_WRAPPER_SH)
|
||||
PGIT_CLONE_FROM_USER=$* $(PGIT) clone
|
||||
PGIT_CLONE_FROM_USER=$* $(PGIT_SH) clone
|
||||
|
||||
git-commit:
|
||||
$(PGIT) commit
|
||||
$(PGIT_SH) commit
|
||||
|
||||
git-conv-%: $(SSH_WRAPPER_SH)
|
||||
[ -e $*/.git ] || { \
|
||||
|
|
@ -398,5 +398,5 @@ pull.done: $(filter-out $(UNAVAILABLE_TARGETS),cvs-update.done clone.done links.
|
|||
touch $@
|
||||
|
||||
clone.done: $(filter-out $(UNAVAILABLE_TARGETS),$(SSH_WRAPPER_SH))
|
||||
$(PGIT) clone
|
||||
$(PGIT_SH) clone
|
||||
touch $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue