Adaption to new Makefile concept

This commit is contained in:
Dirk Alders 2025-08-17 22:31:04 +02:00
parent 8a5e3a647b
commit 89935682e6
11 changed files with 46 additions and 16 deletions

View File

@ -1,4 +1,4 @@
# git helper Makefile: Version 2.2 (2025-08-10) # git helper Makefile: Version 2.5 (2025-08-11)
default: help default: help
.ONESHELL: .ONESHELL:
@ -36,21 +36,52 @@ init: print_head
echo -e "\033[1;33mInitialising git submodules...\e[0m" echo -e "\033[1;33mInitialising git submodules...\e[0m"
git submodule init git submodule init
git submodule update git submodule update
echo
fi fi
# Init submodules # Init submodules
SUBDIRS=$$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort) SUBDIRS=$$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort)
for subdir in $$SUBDIRS; do for subdir in $$SUBDIRS; do
$(MAKE) --no-print-directory -C $$(dirname $$subdir) init $(MAKE) --no-print-directory -C $$(dirname $$subdir) init
done done
if [[ $$SUBDIRS ]]; then if [[ $$SUBDIRS = *[![:space:]]* ]]; then
$(MAKE) print_head $(MAKE) print_head
fi fi
# Create venv if needed # Create venv if needed
if [[ -e $(VENV_FLAG) ]]; then if [[ -e $(VENV_FLAG) ]]; then
if [[ ! -e $(VENV_FOLDER) ]]; then BASEPATH=$$(pwd -P)
echo -e "\033[1;33mCreating virtual env...\e[0m" #
mkvenv # Create venv
#
if [ ! -e venv ];then
echo -e "\033[1;33mCreating venv in $$BASEPATH...\e[0m"
python3 -m venv $$BASEPATH/venv > /dev/null 2>&1
else
echo -e "\033[1;33mVirtualenv already exists in $$BASEPATH...\e[0m"
fi fi
echo
#
# Install modules
#
echo -e "\033[1;33mInstalling modules to venv in $$BASEPATH...\e[0m"
for req_file in $$(find -L $$BASEPATH -name requirements.txt 2> /dev/null); do
# echo " $$req_file"
while read req_mod; do
if [[ $$req_mod = *[![:space:]]* ]]; then
# req_mod is not empty
OUT=$$($$BASEPATH/venv/bin/pip install -U $$req_mod 2>&1 )
if [[ $$OUT =~ "Successfully installed" ]]; then
echo -e " * \033[1;32m$$req_mod installed.\e[0m"
elif [[ $$OUT =~ "already satisfied" ]]; then
echo -e " * \033[1;36m$$req_mod already installed.\e[0m"
else
echo -e " * \033[1;31m$$req_mod installation FAILED!\e[0m"
#echo $$OUT
fi
fi
done < $$req_file
done
echo
fi fi
# Start local init # Start local init
echo -e "\033[1;33mDoing localinit...\e[0m" echo -e "\033[1;33mDoing localinit...\e[0m"
@ -100,4 +131,3 @@ print_head:
echo -ne "╚═" echo -ne "╚═"
for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done
echo -e "═╝\033[00m" echo -e "═╝\033[00m"

@ -1 +1 @@
Subproject commit 2021a0f5bb2fba4d7349a0eba0c41b9880146df5 Subproject commit 96c25144ba43c778ac8ffbfe7e4a653de68dffc6

@ -1 +1 @@
Subproject commit d8b8b7d9ff4b74c74204b224e6804bf0a36f08c1 Subproject commit 3064e040aab20c09d9c1d6814b7120db4d7087c3

@ -1 +1 @@
Subproject commit 7053173e871c4f3c057935aa6c0c540a0a6861ea Subproject commit aefb1f287a33ca09031b92b1d3caf9158f35f4e7

2
leyk

@ -1 +1 @@
Subproject commit dfc9b8687f5506127b0728098579c0da6cff1a88 Subproject commit 9134e86028bbee37c2393d5073f38e58199ace2a

2
mpd

@ -1 +1 @@
Subproject commit f85fbcff40a247a343128b25e1f7494b8baadd14 Subproject commit cf0c77f39e814359ba19e11f516e2c113a445053

@ -1 +1 @@
Subproject commit 6913de74df5e082d98005823d24c39fea61d0e4f Subproject commit 1ab6bfc4603c8a63c4ab75f876fc2399de0ec112

@ -1 +1 @@
Subproject commit 04b589ac9034b7f0606b6b3cec043ea3451a9b6f Subproject commit e6ebde454b64fded7ceb463fa29994726ed19faa

@ -1 +1 @@
Subproject commit 23a7f8333d66a922561bc07d9b75ce7297ce35d9 Subproject commit 84d989aa1fce81f88f4ffc2cdcc80d057f3d573b

@ -1 +1 @@
Subproject commit d538cba7e97a8da315b32f2e60f28eac3373b69b Subproject commit 57353c18a135c14cadb2de280642aa79c5d84f17

@ -1 +1 @@
Subproject commit 1cae13a47136d069954ac9255bd3e179d566ede9 Subproject commit 132dd160617d56e7f5d59ef25ff371195e5d1502