allow to force installing a clangd and qtcreator files

Add a forceclangd target to Makefile to force installing a .clangd file.
Add a forceqtcreator target to force installing qtcreator files.
Existing files will be overwritten.

while here:
- update the c++ standard to c++23
This commit is contained in:
2026-08-17 23:52:51 +02:00
parent 698256e2eb
commit 9747416efd
6 changed files with 33 additions and 6 deletions
+9 -1
View File
@@ -5,6 +5,14 @@ GLOBAL_WORKING_DIR=$(realpath ${CURRENT_DIR}/..)
# ----------
has_force_arg=0
if [ $# -eq 1 ] ; then
if [ $1 == 'force' ] ; then
has_force_arg=1
fi
fi
# make sure the current directory is correct
if [ ! -d ${CURRENT_DIR}/.templates ] ; then
echo "this script should be called by make: make clangd (one level up)"
@@ -17,7 +25,7 @@ GLOBAL_WORKING_DIR_FOR_SED=$(echo ${GLOBAL_WORKING_DIR} | sed 's/\//\\\//g')
if [ -f "${CURRENT_DIR}/.templates/.clangd" ] ; then
if [ ! -f "${CURRENT_DIR}/.clangd" ] ; then
if [ $has_force_arg -eq 1 -o ! -f "${CURRENT_DIR}/.clangd" ] ; then
cat "${CURRENT_DIR}/.templates/.clangd" | \
sed -e "s/%%%CURRENT_DIR%%%/${CURRENT_DIR_FOR_SED}/g" \
-e "s/%%%GLOBAL_WORKING_DIR%%%/${GLOBAL_WORKING_DIR_FOR_SED}/g" > \