summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-11-12 10:44:47 (EST)
committer P. J. McDermott <pjm@nac.net>2012-11-12 10:44:47 (EST)
commit87d803d6c49607153e4fc38c0f110746761d2949 (patch)
tree47a5361dffae3fd600d6c267df7c875bb0ad8c14
parent0b58252dd39ff4b7421c16383696cba9608fb59e (diff)
Make oh-autoinstall support the -T option.
-rw-r--r--lib/buildsystem/make.sh9
-rw-r--r--man/oh-autoinstall.1.in7
-rw-r--r--src/oh-autoinstall.sh5
3 files changed, 18 insertions, 3 deletions
diff --git a/lib/buildsystem/make.sh b/lib/buildsystem/make.sh
index fe2d856..20a74ae 100644
--- a/lib/buildsystem/make.sh
+++ b/lib/buildsystem/make.sh
@@ -68,8 +68,13 @@ _oh_make_can_install()
_oh_make_install()
{
- _oh_make_update_first_defined_target 'install' \
- "${@}" "DESTDIR=${_OH_BUILDSYSTEM_DESTDIR}"
+ if [ -n "${_OH_BUILDSYSTEM_BUILD_TARGET}" ]; then
+ _oh_make_update_first_defined_target "${_OH_BUILDSYSTEM_BUILD_TARGET}" \
+ "${@}" "DESTDIR=${_OH_BUILDSYSTEM_DESTDIR}"
+ else
+ _oh_make_update_first_defined_target 'install' \
+ "${@}" "DESTDIR=${_OH_BUILDSYSTEM_DESTDIR}"
+ fi
}
_oh_make_update_first_defined_target()
diff --git a/man/oh-autoinstall.1.in b/man/oh-autoinstall.1.in
index 9b97ebb..cb48bf8 100644
--- a/man/oh-autoinstall.1.in
+++ b/man/oh-autoinstall.1.in
@@ -13,6 +13,8 @@ oh-autoinstall \- Automatically install a package's data files.
.IR builddir ]
.RB [ -d
.IR destdir ]
+.RB [ -T
+.IR buildtarget ]
[\-\-
.IR arguments ]
@@ -37,6 +39,11 @@ Install data files in
.IR destdir .
The default directory is
.IR dest .
+.TP
+.BI \-T \ buildtarget
+Update the
+.I buildtarget
+target.
.SH COPYRIGHT
Copyright (C) 2012 Patrick "P. J." McDermott
diff --git a/src/oh-autoinstall.sh b/src/oh-autoinstall.sh
index 6d494bc..be60a4c 100644
--- a/src/oh-autoinstall.sh
+++ b/src/oh-autoinstall.sh
@@ -27,7 +27,7 @@ main()
{
oh_init
- while getopts 'S:B:d:' opt; do
+ while getopts 'S:B:d:T:' opt; do
case "${opt}" in
S)
oh_set_buildsystem_option 'build-system' "${OPTARG}"
@@ -38,6 +38,9 @@ main()
d)
oh_set_buildsystem_option 'destdir' "${OPTARG}"
;;
+ T)
+ oh_set_buildsystem_option 'build-target' "${OPTARG}"
+ ;;
?)
ob_error "$(ob_get_msg 'bad_opt')"
exit 1