Merge branch 'rj/sparse-updates' into next
authorJunio C Hamano <gitster@pobox.com>
Wed, 14 Feb 2018 21:34:31 +0000 (13:34 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Feb 2018 21:34:31 +0000 (13:34 -0800)
Devtool update.

* rj/sparse-updates:
Makefile: suppress a sparse warning for pack-revindex.c
config.mak.uname: remove SPARSE_FLAGS setting for cygwin

1  2 
Makefile
diff --combined Makefile
index c56fdc14ca154b7d80541569d9abf700ea419499,7f40f76739e9c9eca58c2d6743a55c7d02bcab9c..f6d9523b9597700baf2beaa2e0f240ca99f9d552
+++ b/Makefile
@@@ -294,6 -294,9 +294,6 @@@ all:
  #
  # Define PERL_PATH to the path of your Perl binary (usually /usr/bin/perl).
  #
 -# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
 -# MakeMaker (e.g. using ActiveState under Cygwin).
 -#
  # Define NO_PERL if you do not want Perl scripts or libraries at all.
  #
  # Define PYTHON_PATH to the path of your Python binary (often /usr/bin/python
@@@ -476,7 -479,6 +476,7 @@@ gitexecdir = libexec/git-cor
  mergetoolsdir = $(gitexecdir)/mergetools
  sharedir = $(prefix)/share
  gitwebdir = $(sharedir)/gitweb
 +perllibdir = $(sharedir)/perl5
  localedir = $(sharedir)/locale
  template_dir = share/git-core/templates
  htmldir = $(prefix)/share/doc/git-doc
@@@ -490,7 -492,7 +490,7 @@@ mandir_relative = $(patsubst $(prefix)/
  infodir_relative = $(patsubst $(prefix)/%,%,$(infodir))
  htmldir_relative = $(patsubst $(prefix)/%,%,$(htmldir))
  
 -export prefix bindir sharedir sysconfdir gitwebdir localedir
 +export prefix bindir sharedir sysconfdir gitwebdir perllibdir localedir
  
  CC = cc
  AR = ar
@@@ -802,7 -804,6 +802,7 @@@ LIB_OBJS += ewah/ewah_bitmap.
  LIB_OBJS += ewah/ewah_io.o
  LIB_OBJS += ewah/ewah_rlw.o
  LIB_OBJS += exec_cmd.o
 +LIB_OBJS += fetch-object.o
  LIB_OBJS += fetch-pack.o
  LIB_OBJS += fsck.o
  LIB_OBJS += fsmonitor.o
@@@ -831,6 -832,7 +831,6 @@@ LIB_OBJS += merge.
  LIB_OBJS += merge-blobs.o
  LIB_OBJS += merge-recursive.o
  LIB_OBJS += mergesort.o
 -LIB_OBJS += mru.o
  LIB_OBJS += name-hash.o
  LIB_OBJS += notes.o
  LIB_OBJS += notes-cache.o
@@@ -1513,9 -1515,7 +1513,9 @@@ els
        LIB_OBJS += sha1dc_git.o
  ifdef DC_SHA1_EXTERNAL
        ifdef DC_SHA1_SUBMODULE
 +              ifneq ($(DC_SHA1_SUBMODULE),auto)
  $(error Only set DC_SHA1_EXTERNAL or DC_SHA1_SUBMODULE, not both)
 +              endif
        endif
        BASIC_CFLAGS += -DDC_SHA1_EXTERNAL
        EXTLIBS += -lsha1detectcoll
@@@ -1543,6 -1543,9 +1543,6 @@@ ifdef SHA1_MAX_BLOCK_SIZ
        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
  ifdef NO_HSTRERROR
        COMPAT_CFLAGS += -DNO_HSTRERROR
        COMPAT_OBJS += compat/hstrerror.o
@@@ -1729,10 -1732,8 +1729,10 @@@ ETC_GITATTRIBUTES_SQ = $(subst ','\'',$
  DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
  bindir_SQ = $(subst ','\'',$(bindir))
  bindir_relative_SQ = $(subst ','\'',$(bindir_relative))
 +mandir_SQ = $(subst ','\'',$(mandir))
  mandir_relative_SQ = $(subst ','\'',$(mandir_relative))
  infodir_relative_SQ = $(subst ','\'',$(infodir_relative))
 +perllibdir_SQ = $(subst ','\'',$(perllibdir))
  localedir_SQ = $(subst ','\'',$(localedir))
  gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
  template_dir_SQ = $(subst ','\'',$(template_dir))
@@@ -1842,6 -1843,9 +1842,6 @@@ all:
  ifndef NO_TCLTK
        $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all
        $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
 -endif
 -ifndef NO_PERL
 -      $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' localedir='$(localedir_SQ)' all
  endif
        $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) SHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)'
  
@@@ -1924,8 -1928,7 +1924,8 @@@ common-cmds.h: $(wildcard Documentation
  
  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):$(SANE_TEXT_GREP):$(PAGER_ENV)
 +      $(gitwebdir_SQ):$(PERL_PATH_SQ):$(SANE_TEXT_GREP):$(PAGER_ENV):\
 +      $(perllibdir_SQ)
  define cmd_munge_script
  $(RM) $@ $@+ && \
  sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
@@@ -1969,12 -1972,23 +1969,12 @@@ git.res: git.rc GIT-VERSION-FIL
  $(SCRIPT_PERL_GEN): GIT-BUILD-OPTIONS
  
  ifndef NO_PERL
 -$(SCRIPT_PERL_GEN): perl/perl.mak
 +$(SCRIPT_PERL_GEN):
  
 -perl/perl.mak: perl/PM.stamp
 -
 -perl/PM.stamp: FORCE
 -      @$(FIND) perl -type f -name '*.pm' | sort >$@+ && \
 -      $(PERL_PATH) -V >>$@+ && \
 -      { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \
 -      $(RM) $@+
 -
 -perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL
 -      $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
 -
 -PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ)
 -$(SCRIPT_PERL_GEN): % : %.perl perl/perl.mak GIT-PERL-DEFINES GIT-VERSION-FILE
 +PERL_DEFINES = $(PERL_PATH_SQ):$(PERLLIB_EXTRA_SQ):$(perllibdir_SQ)
 +$(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-VERSION-FILE
        $(QUIET_GEN)$(RM) $@ $@+ && \
 -      INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
 +      INSTLIBDIR='$(perllibdir_SQ)' && \
        INSTLIBDIR_EXTRA='$(PERLLIB_EXTRA_SQ)' && \
        INSTLIBDIR="$$INSTLIBDIR$${INSTLIBDIR_EXTRA:+:$$INSTLIBDIR_EXTRA}" && \
        sed -e '1{' \
@@@ -2162,6 -2176,8 +2162,8 @@@ gettext.sp gettext.s gettext.o: EXTRA_C
  http-push.sp http.sp http-walker.sp remote-curl.sp imap-send.sp: SPARSE_FLAGS += \
        -DCURL_DISABLE_TYPECHECK
  
+ pack-revindex.sp: SPARSE_FLAGS += -Wno-memcpy-max-count
  ifdef NO_EXPAT
  http-walker.sp http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
  endif
@@@ -2298,21 -2314,6 +2300,21 @@@ endi
  po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
        $(QUIET_MSGFMT)mkdir -p $(dir $@) && $(MSGFMT) -o $@ $<
  
 +LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
 +LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))
 +
 +ifndef NO_PERL
 +all:: $(LIB_PERL_GEN)
 +endif
 +
 +perl/build/lib/%.pm: perl/%.pm
 +      $(QUIET_GEN)mkdir -p $(dir $@) && \
 +      sed -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' < $< > $@
 +
 +perl/build/man/man3/Git.3pm: perl/Git.pm
 +      $(QUIET_GEN)mkdir -p $(dir $@) && \
 +      pod2man $< $@
 +
  FIND_SOURCE_FILES = ( \
        git ls-files \
                '*.[hcS]' \
@@@ -2573,9 -2574,7 +2575,9 @@@ ifndef NO_GETTEX
        (cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR) xof -)
  endif
  ifndef NO_PERL
 -      $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
 +      $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perllibdir_SQ)'
 +      (cd perl/build/lib && $(TAR) cf - .) | \
 +      (cd '$(DESTDIR_SQ)$(perllibdir_SQ)' && umask 022 && $(TAR) xof -)
        $(MAKE) -C gitweb install
  endif
  ifndef NO_TCLTK
