From 64b81076c9b0f0f1a598fecec1b09ec4a9036c82 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Tue, 31 Dec 2024 10:52:18 +0100 Subject: [PATCH] Make include guard in version.hpp uppercase --- mkproj.sh | 3 ++- tpl/version.hpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mkproj.sh b/mkproj.sh index c126e27..3b897e3 100644 --- a/mkproj.sh +++ b/mkproj.sh @@ -85,7 +85,8 @@ else cp $tplroot/Makefile.unified $proj/Makefile cp $tplroot/precomp.hpp $proj/src cp -r $tplroot/tests $proj/ - sed -e "s/{PROJECT}/$proj/" $tplroot/version.hpp > $proj/src/version.hpp + uproj=$(echo $proj | tr '[:lower:]' '[:upper:]') + sed -e "s/{PROJECT}/$proj/" -e "s/{PROJ}/$uproj/" $tplroot/version.hpp > $proj/src/version.hpp sed -e "s/{PROJECT}/$proj/" $tplroot/version.cpp > $proj/src/version.cpp if [ $library = 1 ] diff --git a/tpl/version.hpp b/tpl/version.hpp index 69d4429..bb75f8e 100644 --- a/tpl/version.hpp +++ b/tpl/version.hpp @@ -1,8 +1,8 @@ -#ifndef {PROJECT}_VERSION_H_ -#define {PROJECT}_VERSION_H_ +#ifndef _{PROJ}_VERSION_H_ +#define _{PROJ}_VERSION_H_ #include std::string {PROJECT}_version(); -#endif // {PROJECT}_VERSION_H_ +#endif // _{PROJ}_VERSION_H_