Skip to content

Commit

Permalink
New option --srcdir for root-config, printing top level original sour…
Browse files Browse the repository at this point in the history
…ce dir.

Works for both cmake and classic builds.
  • Loading branch information
FonsRademakers committed Sep 30, 2016
1 parent 8c9659e commit 7de53f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config/root-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ auxcflags="$auxcflags @usercflags@"

### end of machine and compiler dependent settings ###

srcdir=@top_srcdir@
prefix=@prefix@
if test "$platform" = "win32" && test "$prefix" != ""; then
prefix=`cygpath -u $prefix`
Expand All @@ -438,8 +439,8 @@ noldflags=no

usage="\
Usage: root-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version]\
[--cflags] [--auxcflags] [--ldflags] [--new] [--nonew] [--libs]\
[--glibs] [--evelibs] [--bindir] [--libdir] [--incdir] [--etcdir]\
[--cflags] [--auxcflags] [--ldflags] [--new] [--nonew] [--libs] [--glibs]\
[--evelibs] [--bindir] [--libdir] [--incdir] [--etcdir] [--srcdir]\
[--noauxcflags] [--noauxlibs] [--noldflags] [--has-<feature>] [--arch]\
[--platform] [--config] [--features] [--ncpu] [--git-revision]\
[--python-version] [--cc] [--cxx] [--f77] [--ld ] [--help]"
Expand Down Expand Up @@ -736,6 +737,10 @@ while test $# -gt 0; do
### output the etc directory
out="$out $etcdir"
;;
--srcdir)
### output the src directory
out="$out $srcdir"
;;
--config)
### output the configure arguments
out="$out $configargs"
Expand Down Expand Up @@ -800,6 +805,7 @@ while test $# -gt 0; do
echo " --libdir Print the library directory"
echo " --incdir Print the header directory"
echo " --etcdir Print the configuration directory"
echo " --srcdir Print the top of the original source directory"
echo " --auxlibs Print auxiliary libraries"
echo " --auxcflags Print auxiliary compiler flags"
echo " --[no]new Turn on[off] use of libNew.so"
Expand Down
1 change: 1 addition & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -8195,6 +8195,7 @@ sed -e "s|@architecture@|$arch|" \
-e "s|@libdir@|$libdir2|" \
-e "s|@incdir@|$incdir2|" \
-e "s|@etcdir@|$etcdir2|" \
-e "s|@top_srcdir@|$top_srcdir|" \
-e "s|@features@|$features|" \
-e "s|@winrtdebug@|$enable_winrtdebug|"\
-e "s|@configargs@|$configargs|" \
Expand Down

0 comments on commit 7de53f1

Please sign in to comment.