summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-23 23:40:21 -0400
committermidipix <writeonce@midipix.org>2016-11-10 23:35:41 -0500
commit9c6a0f16f1e8902a48d34d205110c30fc259837a (patch)
treeae3529851b6ecd6b8875ff52af3cf6a3d366a619
parent58ae295ab05108130acaf5ae05e3ecaa13f29741 (diff)
downloadperk-9c6a0f16f1e8902a48d34d205110c30fc259837a.tar.bz2
perk-9c6a0f16f1e8902a48d34d205110c30fc259837a.tar.xz
build system: added utility nickname support.
-rw-r--r--Makefile.in1
-rwxr-xr-xconfigure13
-rw-r--r--project/defs.mk8
3 files changed, 18 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in
index 2b888d2..76e0e1a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,5 @@
PACKAGE = @package@
+NICKNAME = @nickname@
PROJECT_DIR = @project_dir@
GIT_REFERENCE_DIR = @git_reference_dir@
diff --git a/configure b/configure
index 4145c3c..7151da3 100755
--- a/configure
+++ b/configure
@@ -33,6 +33,9 @@ init_vars()
mb_git_reference_dir="\$(PROJECT_DIR)/.git"
fi
+ # project
+ mb_nickname=$NICKNAME
+
# dirs
mb_prefix=$PREFIX
mb_exec_prefix=$EXEC_PREFIX
@@ -110,6 +113,9 @@ verify_build_directory()
common_defaults()
{
+ # project
+ [ -z "$mb_nickname" ] && mb_nickname=$mb_package
+
# dirs
[ -z "$mb_prefix" ] && [ -z "$mb_prefix_set" ] \
&& mb_prefix='/usr/local'
@@ -308,6 +314,7 @@ cross_defaults()
config_copy()
{
sed -e 's^@package@^'"$mb_package"'^g' \
+ -e 's^@nickname@^'"$mb_nickname"'^g' \
-e 's^@project_dir@^'"$mb_project_dir"'^g' \
-e 's^@git_reference_dir@^'"$mb_git_reference_dir"'^g' \
\
@@ -454,6 +461,12 @@ for arg ; do
--debug)
mb_debug='yes'
;;
+
+ # project
+ --nickname=*)
+ mb_nickname=${arg#*=}
+ ;;
+
*)
error_msg ${arg#}: "unsupported config argument."
exit 2
diff --git a/project/defs.mk b/project/defs.mk
index 346bb45..f182b87 100644
--- a/project/defs.mk
+++ b/project/defs.mk
@@ -18,10 +18,10 @@ SHARED_LIB = lib/$(OS_LIB_PREFIX)$(PACKAGE)$(OS_LIB_SUFFIX)
STATIC_LIB = lib/$(OS_LIB_PREFIX)$(PACKAGE)$(OS_ARCHIVE_EXT)
SHARED_IMPLIB = lib/$(OS_LIB_PREFIX)$(PACKAGE)$(OS_IMPLIB_EXT)
-APP = bin/$(OS_APP_PREFIX)$(PACKAGE)$(OS_APP_SUFFIX)
-DEFAULT_APP = bin/$(OS_APP_PREFIX)$(PACKAGE)-default$(OS_APP_SUFFIX)
-SHARED_APP = bin/$(OS_APP_PREFIX)$(PACKAGE)-shared$(OS_APP_SUFFIX)
-STATIC_APP = bin/$(OS_APP_PREFIX)$(PACKAGE)-static$(OS_APP_SUFFIX)
+APP = bin/$(OS_APP_PREFIX)$(NICKNAME)$(OS_APP_SUFFIX)
+DEFAULT_APP = bin/$(OS_APP_PREFIX)$(NICKNAME)-default$(OS_APP_SUFFIX)
+SHARED_APP = bin/$(OS_APP_PREFIX)$(NICKNAME)-shared$(OS_APP_SUFFIX)
+STATIC_APP = bin/$(OS_APP_PREFIX)$(NICKNAME)-static$(OS_APP_SUFFIX)
CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_CONFIG) $(CFLAGS_SYSROOT) \
$(CFLAGS_COMMON) $(CFLAGS_CMDLINE) $(CFLAGS_HOST) \