mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-27 23:43:54 +01:00
topdir.mk: Beautify topdir.mk (untested)
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
768c3d6133
commit
c17142388c
1 changed files with 32 additions and 32 deletions
|
|
@ -5,10 +5,15 @@ distclean: topdir.distclean
|
||||||
config:
|
config:
|
||||||
mrproper:distclean topdir.mrproper
|
mrproper:distclean topdir.mrproper
|
||||||
|
|
||||||
SUBDIRS ?= $(wildcard inst/pre make scripts contrib src libsrc tools include lib bin \
|
SUBDIRS ?= $(wildcard inst/pre make scripts contrib src libsrc \
|
||||||
util plugins conf config cfg images doc test inst/post)
|
tools include lib bin util plugins conf config cfg \
|
||||||
|
images doc test inst/post)
|
||||||
PROJECT_DESCR = $(TOPDIR)/make/project.conf
|
PROJECT_DESCR = $(TOPDIR)/make/project.conf
|
||||||
|
GIT_DESCR = $(TOPDIR)/.git/description
|
||||||
|
WHOAMI = $(shell whoami)
|
||||||
|
REMOTE_GIT_DIR = /srv/git/$(WHOAMI)/proj/$(PROJECT)
|
||||||
|
REMOTE_GIT_URL = ssh://$(WHOAMI)@git.jannet.de$(REMOTE_GIT_DIR)
|
||||||
|
|
||||||
|
|
||||||
ifneq ($(wildcard $(TOPDIR)/make/defs.mk),)
|
ifneq ($(wildcard $(TOPDIR)/make/defs.mk),)
|
||||||
include $(TOPDIR)/make/defs.mk
|
include $(TOPDIR)/make/defs.mk
|
||||||
|
|
@ -43,13 +48,6 @@ topdir.mrproper:
|
||||||
|
|
||||||
topdir.install: prefix.done $(INSTALLED_TOPDIR_FILES)
|
topdir.install: prefix.done $(INSTALLED_TOPDIR_FILES)
|
||||||
|
|
||||||
prefix.done:
|
|
||||||
mkdir -p $(PREFIX)
|
|
||||||
touch $@
|
|
||||||
|
|
||||||
install-links:
|
|
||||||
DEVELOPMENT=false make do-install-links
|
|
||||||
|
|
||||||
do-install-links:
|
do-install-links:
|
||||||
@@cwd=`pwd`; \
|
@@cwd=`pwd`; \
|
||||||
echo "o in $(INSTALL_LIBDIR):" ;\
|
echo "o in $(INSTALL_LIBDIR):" ;\
|
||||||
|
|
@ -89,25 +87,15 @@ do-install-links:
|
||||||
}; \
|
}; \
|
||||||
done; \
|
done; \
|
||||||
|
|
||||||
git-init:
|
install-links:
|
||||||
@if [ -e .git ]; then \
|
DEVELOPMENT=false make do-install-links
|
||||||
echo $(TOPDIR)/.git exists, aborting ;\
|
|
||||||
exit 1 ;\
|
git-init: git-init.done $(GIT_DESCR)
|
||||||
fi
|
|
||||||
git init
|
|
||||||
if [ -e $(PROJECT_DESCR_FILE) ]; then \
|
|
||||||
touch $(PROJECT_DESCR_FILE) ;\
|
|
||||||
make description ;\
|
|
||||||
fi
|
|
||||||
|
|
||||||
git-init-from-cvs: git-init
|
git-init-from-cvs: git-init
|
||||||
list-cvs-files.sh -f | xargs git add
|
list-cvs-files.sh -f | xargs git add
|
||||||
git commit -m "initial checkin of $(RPM_VERSION)"
|
git commit -m "initial checkin of $(RPM_VERSION)"
|
||||||
|
|
||||||
WHOAMI = $(shell whoami)
|
|
||||||
REMOTE_GIT_DIR = /srv/git/$(WHOAMI)/proj/$(PROJECT)
|
|
||||||
REMOTE_GIT_URL = ssh://$(WHOAMI)@git.jannet.de$(REMOTE_GIT_DIR)
|
|
||||||
|
|
||||||
git-config:
|
git-config:
|
||||||
git config --global user.name $(FULL_NAME)
|
git config --global user.name $(FULL_NAME)
|
||||||
git config --global user.email $(WHOAMI)@jannet.de
|
git config --global user.email $(WHOAMI)@jannet.de
|
||||||
|
|
@ -122,22 +110,34 @@ git-clone-to-remote:
|
||||||
|
|
||||||
git-import: git-init git-config
|
git-import: git-init git-config
|
||||||
git add -A
|
git add -A
|
||||||
git commit -am "o initial checkin"
|
git commit -am "initial checkin"
|
||||||
|
|
||||||
git-jannet-init: git-import git-clone-to-remote
|
git-init-remote: git-import git-clone-to-remote
|
||||||
|
|
||||||
|
git-descr: $(GIT_DESCR)
|
||||||
|
|
||||||
projects-%:
|
projects-%:
|
||||||
python $(MOD_SCRIPT_DIR)/build.py $* $(PROJECT)
|
python $(MOD_SCRIPT_DIR)/build.py $* $(PROJECT)
|
||||||
|
|
||||||
$(TOPDIR)/.git/description: $(PROJECT_DESCR_FILE)
|
|
||||||
$(MOD_SCRIPT_DIR)/ini-section.sh summary $< | tee $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
description: $(TOPDIR)/.git/description
|
|
||||||
|
|
||||||
install-deps-devel:
|
install-deps-devel:
|
||||||
sudo zypper in $(shell echo $(RPM_REQUIRES_DEVEL) | sed "s/ *= */-/g; s/ [^ ]\+-__NEXT_VERSION__//")
|
sudo zypper in $(shell echo $(RPM_REQUIRES_DEVEL) | sed "s/ *= */-/g; s/ [^ ]\+-__NEXT_VERSION__//")
|
||||||
|
|
||||||
streamline:
|
streamline:
|
||||||
$(STREAMLINE_PROJECT)
|
$(STREAMLINE_PROJECT)
|
||||||
|
|
||||||
|
$(GIT_DESCR): $(PROJECT_DESCR_FILE)
|
||||||
|
$(MOD_SCRIPT_DIR)/ini-section.sh summary $< | tee $@.tmp
|
||||||
|
mv $@.tmp $@
|
||||||
|
|
||||||
|
git-init.done:
|
||||||
|
@if [ -e .git ]; then \
|
||||||
|
echo $(TOPDIR)/.git already exists, not running git init ;\
|
||||||
|
else \
|
||||||
|
git init; \
|
||||||
|
fi
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
prefix.done:
|
||||||
|
mkdir -p $(PREFIX)
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue