#!/usr/bin/env bash # # Wrapper for git to handle more subdirs at the same time # # no params, no action if [ "$#" -eq "0" ] ; then git echo echo "Additional options available only in this 'g' wrapper:" echo echo "Usage: g [options] [git commands]" echo " -f Force - act on all the repos, not only the changed ones" echo " -s Silent - do not report the repo names." echo " -v Verbose - Print git commands." echo " -1 report the repos name on the first line of the output as :" echo " -z just to some house cleaning (hooks mostly). this is a stand-alone option as in ./g -z" echo " --set-push-user [username] re-write an existing tree's config with an fd.o commit account name" echo " --last-working checks out the last known working build (useful for windows)"; echo " --set-last-working adds a note denoting a working build"; echo " --push-notes pushes all notes"; exit $? fi if [ ! "`type -p git`" ]; then echo "Cannot find the git binary! Is git installed and is in PATH?" exit 1 fi pushd $(dirname $0) > /dev/null COREDIR=$(pwd) popd > /dev/null refresh_hooks() { repo=$1 case "$repo" in core) pushd $COREDIR > /dev/null for hook_name in $(ls -1 $COREDIR/git-hooks) ; do hook=".git/hooks/$hook_name" if [ ! -x "$hook" ] ; then rm -f "$hook" ln -sf "$COREDIR/git-hooks/$hook_name" "$hook" fi done popd > /dev/null ;; translations) if [ -d $COREDIR/clone/translations ] ; then pushd $COREDIR/clone/translations > /dev/null for hook_name in $(ls -1 $COREDIR/clone/translations/git-hooks); do hook=".git/hooks/$hook_name" if [ ! -x "$hook" ] ; then rm -f "$hook" ln -sf "$COREDIR/clone/translations/git-hooks/$hook_name" "$hook" fi done # .gitattribute should be per-repo, avoid entangling repos if [ -L .gitattributes ] ; then rm -f .gitattributes fi popd > /dev/null fi ;; binfilter|help|dictionaries) if [ -d $COREDIR/clone/$repo ] ; then pushd $COREDIR/clone/$repo > /dev/null # fixme: we should really keep these per-repo to # keep the repos independant. since these two # are realy not independant yet, we keep using core's hooks for hook_name in $(ls -1 $COREDIR/git-hooks) ; do hook=".git/hooks/$hook_name" if [ ! -x "$hook" ] ; then rm -f "$hook" ln -sf "$COREDIR/git-hooks/$hook_name" "$hook" fi done # .gitattribute should be per-repo, avoid entangling repos if [ -L .gitattributes ] ; then rm -f .gitattributes fi popd > /dev/null fi ;; esac } refresh_all_hooks() { repos="core $(cat "$COREDIR/bin/repo-list")" for repo in $repos ; do refresh_hooks $repo done } postprocess() { rc=$1 if $DO_HOOK_REFRESH ; then refresh_all_hooks fi exit $rc; } CLONEDIR="$COREDIR/clone" if [ ! -e ${CLONEDIR} ]; then mkdir -p "$CLONEDIR"; fi # extra params for some commands, like log EXTRA= COMMAND="$1" PAGER= RELATIVIZE=1 PUSH_ALL= PUSH_USER= PUSH_NOTES= LAST_WORKING= SET_LAST_WORKING= ALLOW_EMPTY= KEEP_GOING=0 REPORT_REPOS=1 REPORT_COMMANDS=0 REPORT_COMPACT=0 DO_HOOK_REFRESH=false while [ "${COMMAND:0:1}" = "-" ] ; do case "$COMMAND" in -f) KEEP_GOING=1 ;; -s) REPORT_REPOS=0 ;; -v) REPORT_COMMANDS=1 ;; -1) REPORT_COMPACT=1 ;; --set-push-user) shift PUSH_USER="$1" ;; --last-working) LAST_WORKING=1 ;; --set-last-working) SET_LAST_WORKING=1 ;; --push-notes) PUSH_NOTES=1 ;; -z) DO_HOOK_REFRESH=true postprocess 0 ;; esac shift COMMAND="$1" done case "$COMMAND" in apply) EXTRA="-p0 --stat --apply --index --ignore-space-change --whitespace=error" RELATIVIZE=0 ;; clone|fetch|pull) DO_HOOK_REFRESH=true ;; diff) PAGER='--no-pager' REPORT_REPOS=0 ;; log) if [ "$#" = "1" ] ; then EXTRA='-1' fi PAGER='--no-pager' ;; push) if [ "$#" != "1" ] ; then PUSH_ALL=1 fi ;; esac # absolutize the parameters first unset FILES FILESNUM=0 while shift ; do PARAM="$1" if [ -z "$PARAM" ] ; then continue elif [ "${PARAM:0:1}" = "-" ] ; then if [ \( "$COMMAND" = "checkout" -a "$PARAM" = "-b" \) -o \ \( "$COMMAND" = "clone" -a "$PARAM" = "--reference" \) -o \ \( "$COMMAND" = "commit" -a "$PARAM" = "-m" \) -o \ \( "$COMMAND" = "commit" -a "$PARAM" = "-am" \) -o \ \( "$COMMAND" = "tag" -a "$PARAM" = "-m" \) ] then # params that take an argument FILES[$FILESNUM]="$PARAM" FILESNUM=$(($FILESNUM+1)) shift FILES[$FILESNUM]="$1" FILESNUM=$(($FILESNUM+1)) else if [ "$COMMAND" = "commit" -a "$PARAM" = "-F" ] then shift # this still needs some magic to handle relative paths EXTRA="${EXTRA} -F ${1}" else [ "$COMMAND" = "commit" -a "$PARAM" = "--allow-empty" ] && ALLOW_EMPTY=1 FILES[$FILESNUM]="$PARAM" FILESNUM=$(($FILESNUM+1)) fi fi else if [ "$COMMAND" = "apply" ] ; then grep -qs $'^+ *\t' "$PARAM" && { echo "Patch '$PARAM' introduces tabs in indentation, aborting." echo echo "Please fix the patch (something like s/^\(+ *\)\t/\1 /) and try again." echo exit 1 } fi if [ "$COMMAND" == "rev-parse" ] ; then # this is not a file FILES[$FILESNUM]="$PARAM" FILESNUM=$(($FILESNUM+1)) else # make the paths absolute FILES[$FILESNUM]=$(perl -e 'use Cwd "abs_path"; print abs_path(shift);' "$PARAM") if [ -z "${FILES[$FILESNUM]}" -o ! -e "${FILES[$FILESNUM]}" ] ; then # it is probably not a file, but a tag name, or something FILES[$FILESNUM]="$PARAM" fi FILESNUM=$(($FILESNUM+1)) fi fi done # do it! DIRS="core $(cd $CLONEDIR ; ls)" if [ "$COMMAND" = "clone" ] ; then DIRS=$(cat "$COREDIR/bin/repo-list") fi for REPO in $DIRS ; do DIR="$CLONEDIR/$REPO" NAME="$REPO" if [ "$REPO" = "core" ] ; then DIR="$COREDIR" NAME="main repo" fi if [ -d "$DIR" -a "z$PUSH_USER" != "z" ]; then echo "setting up push url for $DIR" (cd $DIR && git config remote.origin.pushurl "ssh://${PUSH_USER}@git.freedesktop.org/git/libreoffice/${REPO}") elif [ -d "$DIR" -a "z$LAST_WORKING" != "z" ]; then echo "fetching notes for $REPO ..." (cd $DIR && git fetch origin 'refs/notes/*:refs/notes/*') hash=`(cd $DIR && git log --pretty='%H %N' | grep 'win32 working build' | head -n1 | sed 's/ win32.*//')` if test "z$hash" != "z"; then echo "update to $hash" (cd $DIR && git checkout $hash) else echo "Warning: missing known working note on repo $REPO" fi elif [ -d "$DIR" -a "z$SET_LAST_WORKING" != "z" ]; then echo "fetching notes for $REPO ..." (cd $DIR && git fetch origin 'refs/notes/*:refs/notes/*') (cd $DIR && git notes add -m 'win32 working build') elif [ -d "$DIR" -a "z$PUSH_NOTES" != "z" ]; then echo "pushing notes for $REPO ..." (cd $DIR && git push origin 'refs/notes/*:refs/notes/*') elif [ \( -d "$DIR" -a -d "$DIR"/.git \) -o \( "$COMMAND" = "clone" \) ] ; then ( # executed in a subshell if [ "$COMMAND" != "clone" ] ; then cd "$DIR" else cd "$CLONEDIR" fi # relativize the absolutized params again if we want to operate # only on the files belonging to this exact repo if [ "$RELATIVIZE" = "1" -a -n "$FILES" ] ; then FILESNUM=0 INSERTNUM=0 PWD=$(pwd) PWDLEN=$(pwd | wc -c) for I in "${FILES[@]}" ; do I="${I//@REPO@/${REPO}}" unset FILES[$FILESNUM] FILESNUM=$(($FILESNUM+1)) # filter out files that don't belong to this repo if [ \( "${I:0:1}" = "/" \) -a \( "$COMMAND" != "clone" \) ] ; then if [ "${I:0:$PWDLEN}" = "$PWD/" ] ; then FILES[$INSERTNUM]="${I:$PWDLEN}" INSERTNUM=$(($INSERTNUM+1)) fi else FILES[$INSERTNUM]="$I" INSERTNUM=$(($INSERTNUM+1)) fi done [ "$INSERTNUM" = "0" ] && exit 0 fi # some extra params case "$COMMAND" in apply) for I in * ; do if [ -d "$I" ] ; then EXTRA="$EXTRA --include=$I/*" else EXTRA="$EXTRA --include=$I" fi done ;; commit) if [ "$ALLOW_EMPTY" != "1" ] ; then [ -z "$(git diff-index --name-only HEAD --)" ] && exit 0 fi ;; push) if [ "$PUSH_ALL" != "1" ] ; then [ -n "$(git rev-list @{upstream}..HEAD)" ] || exit 0 fi ;; status) LOCALCOMMITS="$(git rev-list @{upstream}..HEAD)" if [ -z "$LOCALCOMMITS" ] ; then [ -z "$(git diff-index --name-only HEAD --)" ] && exit 0 fi ;; clone) EXTRA="$(git config remote.origin.url)" EXTRA=${EXTRA/core/${REPO}} ;; esac # do it! if [ "$COMMAND" != "clone" -o ! -d $DIR ] ; then if [ "$REPORT_REPOS" = "1" -a "$COMMAND" != "grep" ] ; then if [ "$REPORT_COMPACT" = "1" ] ; then echo -n "${REPO}:" else echo "===== $NAME =====" fi fi if [ "$REPORT_COMMANDS" = "1" ] ; then echo "+ git $PAGER $COMMAND $EXTRA ${FILES[@]}" fi git $PAGER "$COMMAND" $EXTRA "${FILES[@]}" RETURN=$? fi # now we can change the dir in case of clone as well if [ "$COMMAND" = "clone" ] ; then cd $DIR fi case "$COMMAND" in pull|clone) # update links if [ "$DIR" != "$COREDIR" ]; then for link in $(ls) ; do if [ ! -e "$COREDIR/$link" ] ; then if test -h "$COREDIR/$link"; then rm "$COREDIR/$link" echo -n "re-" fi echo "creating missing link $link" ln -s "$DIR/$link" "$COREDIR/$link" fi done fi ;; status) # git status returns error in some versions, clear that RETURN=0 ;; grep) # git grep return an 'error' if nothing is found # still we should continue grepping the other repos RETURN=0 ;; esac if [ "$KEEP_GOING" = "1" ] ; then RETURN=0 fi exit $RETURN ) || postprocess $? fi done # Cleanup the broken links if [ "$COMMAND" = "pull" ] ; then for link in $(ls $COREDIR) ; do if [ -h "$COREDIR/$link" -a ! -e "$COREDIR/$link" ]; then echo "Removing broken link $link" rm $COREDIR/$link fi done fi # warn if [ "$COMMAND" = "apply" ] ; then echo echo "Don't forget to check the status & commit now ;-)" echo fi postprocess $? # vi:set shiftwidth=4 expandtab: feature/cib_contract57d LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/config_host/config_global.h.in
AgeCommit message (Collapse)Author
2017-03-02Remove HAVE_CXX11_UTF16_STRING_LITERAL, always true nowStephan Bergmann
...after 84b36c704d73362d4d86dc9e9c0efa0625958347 "Drop support for MSVC 2013". Make this a fatal configuration error for now. The check should be removed completely after LO 5.4 branch-off. Change-Id: If2f196abb93607dde9ba5c4f04d219679585e633 Reviewed-on: https://gerrit.libreoffice.org/34822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-02Remove HAVE_CXX11_CONSTEXPR, always true nowStephan Bergmann
...after 84b36c704d73362d4d86dc9e9c0efa0625958347 "Drop support for MSVC 2013". Make this a fatal configuration error for now. The check should be removed completely after LO 5.4 branch-off. Change-Id: I990fd8fcb4ec1327282df4efe21640c938d3cf06 Reviewed-on: https://gerrit.libreoffice.org/34821 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-15Phase out support for HAVE_BROKEN_STATIC_INITIALIZER_LISTStephan Bergmann
...I'm pondering a change that would make that a hard requirement, and from the comment in configure.ac it looks like only old Clang < 3.4 were affected. Change-Id: I8ef64f759fed1a45d88f94d0e8a60839ad10b263 Reviewed-on: https://gerrit.libreoffice.org/32029 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-12[API CHANGE] Remove salcpprt static libraryStephan Bergmann
...containing replacements for global operator new/delete (that can be linked into executables), but which is no longer used. The mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2012-March/028690.html> "operator new no longer routes through rtl_AllocMemory in libsalcpprt under gbuild link rules" has the details of how this was used on some platforms (but not on others) before the switch to gbuild, and has been "lost" ever since---but apparently a loss not mourned much over the years. For the SDK, c5f974287fd04bb529de145113133b9e35687702 "INTEGRATION: CWS jsc3: #i62434# copy libsalcpprt.a" added the library (under Linux) and 6db9c5af960f9787e33e4addc56bddbb1695a402 "INTEGRATION: CWS jsc3: #i62434# extend link options for executbales to link libsalcpprt.a, LINUX only" added its use to odk/settings/settings.mk, but fc0ca57f2cd649c6330171445a06b80e2143a0e9 "INTEGRATION: CWS jsc21" removed that use again (for no documented reason). So this is an incompatible change, but unlikely to actually affect any users of the SDK. Change-Id: Ia38b4c439f21fca3f5d9af7d1a34054e992054e9 Reviewed-on: https://gerrit.libreoffice.org/31810 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-29Support ConstCharArrayDetector also for UTF-16 arraysStephan Bergmann
The long-term benefit will be support of C++11 char16_t string literals (for cases of string literals with non-ASCII content) once we drop any compilers that don't support those yet. The short-term benefit is support for an improved OUStringLiteral1 that accepts any sal_Unicode value, not just ASCII ones (see next commit). Change-Id: I3f8f6697d7eb62b5176b7e812b5a5113c53b83a4 Reviewed-on: https://gerrit.libreoffice.org/28445 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-31Typo in HAVE_BROKEN_STATIC_INITILIZER_LISTStephan Bergmann
Change-Id: Ia29868d1832b529d438a5a5448b751683c226846
2015-11-09Prevent += called on temporary O[U]String instancesStephan Bergmann
...found regression e31205f3ec1f941ab5a188bfde6329edf2acc55b "EditUndoRemoveChars::GetStr must return a reference" and dubious code 0e23f7b0839df68d277186b4df54ba391ac3406a "Lets assume this doesn't want to update m_pForcedPrefix->GetText() anyway" in addition to the apparent sillies directly fixed in this commit. Introduces HAVE_CXX11_REF_QUALIFIER. Change-Id: I564e98254fd53c1dd9b34193d7057c59721ee24c
2015-10-12HAVE_CXX11_PERFECT_FORWARDING is required on all supported toolchainsStephan Bergmann
Change-Id: I8f4d7f8ebdfa0fb2c5a8efc676d1f66876b6daa9
2015-10-12HAVE_CXX11_FINAL is required on all supported toolchainsStephan Bergmann
Change-Id: I85ed86fdd8b11863c96b7a6c3ba76d77dbecf192
2015-10-12HAVE_CXX11_OVERRIDE is required on all supported toolchainsStephan Bergmann
Change-Id: Ibc5462642d0a3cd0f96668472ddc0ac0ae407132
2015-10-12HAVE_CXX11_DELETE is required on all supported toolchainsStephan Bergmann
Change-Id: I53c746be98972c7024dc2f340738182e46c24241
2015-09-30Avoid unhelpful -Wunused-variableStephan Bergmann
...at least from "g++ (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)" with --disable-debug, when a namespace-scope const variable with a "complex" initializer declared in an include file remains unused. Avoid that warning via SAL_CONSTEXPR, which in turn requires large parts of o3tl::is_typed_flags to be SAL_CONSTEXPR, which in turn requires a new HAVE_CXX14_CONSTEXPR to allow assert in constexpr functions, which in turn requires using -std=c++14 instead of -std=c++11 where available, which in turn (a) requires to /not/ use -std=c++14 if it would run into a bug between Clang and libstdc++ discussed at <https://llvm.org/bugs/show_bug.cgi?id=24115> "llvm-nm fails to build with gcc 5.1's libstdc++" (and which hits us in sfx2/source/control/thumbnailview.cxx), and (b) requires a new HAVE_CXX14_SIZED_DEALLOCATION to work around GCC 5.1 -Werror=sized-deallocation (where Clang >= 3.7 only supports C++14 sized deallocation when explictly enabled via -fsized-deallocation, btw). This effectively reverts ff6462e6307e6924dc6c8178043ae9032f4b4152 "avoid unused variable warning:" again. Change-Id: I424e3561452a3e6d8c8a9604d6c737cab49840c4 Reviewed-on: https://gerrit.libreoffice.org/18918 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-06-19Fix check for broken standard libraryStephan Bergmann
The compiler's __GNUC__ etc. need not match the libstdc++ version used (esp. when using Clang as compiler), and libstdc++'s __GLIBCXX__ macro doesn't inrease monotonically with version numbers, so resort to a configure check. Change-Id: I06de6b68324169863f6f5c31ae5d855e8b04cd6b
2015-02-10Properly check for Clang with static initializer_list bugStephan Bergmann
Change-Id: I98060f1adae0ba8ec03b2f0d6b0db6d5a1c0385c
2015-02-06Make OUStringLiteral more usefulStephan Bergmann
...don't dare make it non-explicit, yet. Along the way, introduce SAL_CONSTEXPR. Change-Id: Ia3179d0d5e001fd7aa92237c97437e9b74366ee1
2014-10-02remove HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE check and macroMichael Stahl
This is supported in GCC 4.6.0 already: https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html Change-Id: I2f67e588eea3a323a2e9c81e39e56ab2e715a817
2014-10-02remove HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY check and macroMichael Stahl
This has been supported by GCC and clang for a very long time. Change-Id: I410a2b39004c932003f8cbefe935aedb109b1163
2014-09-11(Rudimentary) C++11 support is a hard requirement nowStephan Bergmann
Change-Id: I43ed776d52336b822aa6152f0f2a29e39303bb75