Makefile added with new status and init concept
This commit is contained in:
parent
184e153307
commit
7c3562737c
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,9 +4,6 @@
|
||||
[submodule "starter"]
|
||||
path = starter
|
||||
url = https://git.mount-mockery.de/dirk/starter.git
|
||||
[submodule "nemo"]
|
||||
path = nemo
|
||||
url = https://git.mount-mockery.de/dirk/nemo.git
|
||||
[submodule "loggy"]
|
||||
path = loggy
|
||||
url = https://git.mount-mockery.de/application/loggy.git
|
||||
|
79
Makefile
Normal file
79
Makefile
Normal file
@ -0,0 +1,79 @@
|
||||
# Version 1.1 (2025-08-05)
|
||||
default: help
|
||||
|
||||
.ONESHELL:
|
||||
SHELL = /usr/bin/bash
|
||||
.SILENT:
|
||||
|
||||
GIT_FLAG = ./.git
|
||||
VENV_FLAG = ./.venv_required
|
||||
VENV_FOLDER = ./venv
|
||||
INIT_FILE = ./init
|
||||
|
||||
help:
|
||||
echo "Possible options are: init, status, venv_flag, clean, cleanall"
|
||||
|
||||
init: print_head
|
||||
# Init git repo
|
||||
if [[ -e $(GIT_FLAG) ]]; then
|
||||
git submodule init
|
||||
git submodule update
|
||||
fi
|
||||
# Create venv if needed
|
||||
if [[ -e $(VENV_FLAG) ]]; then
|
||||
if [[ ! -e $(VENV_FOLDER) ]]; then
|
||||
mkvenv
|
||||
fi
|
||||
fi
|
||||
if [[ -x $(INIT_FILE) ]]; then
|
||||
$(INIT_FILE)
|
||||
fi
|
||||
|
||||
initall:
|
||||
for subdir in $$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort); do
|
||||
$(MAKE) --no-print-directory -C $$(dirname $$subdir) init
|
||||
done
|
||||
|
||||
status: print_head
|
||||
giti
|
||||
echo "Submodules:"
|
||||
echo "-----------"
|
||||
git submodule --quiet foreach giti
|
||||
|
||||
statusall:
|
||||
for subdir in $$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort); do
|
||||
$(MAKE) --no-print-directory -C $$(dirname $$subdir) status
|
||||
done
|
||||
|
||||
clean:
|
||||
if [[ ! -e $(VENV_FLAG) ]]; then
|
||||
if [[ -d $(VENV_FOLDER) ]]; then
|
||||
rm -rf $(VENV_FOLDER)
|
||||
fi
|
||||
fi
|
||||
|
||||
cleanall: clean
|
||||
for subdir in $$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort); do
|
||||
$(MAKE) --no-print-directory -C $$(dirname $$subdir) cleanall
|
||||
done
|
||||
|
||||
|
||||
venv_flag:
|
||||
if [[ ! -e $(VENV_FLAG) ]]; then
|
||||
touch $(VENV_FLAG)
|
||||
if [[ -e $(GIT_FLAG) ]]; then
|
||||
git add $(VENV_FLAG)
|
||||
fi
|
||||
fi
|
||||
|
||||
print_head:
|
||||
DIRNAME=$$(basename $$(pwd))
|
||||
DIRLENGTH=$${#DIRNAME}
|
||||
echo -ne "\n\n\033[1;34m╔═"
|
||||
for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done
|
||||
echo -e "═╗"
|
||||
echo -e "║ $$DIRNAME ║"
|
||||
echo -ne "╚═"
|
||||
for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done
|
||||
echo -e "═╝\033[00m"
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit d2f1d1d0e1523a43c28742e9c1570b784ee6e01a
|
||||
Subproject commit d6ead58012f892f4457f8f8fe68d1dcb837363f5
|
2
loggy
2
loggy
@ -1 +1 @@
|
||||
Subproject commit c10d8911ce479b1dfd7415244f7993076f9add87
|
||||
Subproject commit 38f8e67c627c5213716959634c6a1769d613596e
|
@ -1 +1 @@
|
||||
Subproject commit fa7c63f74b2e9b29d895970b53ae24044a8a14ce
|
||||
Subproject commit 967894f32f9b150b7e7a9b75c2950b9cb3929edc
|
1
nemo
1
nemo
@ -1 +0,0 @@
|
||||
Subproject commit 6f43baa745ee0eeb7bf2caf894d6fc410d0330a3
|
2
netst
2
netst
@ -1 +1 @@
|
||||
Subproject commit ce50842e3b7b42a51678923fd3bd8fb8d4560e35
|
||||
Subproject commit 5875c90998b1b7202764520e1dd62bc1f8d1ef59
|
2
ptpython
2
ptpython
@ -1 +1 @@
|
||||
Subproject commit d540958e7efb8b88597efd130bc91ed0219c3dcb
|
||||
Subproject commit dd45f657ae496ab84e4169f8c6c254097607d7a0
|
2
pyrip
2
pyrip
@ -1 +1 @@
|
||||
Subproject commit 91d40d7eaf07fbc7269cdfee30a62e37c37b696c
|
||||
Subproject commit 7165e74a00823a1756f9938e8b45ec8109236948
|
2
starter
2
starter
@ -1 +1 @@
|
||||
Subproject commit 13a4afc3c73ddd87b474228583205b307d1aa439
|
||||
Subproject commit 64a1e13d6486954c23814c31bf0524f43b834ea6
|
Loading…
x
Reference in New Issue
Block a user