mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-24 22:50:39 +01:00
projects-dir.mk: Make ssh-wrapper.sh a variable
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
e09a91418d
commit
a200aa70b2
1 changed files with 28 additions and 28 deletions
|
|
@ -43,8 +43,10 @@ EXCLUDE_FROM_BUILD += \
|
||||||
|
|
||||||
# ------------ external programs I
|
# ------------ external programs I
|
||||||
|
|
||||||
|
CWD := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||||
MOD_SCRIPT_DIR = ./jw-build/scripts
|
MOD_SCRIPT_DIR = ./jw-build/scripts
|
||||||
GET_OS_SH = /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/get-os.sh /opt/jw-build/bin/get-os.sh) get-os-sh-not-found)
|
GET_OS_SH = /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/get-os.sh /opt/jw-build/bin/get-os.sh) get-os-sh-not-found)
|
||||||
|
SSH_WRAPPER_SH := $(CWD)/ssh-wrapper.sh
|
||||||
|
|
||||||
EXCLUDES_FILE ?= exclude.txt
|
EXCLUDES_FILE ?= exclude.txt
|
||||||
EXCLUDES_FILES = exclude-$(shell $(GET_OS_SH) name).txt exclude-$(shell $(GET_OS_SH)).txt $(EXCLUDES_FILE)
|
EXCLUDES_FILES = exclude-$(shell $(GET_OS_SH) name).txt exclude-$(shell $(GET_OS_SH)).txt $(EXCLUDES_FILE)
|
||||||
|
|
@ -62,14 +64,12 @@ else
|
||||||
UNAVAILABLE_TARGETS ?=
|
UNAVAILABLE_TARGETS ?=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CWD := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
|
||||||
|
|
||||||
export CVSROOT = :ext:$(JANWARE_USER)@cvs.jannet.de:/home/jannet/arc/cvs
|
export CVSROOT = :ext:$(JANWARE_USER)@cvs.jannet.de:/home/jannet/arc/cvs
|
||||||
|
|
||||||
ifneq ($(JW_BUILD_SSH),)
|
ifneq ($(JW_BUILD_SSH),)
|
||||||
export CVS_RSH := $(JW_BUILD_SSH)
|
export CVS_RSH := $(JW_BUILD_SSH)
|
||||||
else
|
else
|
||||||
export CVS_RSH := $(CWD)/ssh-wrapper.sh
|
export CVS_RSH := $(SSH_WRAPPER_SH)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export GIT_SSH := $(CVS_RSH)
|
export GIT_SSH := $(CVS_RSH)
|
||||||
|
|
@ -173,12 +173,12 @@ pkg-init-%:
|
||||||
doc-project doc-module:
|
doc-project doc-module:
|
||||||
$(BROWSER) $(firstword $(shell sed '/https:/ !d; s%.*https%https%; s/ .*//' $(firstword $(MAKEFILE_LIST))))
|
$(BROWSER) $(firstword $(shell sed '/https:/ !d; s%.*https%https%; s/ .*//' $(firstword $(MAKEFILE_LIST))))
|
||||||
|
|
||||||
status: ssh-wrapper.sh
|
status: $(SSH_WRAPPER_SH)
|
||||||
for p in $(CVS_PROJECTS); do test -f $$d/CVS || echo $$p; done
|
for p in $(CVS_PROJECTS); do test -f $$d/CVS || echo $$p; done
|
||||||
cvs status $(addsuffix VERSION,$(CVS_PROJECTS))
|
cvs status $(addsuffix VERSION,$(CVS_PROJECTS))
|
||||||
$(PGIT) status
|
$(PGIT) status
|
||||||
|
|
||||||
purge: ssh-wrapper.sh
|
purge: $(SSH_WRAPPER_SH)
|
||||||
ifneq ($(wildcard CVS),)
|
ifneq ($(wildcard CVS),)
|
||||||
$(PURGE_SH)
|
$(PURGE_SH)
|
||||||
endif
|
endif
|
||||||
|
|
@ -195,47 +195,47 @@ pull-all: purge cvs-update git-clone git-pull-all
|
||||||
touch clone.done
|
touch clone.done
|
||||||
touch pull.done
|
touch pull.done
|
||||||
|
|
||||||
diff-all diff: ssh-wrapper.sh
|
diff-all diff: $(SSH_WRAPPER_SH)
|
||||||
cvs diff -u; $(PGIT) diff
|
cvs diff -u; $(PGIT) diff
|
||||||
|
|
||||||
rebuild: clean purge pull subdirs-all
|
rebuild: clean purge pull subdirs-all
|
||||||
|
|
||||||
release: ssh-wrapper.sh
|
release: $(SSH_WRAPPER_SH)
|
||||||
$(RELEASE_SH)
|
$(RELEASE_SH)
|
||||||
|
|
||||||
subdirs-%:
|
subdirs-%:
|
||||||
FORCE_REBUILD_SUBDIRS=true make $*
|
FORCE_REBUILD_SUBDIRS=true make $*
|
||||||
|
|
||||||
cvs-update: ssh-wrapper.sh
|
cvs-update: $(SSH_WRAPPER_SH)
|
||||||
rm -f $@.done
|
rm -f $@.done
|
||||||
make $@.done
|
make $@.done
|
||||||
|
|
||||||
cvs-diff: ssh-wrapper.sh
|
cvs-diff: $(SSH_WRAPPER_SH)
|
||||||
cvs diff -u
|
cvs diff -u
|
||||||
|
|
||||||
git-push push: ssh-wrapper.sh
|
git-push push: $(SSH_WRAPPER_SH)
|
||||||
$(PGIT) push
|
$(PGIT) push
|
||||||
|
|
||||||
git-push-all: ssh-wrapper.sh
|
git-push-all: $(SSH_WRAPPER_SH)
|
||||||
$(PGIT) push --all
|
$(PGIT) push --all
|
||||||
|
|
||||||
git-diff: ssh-wrapper.sh
|
git-diff: $(SSH_WRAPPER_SH)
|
||||||
$(PGIT) diff
|
$(PGIT) diff
|
||||||
|
|
||||||
git-short-diff: ssh-wrapper.sh
|
git-short-diff: $(SSH_WRAPPER_SH)
|
||||||
$(PGIT) diff --shortstat
|
$(PGIT) diff --shortstat
|
||||||
|
|
||||||
git-pull: ssh-wrapper.sh
|
git-pull: $(SSH_WRAPPER_SH)
|
||||||
$(PGIT) clone
|
$(PGIT) clone
|
||||||
|
|
||||||
git-pull-all: ssh-wrapper.sh
|
git-pull-all: $(SSH_WRAPPER_SH)
|
||||||
$(PGIT) pull --all
|
$(PGIT) pull --all
|
||||||
|
|
||||||
git-clone: ssh-wrapper.sh
|
git-clone: $(SSH_WRAPPER_SH)
|
||||||
$(PGIT) clone
|
$(PGIT) clone
|
||||||
touch clone.done
|
touch clone.done
|
||||||
|
|
||||||
git-clone-%: ssh-wrapper.sh
|
git-clone-%: $(SSH_WRAPPER_SH)
|
||||||
PGIT_CLONE_FROM_USER=$* $(PGIT) clone
|
PGIT_CLONE_FROM_USER=$* $(PGIT) clone
|
||||||
|
|
||||||
git-show-non-master-branches:
|
git-show-non-master-branches:
|
||||||
|
|
@ -248,13 +248,13 @@ git-show-non-master-branches:
|
||||||
fi ;\
|
fi ;\
|
||||||
done
|
done
|
||||||
|
|
||||||
pull-%: ssh-wrapper.sh
|
pull-%: $(SSH_WRAPPER_SH)
|
||||||
PGIT_CLONE_FROM_USER=$* $(PGIT) clone
|
PGIT_CLONE_FROM_USER=$* $(PGIT) clone
|
||||||
|
|
||||||
git-commit:
|
git-commit:
|
||||||
$(PGIT) commit
|
$(PGIT) commit
|
||||||
|
|
||||||
git-conv-%: ssh-wrapper.sh
|
git-conv-%: $(SSH_WRAPPER_SH)
|
||||||
[ -e $*/.git ] || { \
|
[ -e $*/.git ] || { \
|
||||||
mv $* old/ ;\
|
mv $* old/ ;\
|
||||||
if PROJECTS="$*" make clone; then \
|
if PROJECTS="$*" make clone; then \
|
||||||
|
|
@ -264,15 +264,15 @@ git-conv-%: ssh-wrapper.sh
|
||||||
fi \
|
fi \
|
||||||
}
|
}
|
||||||
|
|
||||||
check-conv: ssh-wrapper.sh
|
check-conv: $(SSH_WRAPPER_SH)
|
||||||
for p in `$(GIT_SRV_ADMIN_SH) -u jan -j list-personal-projects`; do \
|
for p in `$(GIT_SRV_ADMIN_SH) -u jan -j list-personal-projects`; do \
|
||||||
make git-conv-$$p ;\
|
make git-conv-$$p ;\
|
||||||
done
|
done
|
||||||
|
|
||||||
list-maintainers: ssh-wrapper.sh
|
list-maintainers: $(SSH_WRAPPER_SH)
|
||||||
$(GIT_SRV_ADMIN_SH) $@
|
$(GIT_SRV_ADMIN_SH) $@
|
||||||
|
|
||||||
git-update-project-descriptions: ssh-wrapper.sh
|
git-update-project-descriptions: $(SSH_WRAPPER_SH)
|
||||||
$(GIT_SRV_ADMIN_SH) -j update-descriptions all
|
$(GIT_SRV_ADMIN_SH) -j update-descriptions all
|
||||||
|
|
||||||
projects.txt:
|
projects.txt:
|
||||||
|
|
@ -286,16 +286,16 @@ links.done:
|
||||||
if [ -d dspc/src/shared ]; then ln -sf dspc/src/shared dspider-shared; fi
|
if [ -d dspc/src/shared ]; then ln -sf dspc/src/shared dspider-shared; fi
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
ssh-wrapper.sh: Makefile
|
$(SSH_WRAPPER_SH): Makefile
|
||||||
/bin/echo -e '#!/bin/bash -x\n\nexec /usr/bin/ssh $$JW_BUILD_SSH_EXTRA_OPTS "$$@"' > $@.tmp
|
/bin/echo -e '#!/bin/bash -x\n\nexec /usr/bin/ssh $$JW_BUILD_SSH_EXTRA_OPTS "$$@"' > $@.tmp
|
||||||
chmod 700 $@.tmp
|
chmod 700 $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
ssh-wrapper: ssh-wrapper.sh
|
ssh-wrapper: $(SSH_WRAPPER_SH)
|
||||||
clean.ssh-wrapper:
|
clean.ssh-wrapper:
|
||||||
rm -f ssh-wrapper.sh
|
rm -f $(SSH_WRAPPER_SH)
|
||||||
clean: clean.ssh-wrapper
|
clean: clean.ssh-wrapper
|
||||||
|
|
||||||
cvsdir.done: ssh-wrapper.sh
|
cvsdir.done: $(SSH_WRAPPER_SH)
|
||||||
if [ ! -d CVS ]; then \
|
if [ ! -d CVS ]; then \
|
||||||
mkdir CVS && \
|
mkdir CVS && \
|
||||||
echo :ext:$(JANWARE_USER)@cvs.jannet.de:/home/jannet/arc/cvs > CVS/Root && \
|
echo :ext:$(JANWARE_USER)@cvs.jannet.de:/home/jannet/arc/cvs > CVS/Root && \
|
||||||
|
|
@ -304,7 +304,7 @@ cvsdir.done: ssh-wrapper.sh
|
||||||
fi
|
fi
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
cvs-update.done: $(filter-out $(UNAVAILABLE_TARGETS),cvsdir.done ssh-wrapper.sh)
|
cvs-update.done: $(filter-out $(UNAVAILABLE_TARGETS),cvsdir.done $(SSH_WRAPPER_SH))
|
||||||
cvs update -dP Makefile $(shell $(CVS_ADMIN_SH) list-projects)
|
cvs update -dP Makefile $(shell $(CVS_ADMIN_SH) list-projects)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
|
@ -313,7 +313,7 @@ update.done: purge
|
||||||
pull.done: $(filter-out $(UNAVAILABLE_TARGETS),cvs-update.done clone.done links.done)
|
pull.done: $(filter-out $(UNAVAILABLE_TARGETS),cvs-update.done clone.done links.done)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
clone.done: $(filter-out $(UNAVAILABLE_TARGETS),ssh-wrapper.sh)
|
clone.done: $(filter-out $(UNAVAILABLE_TARGETS),$(SSH_WRAPPER_SH))
|
||||||
$(PGIT) clone
|
$(PGIT) clone
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue