mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
Everywhere: Remove everything non-essential for "make clean all"
This commit removes everything not strictly necessary for running "make clean all" inside jw-build. packaging jw-devtest. This cuts the repo down from 24077 to 4725 lines of code. The idea is to 1) Further remove bloat from the remaining bits 2) Re-add what's necessary to build and package other essential repos. The decision should be based on whether or not jw-build can also be useful in a non-janware context. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c36c83c164
commit
bc883deed4
199 changed files with 0 additions and 18851 deletions
|
|
@ -1,44 +0,0 @@
|
|||
# - Clone remote repo into <mydir>/<myrepo>
|
||||
# - Add the following to <mydir>/Makefile:
|
||||
# - SUBMOD_SRC_DIR = ./<myrepo>
|
||||
# - include <path-to-this-makefile>
|
||||
# - run git-init-submod-remote
|
||||
|
||||
ifeq ($(USE_USER_URL),true)
|
||||
JANWARE_USER_PREFIX = $(JANWARE_USER)@
|
||||
endif
|
||||
|
||||
SUBMOD_SRC_DIR ?= .
|
||||
GIT_SRV_ADMIN_SH = ssh $(JANWARE_USER_PREFIX)git.janware.com /opt/jw-build/bin/git-srv-admin.sh
|
||||
GIT_REPO_URL = ssh://$(JANWARE_USER_PREFIX)git.janware.com/srv/git/$(JANWARE_USER)/contrib/$(SUBMOD_PKG_NAME)
|
||||
SUBMOD_PATH = $(patsubst $(abspath $(TOPDIR))/%,%,$(abspath $(CWD)/$(SUBMOD_SRC_DIR)))
|
||||
SUB_GIT = git -C $(SUBMOD_SRC_DIR)
|
||||
|
||||
ifneq ($(wildcard $(SUBMOD_SRC_DIR)/.git),)
|
||||
SUBMOD_PKG_NAME := $(shell $(SUB_GIT) remote -v | sed -n 's/^[a-zA-Z_]\+\s//; s/ *.*//; s%.*/%%; s%\.git%%; 1p')
|
||||
SUBMOD_MAIN_BRANCH := $(firstword $(shell $(SUB_GIT) branch --format '%(refname:lstrip=2)'))
|
||||
endif
|
||||
|
||||
include $(JWBDIR)/make/defs.mk
|
||||
|
||||
all:
|
||||
install:
|
||||
clean:
|
||||
distclean:
|
||||
|
||||
git-init-submod-remote:
|
||||
[ "$(SUBMOD_PKG_NAME)" ] # SUBMOD_PKG_NAME
|
||||
[ "$(SUBMOD_MAIN_BRANCH)" ] # SUBMOD_MAIN_BRANCH
|
||||
[ "$(SUBMOD_SRC_DIR)" ] # SUBMOD_SRC_DIR
|
||||
[ "$(SUBMOD_PATH)" ] # SUBMOD_PATH
|
||||
[ "$(GIT_REPO_URL)" ] # GIT_REPO_URL
|
||||
$(GIT_SRV_ADMIN_SH) -F contrib create-repo $(SUBMOD_PKG_NAME)
|
||||
$(SUB_GIT) remote rename origin upstream
|
||||
$(SUB_GIT) remote set-url --push upstream no-push
|
||||
$(SUB_GIT) remote add origin $(GIT_REPO_URL)
|
||||
$(SUB_GIT) config branch.$(SUBMOD_MAIN_BRANCH).remote origin
|
||||
$(SUB_GIT) config branch.$(SUBMOD_MAIN_BRANCH).merge refs/heads/$(SUBMOD_MAIN_BRANCH)
|
||||
$(SUB_GIT) push origin $(SUBMOD_MAIN_BRANCH)
|
||||
git -C $(TOPDIR) submodule add -f $(GIT_REPO_URL) $(SUBMOD_PATH)
|
||||
git submodule init
|
||||
git commit -m "Add git submodule $(SUBMOD_PATH)" $(SUBMOD_SRC_DIR) $(TOPDIR)/.gitmodules
|
||||
Loading…
Add table
Add a link
Reference in a new issue