Skip to content

Commit 688177d

Browse files
author
Herbert Koelman
committed
fixes #71
1 parent 71e4376 commit 688177d

File tree

3 files changed

+71
-2
lines changed

3 files changed

+71
-2
lines changed

Makefile.in

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,28 @@ LOCALEDIR=@localedir@
1212
INSTALL=@INSTALL@
1313
RM=@RM@
1414
MKDIR=@MKDIR_P@
15+
PACKAGE_NAME=@PACKAGE_NAME@
16+
PACKAGE_DEVELOP=@PACKAGE_NAME@-@BUILD@-@[email protected]
1517
PACKAGE=@PACKAGE_NAME@-@PACKAGE_VERSION@-@[email protected]
1618
HEADERS=@HEADERS@
1719
DOXYGEN=@DOXYGEN@
1820
CODECHECK=@CODECHECK@
1921
LN_S=@LN_S@
22+
DEPLOY=@DEPLOY@
23+
REPOSITORY=@REPOSITORY@
2024

2125
PTHREADLIB=libcpp-pthread.a
2226

2327
all:
2428
cd src && $(MAKE)
2529

26-
pkg:
30+
pkg: clean all
2731
$(MKDIR) distrib
28-
tar cf - `git ls-files` | gzip -c > distrib/$(PACKAGE)
32+
tar cf - include lib | gzip -c > distrib/$(PACKAGE_DEVELOP)
33+
34+
# this target can only be used if REPOSITORY is set (hence the test)
35+
deploy: pkg
36+
@test ! -z "$(REPOSITORY)" && ( cd distrib && $(DEPLOY) $(PACKAGE_DEVELOP) $(REPOSITORY) 2> /dev/null && echo "deployed $(PACKAGE_DEVELOP) here $(REPOSITORY)" ) || echo "WARNING use ./configure --enable-repository to enable deploy target"
2937

3038
globber:clean
3139
-$(RM) -R Makefile autom4te.cache config.log config.status doxyfile sonar-project.properties

configure

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ ac_subst_vars='LTLIBOBJS
589589
LIBOBJS
590590
HEADERS
591591
subdirs
592+
DEPLOY
592593
LN_S
593594
MKDIR_P
594595
DOXYGEN
@@ -602,6 +603,7 @@ build_vendor
602603
build_cpu
603604
build
604605
BUILD
606+
REPOSITORY
605607
target_alias
606608
host_alias
607609
build_alias
@@ -645,6 +647,7 @@ ac_user_opts='
645647
enable_option_checking
646648
enable_build
647649
enable_release
650+
enable_repository
648651
enable_codecheck
649652
'
650653
ac_precious_vars='build_alias
@@ -1265,6 +1268,7 @@ Optional Features:
12651268
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
12661269
--enable-build build name.
12671270
--enable-release build as release.
1271+
--enable-repository use the given name to locate the remote repository
12681272
\
12691273
--enable-codecheck=PATH set CODECHECK to run a specific program
12701274
@@ -1750,6 +1754,18 @@ if test "${enable_release+set}" = set; then :
17501754
enableval=$enable_release; BUILD=$PACKAGE_VERSION
17511755
fi
17521756
1757+
# Check whether --enable-repository was given.
1758+
if test "${enable_repository+set}" = set; then :
1759+
enableval=$enable_repository; { $as_echo "$as_me:${as_lineno-$LINENO}: repository set to $enable_repository" >&5
1760+
$as_echo "$as_me: repository set to $enable_repository" >&6;}
1761+
fi
1762+
1763+
1764+
if test ! -z "$enable_repository"
1765+
then
1766+
REPOSITORY="$enable_repository/$PACKAGE_NAME"
1767+
1768+
fi
17531769
17541770
if test -z "$BUILD"
17551771
then
@@ -2028,6 +2044,44 @@ else
20282044
$as_echo "no, using $LN_S" >&6; }
20292045
fi
20302046
2047+
# Extract the first word of "basic_deploy.sh", so it can be a program name with args.
2048+
set dummy basic_deploy.sh; ac_word=$2
2049+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2050+
$as_echo_n "checking for $ac_word... " >&6; }
2051+
if ${ac_cv_prog_DEPLOY+:} false; then :
2052+
$as_echo_n "(cached) " >&6
2053+
else
2054+
if test -n "$DEPLOY"; then
2055+
ac_cv_prog_DEPLOY="$DEPLOY" # Let the user override the test.
2056+
else
2057+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2058+
for as_dir in $PATH
2059+
do
2060+
IFS=$as_save_IFS
2061+
test -z "$as_dir" && as_dir=.
2062+
for ac_exec_ext in '' $ac_executable_extensions; do
2063+
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2064+
ac_cv_prog_DEPLOY="basic_deploy.sh"
2065+
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2066+
break 2
2067+
fi
2068+
done
2069+
done
2070+
IFS=$as_save_IFS
2071+
2072+
test -z "$ac_cv_prog_DEPLOY" && ac_cv_prog_DEPLOY="echo \"please install basic_deploy.sh, make sure it\'s in your PATH and re-run ./configure\""
2073+
fi
2074+
fi
2075+
DEPLOY=$ac_cv_prog_DEPLOY
2076+
if test -n "$DEPLOY"; then
2077+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEPLOY" >&5
2078+
$as_echo "$DEPLOY" >&6; }
2079+
else
2080+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2081+
$as_echo "no" >&6; }
2082+
fi
2083+
2084+
20312085
20322086
# Okay, no cppcheck found, maybe we have sonar
20332087
if test -z "$CODECHECK"

configure.ac

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ AC_CONFIG_AUX_DIR([/usr/bin . bin])
99

1010
AC_ARG_ENABLE([build], AS_HELP_STRING([--enable-build],[build name.]), BUILD=$enable_build)
1111
AC_ARG_ENABLE([release], AS_HELP_STRING([--enable-release],[build as release.]), BUILD=$PACKAGE_VERSION)
12+
AC_ARG_ENABLE([repository], AS_HELP_STRING([--enable-repository],[use the given name to locate the remote repository]), AC_MSG_NOTICE([repository set to $enable_repository]) )
13+
14+
if test ! -z "$enable_repository"
15+
then
16+
AC_SUBST(REPOSITORY,"$enable_repository/$PACKAGE_NAME")
17+
fi
1218

1319
if test -z "$BUILD"
1420
then
@@ -29,6 +35,7 @@ AC_CHECK_PROG([RM],[rm],[rm -f])
2935
AC_CHECK_PROG([DOXYGEN],[doxygen],[doxygen],[echo \"please install doxygen and re-run ./configure, or run it manualy doxygen \"])
3036
AC_PROG_MKDIR_P
3137
AC_PROG_LN_S
38+
AC_CHECK_PROG([DEPLOY],[basic_deploy.sh],[basic_deploy.sh],[echo \"please install basic_deploy.sh, make sure it\'s in your PATH and re-run ./configure\"])
3239

3340
# Okay, no cppcheck found, maybe we have sonar
3441
if test -z "$CODECHECK"

0 commit comments

Comments
 (0)