@@@ -2625,17 -2624,12 +2627,17 @@@ endi
  install-gitweb:
        $(MAKE) -C gitweb install
  
 -install-doc:
 +install-doc: install-man-perl
        $(MAKE) -C Documentation install
  
 -install-man:
 +install-man: install-man-perl
        $(MAKE) -C Documentation install-man
  
 +install-man-perl: perl/build/man/man3/Git.3pm
 +      $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mandir_SQ)/man3'
 +      (cd perl/build/man/man3 && $(TAR) cf - .) | \
 +      (cd '$(DESTDIR_SQ)$(mandir_SQ)/man3' && umask 022 && $(TAR) xof -)
 +
  install-html:
        $(MAKE) -C Documentation install-html
  
@@@ -2670,21 -2664,6 +2672,21 @@@ dist: git-archive$(X) configur
                $(GIT_TARNAME)/configure \
                $(GIT_TARNAME)/version \
                $(GIT_TARNAME)/git-gui/version
 +ifdef DC_SHA1_SUBMODULE
 +      @mkdir -p $(GIT_TARNAME)/sha1collisiondetection/lib
 +      @cp sha1collisiondetection/LICENSE.txt \
 +              $(GIT_TARNAME)/sha1collisiondetection/
 +      @cp sha1collisiondetection/LICENSE.txt \
 +              $(GIT_TARNAME)/sha1collisiondetection/
 +      @cp sha1collisiondetection/lib/sha1.[ch] \
 +              $(GIT_TARNAME)/sha1collisiondetection/lib/
 +      @cp sha1collisiondetection/lib/ubc_check.[ch] \
 +              $(GIT_TARNAME)/sha1collisiondetection/lib/
 +      $(TAR) rf $(GIT_TARNAME).tar \
 +              $(GIT_TARNAME)/sha1collisiondetection/LICENSE.txt \
 +              $(GIT_TARNAME)/sha1collisiondetection/lib/sha1.[ch] \
 +              $(GIT_TARNAME)/sha1collisiondetection/lib/ubc_check.[ch]
 +endif
        @$(RM) -r $(GIT_TARNAME)
        gzip -f -9 $(GIT_TARNAME).tar
  
@@@ -2742,7 -2721,7 +2744,7 @@@ clean: profile-clean coverage-clea
        $(MAKE) -C Documentation/ clean
  ifndef NO_PERL
        $(MAKE) -C gitweb clean
 -      $(MAKE) -C perl clean
 +      $(RM) -r perl/build/
  endif
        $(MAKE) -C templates/ clean
        $(MAKE) -C t/ clean