]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/makefile-redirection-stderr'
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Apr 2016 21:12:37 +0000 (14:12 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Apr 2016 21:12:38 +0000 (14:12 -0700)
A minor fix in the Makefile.

* jc/makefile-redirection-stderr:
  Makefile: fix misdirected redirections

1  2 
Makefile

diff --combined Makefile
index 2742a6977c6ad871897bc758ea2a7d76359b1eee,296f17528cd5bf0279f98dc3fb38841875e42bf8..c7354bf2adc626926a276fd49e874dbfa1081ad8
+++ b/Makefile
@@@ -39,9 -39,6 +39,9 @@@ all:
  # Define CURLDIR=/foo/bar if your curl header and library files are in
  # /foo/bar/include and /foo/bar/lib directories.
  #
 +# Define CURL_CONFIG to curl's configuration program that prints information
 +# about the library (e.g., its version number).  The default is 'curl-config'.
 +#
  # Define NO_EXPAT if you do not have expat installed.  git-http-push is
  # not built, and you cannot push using http:// and https:// transports (dumb).
  #
@@@ -77,6 -74,8 +77,6 @@@
  # Define HAVE_PATHS_H if you have paths.h and want to use the default PATH
  # it specifies.
  #
 -# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
 -#
  # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
  # d_type in struct dirent (Cygwin 1.5, fixed in Cygwin 1.7).
  #
  # Define PPC_SHA1 environment variable when running make to make use of
  # a bundled SHA1 routine optimized for PowerPC.
  #
 +# Define SHA1_MAX_BLOCK_SIZE to limit the amount of data that will be hashed
 +# in one call to the platform's SHA1_Update(). e.g. APPLE_COMMON_CRYPTO
 +# wants 'SHA1_MAX_BLOCK_SIZE=1024L*1024L*1024L' defined.
 +#
  # Define NEEDS_CRYPTO_WITH_SSL if you need -lcrypto when using -lssl (Darwin).
  #
  # Define NEEDS_SSL_WITH_CRYPTO if you need -lssl when using -lcrypto (Darwin).
  # as the compiler can crash (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49299)
  #
  # Define USE_NSEC below if you want git to care about sub-second file mtimes
 -# and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and
 -# it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely
 -# randomly break unless your underlying filesystem supports those sub-second
 -# times (my ext3 doesn't).
 +# and ctimes. Note that you need recent glibc (at least 2.2.4) for this. On
 +# Linux, kernel 2.6.11 or newer is required for reliable sub-second file times
 +# on file systems with exactly 1 ns or 1 s resolution. If you intend to use Git
 +# on other file systems (e.g. CEPH, CIFS, NTFS, UDF), don't enable USE_NSEC. See
 +# Documentation/technical/racy-git.txt for details.
  #
  # Define USE_ST_TIMESPEC if your "struct stat" uses "st_ctimespec" instead of
  # "st_ctim"
  #
  # Define NO_TCLTK if you do not want Tcl/Tk GUI.
  #
 +# Define SANE_TEXT_GREP to "-a" if you use recent versions of GNU grep
 +# and egrep that are pickier when their input contains non-ASCII data.
 +#
  # The TCL_PATH variable governs the location of the Tcl interpreter
  # used to optimize git-gui for your system.  Only used if NO_TCLTK
  # is not set.  Defaults to the bare 'tclsh'.
  # compiler is detected to support it.
  #
  # Define HAVE_BSD_SYSCTL if your platform has a BSD-compatible sysctl function.
 +#
 +# Define HAVE_GETDELIM if your system has the getdelim() function.
  
  GIT-VERSION-FILE: FORCE
        @$(SHELL_PATH) ./GIT-VERSION-GEN
@@@ -383,21 -372,6 +383,21 @@@ ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS
  ALL_LDFLAGS = $(LDFLAGS)
  STRIP ?= strip
  
 +ifdef DEVELOPER
 +CFLAGS += -Werror \
 +      -Wdeclaration-after-statement \
 +      -Wno-format-zero-length \
 +      -Wold-style-definition \
 +      -Woverflow \
 +      -Wpointer-arith \
 +      -Wstrict-prototypes \
 +      -Wunused \
 +      -Wvla
 +endif
 +
 +# Create as necessary, replace existing, make ranlib unneeded.
 +ARFLAGS = rcs
 +
  # Among the variables below, these:
  #   gitexecdir
  #   template_dir
@@@ -448,7 -422,6 +448,7 @@@ TCL_PATH = tcls
  TCLTK_PATH = wish
  XGETTEXT = xgettext
  MSGFMT = msgfmt
 +CURL_CONFIG = curl-config
  PTHREAD_LIBS = -lpthread
  PTHREAD_CFLAGS =
  GCOV = gcov
@@@ -491,6 -464,7 +491,6 @@@ TEST_PROGRAMS_NEED_X 
  # interactive shell sessions without exporting it.
  unexport CDPATH
  
 -SCRIPT_SH += git-am.sh
  SCRIPT_SH += git-bisect.sh
  SCRIPT_SH += git-difftool--helper.sh
  SCRIPT_SH += git-filter-branch.sh
@@@ -498,6 -472,7 +498,6 @@@ SCRIPT_SH += git-merge-octopus.s
  SCRIPT_SH += git-merge-one-file.sh
  SCRIPT_SH += git-merge-resolve.sh
  SCRIPT_SH += git-mergetool.sh
 -SCRIPT_SH += git-pull.sh
  SCRIPT_SH += git-quiltimport.sh
  SCRIPT_SH += git-rebase.sh
  SCRIPT_SH += git-remote-testgit.sh
@@@ -597,8 -572,6 +597,8 @@@ TEST_PROGRAMS_NEED_X += test-dat
  TEST_PROGRAMS_NEED_X += test-delta
  TEST_PROGRAMS_NEED_X += test-dump-cache-tree
  TEST_PROGRAMS_NEED_X += test-dump-split-index
 +TEST_PROGRAMS_NEED_X += test-dump-untracked-cache
 +TEST_PROGRAMS_NEED_X += test-fake-ssh
  TEST_PROGRAMS_NEED_X += test-genrandom
  TEST_PROGRAMS_NEED_X += test-hashmap
  TEST_PROGRAMS_NEED_X += test-index-version
@@@ -618,7 -591,6 +618,7 @@@ TEST_PROGRAMS_NEED_X += test-sha
  TEST_PROGRAMS_NEED_X += test-sha1-array
  TEST_PROGRAMS_NEED_X += test-sigchain
  TEST_PROGRAMS_NEED_X += test-string-list
 +TEST_PROGRAMS_NEED_X += test-submodule-config
  TEST_PROGRAMS_NEED_X += test-subprocess
  TEST_PROGRAMS_NEED_X += test-svn-fe
  TEST_PROGRAMS_NEED_X += test-urlmatch-normalization
@@@ -751,7 -723,6 +751,7 @@@ LIB_OBJS += list-objects.
  LIB_OBJS += ll-merge.o
  LIB_OBJS += lockfile.o
  LIB_OBJS += log-tree.o
 +LIB_OBJS += mailinfo.o
  LIB_OBJS += mailmap.o
  LIB_OBJS += match-trees.o
  LIB_OBJS += merge.o
@@@ -788,8 -759,6 +788,8 @@@ LIB_OBJS += reachable.
  LIB_OBJS += read-cache.o
  LIB_OBJS += reflog-walk.o
  LIB_OBJS += refs.o
 +LIB_OBJS += refs/files-backend.o
 +LIB_OBJS += ref-filter.o
  LIB_OBJS += remote.o
  LIB_OBJS += replace_object.o
  LIB_OBJS += rerere.o
@@@ -812,10 -781,8 +812,10 @@@ LIB_OBJS += strbuf.
  LIB_OBJS += streaming.o
  LIB_OBJS += string-list.o
  LIB_OBJS += submodule.o
 +LIB_OBJS += submodule-config.o
  LIB_OBJS += symlinks.o
  LIB_OBJS += tag.o
 +LIB_OBJS += tempfile.o
  LIB_OBJS += trace.o
  LIB_OBJS += trailer.o
  LIB_OBJS += transport.o
@@@ -834,7 -801,6 +834,7 @@@ LIB_OBJS += version.
  LIB_OBJS += versioncmp.o
  LIB_OBJS += walker.o
  LIB_OBJS += wildmatch.o
 +LIB_OBJS += worktree.o
  LIB_OBJS += wrapper.o
  LIB_OBJS += write_or_die.o
  LIB_OBJS += ws.o
@@@ -843,7 -809,6 +843,7 @@@ LIB_OBJS += xdiff-interface.
  LIB_OBJS += zlib.o
  
  BUILTIN_OBJS += builtin/add.o
 +BUILTIN_OBJS += builtin/am.o
  BUILTIN_OBJS += builtin/annotate.o
  BUILTIN_OBJS += builtin/apply.o
  BUILTIN_OBJS += builtin/archive.o
@@@ -909,7 -874,6 +909,7 @@@ BUILTIN_OBJS += builtin/pack-refs.
  BUILTIN_OBJS += builtin/patch-id.o
  BUILTIN_OBJS += builtin/prune-packed.o
  BUILTIN_OBJS += builtin/prune.o
 +BUILTIN_OBJS += builtin/pull.o
  BUILTIN_OBJS += builtin/push.o
  BUILTIN_OBJS += builtin/read-tree.o
  BUILTIN_OBJS += builtin/receive-pack.o
@@@ -930,7 -894,6 +930,7 @@@ BUILTIN_OBJS += builtin/shortlog.
  BUILTIN_OBJS += builtin/show-branch.o
  BUILTIN_OBJS += builtin/show-ref.o
  BUILTIN_OBJS += builtin/stripspace.o
 +BUILTIN_OBJS += builtin/submodule--helper.o
  BUILTIN_OBJS += builtin/symbolic-ref.o
  BUILTIN_OBJS += builtin/tag.o
  BUILTIN_OBJS += builtin/unpack-file.o
@@@ -943,7 -906,6 +943,7 @@@ BUILTIN_OBJS += builtin/var.
  BUILTIN_OBJS += builtin/verify-commit.o
  BUILTIN_OBJS += builtin/verify-pack.o
  BUILTIN_OBJS += builtin/verify-tag.o
 +BUILTIN_OBJS += builtin/worktree.o
  BUILTIN_OBJS += builtin/write-tree.o
  
  GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
@@@ -1062,7 -1024,7 +1062,7 @@@ ifdef HAVE_ALLOCA_
  endif
  
  IMAP_SEND_BUILDDEPS =
 -IMAP_SEND_LDFLAGS = $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
 +IMAP_SEND_LDFLAGS =
  
  ifdef NO_CURL
        BASIC_CFLAGS += -DNO_CURL
        REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
        PROGRAM_OBJS += http-fetch.o
        PROGRAMS += $(REMOTE_CURL_NAMES)
 -      curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
 +      curl_check := $(shell (echo 070908; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
        ifeq "$(curl_check)" "070908"
                ifndef NO_EXPAT
                        PROGRAM_OBJS += http-push.o
                endif
        endif
 -      curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
 +      curl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
        ifeq "$(curl_check)" "072200"
                USE_CURL_FOR_IMAP_SEND = YesPlease
        endif
                endif
        endif
  endif
 +IMAP_SEND_LDFLAGS += $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)
  
  ifdef ZLIB_PATH
        BASIC_CFLAGS += -I$(ZLIB_PATH)/include
@@@ -1190,6 -1151,9 +1190,6 @@@ endi
  ifdef NO_D_TYPE_IN_DIRENT
        BASIC_CFLAGS += -DNO_D_TYPE_IN_DIRENT
  endif
 -ifdef NO_D_INO_IN_DIRENT
 -      BASIC_CFLAGS += -DNO_D_INO_IN_DIRENT
 -endif
  ifdef NO_GECOS_IN_PWENT
        BASIC_CFLAGS += -DNO_GECOS_IN_PWENT
  endif
@@@ -1359,11 -1323,6 +1359,11 @@@ ifdef NO_POSIX_GOODIE
        BASIC_CFLAGS += -DNO_POSIX_GOODIES
  endif
  
 +ifdef APPLE_COMMON_CRYPTO
 +      # Apple CommonCrypto requires chunking
 +      SHA1_MAX_BLOCK_SIZE = 1024L*1024L*1024L
 +endif
 +
  ifdef BLK_SHA1
        SHA1_HEADER = "block-sha1/sha1.h"
        LIB_OBJS += block-sha1/sha1.o
@@@ -1382,10 -1341,6 +1382,10 @@@ endi
  endif
  endif
  
 +ifdef SHA1_MAX_BLOCK_SIZE
 +      LIB_OBJS += compat/sha1-chunked.o
 +      BASIC_CFLAGS += -DSHA1_MAX_BLOCK_SIZE="$(SHA1_MAX_BLOCK_SIZE)"
 +endif
  ifdef NO_PERL_MAKEMAKER
        export NO_PERL_MAKEMAKER
  endif
@@@ -1482,10 -1437,6 +1482,10 @@@ ifdef HAVE_BSD_SYSCT
        BASIC_CFLAGS += -DHAVE_BSD_SYSCTL
  endif
  
 +ifdef HAVE_GETDELIM
 +      BASIC_CFLAGS += -DHAVE_GETDELIM
 +endif
 +
  ifeq ($(TCLTK_PATH),)
  NO_TCLTK = NoThanks
  endif
@@@ -1501,13 -1452,13 +1501,13 @@@ endi
  QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir
  QUIET_SUBDIR1  =
  
 -ifneq ($(findstring $(MAKEFLAGS),w),w)
 +ifneq ($(findstring w,$(MAKEFLAGS)),w)
  PRINT_DIR = --no-print-directory
  else # "make -w"
  NO_SUBDIR = :
  endif
  
 -ifneq ($(findstring $(MAKEFLAGS),s),s)
 +ifneq ($(findstring s,$(MAKEFLAGS)),s)
  ifndef V
        QUIET_CC       = @echo '   ' CC $@;
        QUIET_AR       = @echo '   ' AR $@;
@@@ -1736,14 -1687,14 +1736,14 @@@ $(BUILT_INS): git$
        ln -s $< $@ 2>/dev/null || \
        cp $< $@
  
 -common-cmds.h: ./generate-cmdlist.sh command-list.txt
 +common-cmds.h: generate-cmdlist.sh command-list.txt
  
  common-cmds.h: $(wildcard Documentation/git-*.txt)
 -      $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
 +      $(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@
  
  SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\
        $(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\
 -      $(gitwebdir_SQ):$(PERL_PATH_SQ)
 +      $(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP)
  define cmd_munge_script
  $(RM) $@ $@+ && \
  sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
      -e $(BROKEN_PATH_FIX) \
      -e 's|@@GITWEBDIR@@|$(gitwebdir_SQ)|g' \
      -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
 +    -e 's|@@SANE_TEXT_GREP@@|$(SANE_TEXT_GREP)|g' \
      $@.sh >$@+
  endef
  
@@@ -2012,10 -1962,10 +2012,10 @@@ git-imap-send$X: imap-send.o $(IMAP_SEN
  
  git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 -              $(LIBS) $(CURL_LIBCURL)
 +              $(CURL_LIBCURL) $(LIBS)
  git-http-push$X: http.o http-push.o GIT-LDFLAGS $(GITLIBS)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 -              $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
 +              $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)
  
  git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) \
@@@ -2029,20 -1979,19 +2029,20 @@@ $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_P
  
  $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o GIT-LDFLAGS $(GITLIBS)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 -              $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
 +              $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)
  
  $(LIB_FILE): $(LIB_OBJS)
 -      $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $^
 +      $(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
  
  $(XDIFF_LIB): $(XDIFF_OBJS)
 -      $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $^
 +      $(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
  
  $(VCSSVN_LIB): $(VCSSVN_OBJS)
 -      $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $^
 +      $(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
  
  export DEFAULT_EDITOR DEFAULT_PAGER
  
 +.PHONY: doc man html info pdf
  doc:
        $(MAKE) -C Documentation all
  
@@@ -2086,7 -2035,6 +2086,7 @@@ po/git.pot: $(GENERATED_H) FORC
                $(LOCALIZED_PERL)
        mv $@+ $@
  
 +.PHONY: pot
  pot: po/git.pot
  
  POFILES := $(wildcard po/*.po)
@@@ -2263,10 -2211,10 +2263,10 @@@ sparse: $(SP_OBJ
  check: common-cmds.h
        @if sparse; \
        then \
-               echo 2>&1 "Use 'make sparse' instead"; \
+               echo >&2 "Use 'make sparse' instead"; \
                $(MAKE) --no-print-directory sparse; \
        else \
-               echo 2>&1 "Did you mean 'make test'?"; \
+               echo >&2 "Did you mean 'make test'?"; \
                exit 1; \
        fi
  
@@@ -2296,7 -2244,6 +2296,7 @@@ mergetools_instdir_SQ = $(subst ','\'',
  
  install_bindir_programs := $(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)) $(BINDIR_PROGRAMS_NO_X)
  
 +.PHONY: profile-install profile-fast-install
  profile-install: profile
        $(MAKE) install
  
@@@ -2363,8 -2310,6 +2363,8 @@@ endi
        done && \
        ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
  
 +.PHONY: install-gitweb install-doc install-man install-html install-info install-pdf
 +.PHONY: quick-install-doc quick-install-man quick-install-html
  install-gitweb:
        $(MAKE) -C gitweb install
  
@@@ -2424,7 -2369,6 +2424,7 @@@ rpm: dis
  
  htmldocs = git-htmldocs-$(GIT_VERSION)
  manpages = git-manpages-$(GIT_VERSION)
 +.PHONY: dist-doc distclean
  dist-doc:
        $(RM) -r .doc-tmp-dir
        mkdir .doc-tmp-dir
@@@ -2456,7 -2400,7 +2456,7 @@@ profile-clean
        $(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs)))
  
  clean: profile-clean coverage-clean
 -      $(RM) *.o *.res block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o
 +      $(RM) *.o *.res refs/*.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o
        $(RM) xdiff/*.o vcs-svn/*.o ewah/*.o builtin/*.o
        $(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)
        $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
@@@ -2493,8 -2437,6 +2493,8 @@@ ALL_COMMANDS += gi
  ALL_COMMANDS += gitk
  ALL_COMMANDS += gitweb
  ALL_COMMANDS += git-gui git-citool
 +
 +.PHONY: check-docs
  check-docs::
        @(for v in $(ALL_COMMANDS); \
        do \
                esac ; \
                test -f "Documentation/$$v.txt" || \
                echo "no doc: $$v"; \
 -              sed -e '/^#/d' command-list.txt | \
 +              sed -e '1,/^### command list/d' -e '/^#/d' command-list.txt | \
                grep -q "^$$v[  ]" || \
                case "$$v" in \
                git) ;; \
                esac ; \
        done; \
        ( \
 -              sed -e '/^#/d' \
 +              sed -e '1,/^### command list/d' \
 +                  -e '/^#/d' \
                    -e 's/[     ].*//' \
                    -e 's/^/listed /' command-list.txt; \
                $(MAKE) -C Documentation print-man1 | \
@@@ -2539,7 -2480,6 +2539,7 @@@ check-builtins:
  ### Test suite coverage testing
  #
  .PHONY: coverage coverage-clean coverage-compile coverage-test coverage-report
 +.PHONY: coverage-untested-functions cover_db cover_db_html
  .PHONY: coverage-clean-results
  
  coverage: