Code

git-pickaxe: refcount origin correctly in find_copy_in_parent()
[git.git] / Makefile
index 4e7a37aa3c27225a86b16566fb96dc94362cd0d6..461fef636d59ebf46848b48636ae770e8684558f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -60,9 +60,6 @@ all:
 # on non-x86 architectures (e.g. PowerPC), while the OpenSSL version (default
 # choice) has very fast version optimized for i586.
 #
-# Define USE_PIC if you need the main git objects to be built with -fPIC
-# in order to build and link perl/Git.so.  x86-64 seems to need this.
-#
 # Define NEEDS_SSL_WITH_CRYPTO if you need -lcrypto with -lssl (Darwin).
 #
 # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
@@ -84,8 +81,6 @@ all:
 # Define NO_ACCURATE_DIFF if your diff program at least sometimes misses
 # a missing newline at the end of the file.
 #
-# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
-#
 # Define COLLISION_CHECK below if you believe that SHA1's
 # 1461501637330902918203684832716283019655932542976 hashes do not give you
 # sufficient guarantee that no collisions between objects will ever happen.
@@ -112,12 +107,9 @@ uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
 # CFLAGS and LDFLAGS are for the users to override from the command line.
 
 CFLAGS = -g -O2 -Wall
-PIC_FLAG = -fPIC
 LDFLAGS =
 ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
-PERL_CFLAGS =
-PERL_LDFLAGS =
 STRIP ?= strip
 
 prefix = $(HOME)
@@ -132,10 +124,14 @@ GITWEB_CONFIG = gitweb_config.perl
 GITWEB_HOME_LINK_STR = projects
 GITWEB_SITENAME =
 GITWEB_PROJECTROOT = /pub/git
+GITWEB_EXPORT_OK =
+GITWEB_STRICT_EXPORT =
+GITWEB_BASE_URL =
 GITWEB_LIST =
 GITWEB_HOMETEXT = indextext.html
 GITWEB_CSS = gitweb.css
 GITWEB_LOGO = git-logo.png
+GITWEB_FAVICON = git-favicon.png
 
 export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
 
@@ -154,9 +150,10 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
 ### --- END CONFIGURATION SECTION ---
 
 # Those must not be GNU-specific; they are shared with perl/ which may
-# be built by a different compiler.
-BASIC_CFLAGS = $(PERL_CFLAGS)
-BASIC_LDFLAGS = $(PERL_LDFLAGS)
+# be built by a different compiler. (Note that this is an artifact now
+# but it still might be nice to keep that distinction.)
+BASIC_CFLAGS =
+BASIC_LDFLAGS =
 
 SCRIPT_SH = \
        git-bisect.sh git-branch.sh git-checkout.sh \
@@ -181,7 +178,7 @@ SCRIPT_PERL = \
        git-send-email.perl git-svn.perl
 
 SCRIPT_PYTHON = \
-       git-merge-recursive.py
+       git-merge-recursive-old.py
 
 SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
          $(patsubst %.perl,%,$(SCRIPT_PERL)) \
@@ -205,7 +202,12 @@ PROGRAMS = \
        git-update-server-info$X \
        git-upload-pack$X git-verify-pack$X \
        git-pack-redundant$X git-var$X \
-       git-describe$X git-merge-tree$X git-blame$X git-imap-send$X
+       git-describe$X git-merge-tree$X git-blame$X git-imap-send$X \
+       git-merge-recursive$X \
+       $(EXTRA_PROGRAMS)
+
+# Empty...
+EXTRA_PROGRAMS =
 
 BUILT_INS = \
        git-format-patch$X git-show$X git-whatchanged$X \
@@ -213,7 +215,8 @@ BUILT_INS = \
        $(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
 
 # what 'all' will build and 'install' will install, in gitexecdir
-ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
+ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS) \
+       git-merge-recur$X
 
 # Backward compatibility -- to be removed after 1.0
 PROGRAMS += git-ssh-pull$X git-ssh-push$X
@@ -236,8 +239,8 @@ LIB_FILE=libgit.a
 XDIFF_LIB=xdiff/lib.a
 
 LIB_H = \
-       blob.h cache.h commit.h csum-file.h delta.h \
-       diff.h object.h pack.h pkt-line.h quote.h refs.h \
+       archive.h blob.h cache.h commit.h csum-file.h delta.h grep.h \
+       diff.h object.h pack.h pkt-line.h quote.h refs.h list-objects.h sideband.h \
        run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \
        tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h
 
@@ -248,17 +251,22 @@ DIFF_OBJS = \
 
 LIB_OBJS = \
        blob.o commit.o connect.o csum-file.o cache-tree.o base85.o \
-       date.o diff-delta.o entry.o exec_cmd.o ident.o lockfile.o \
-       object.o pack-check.o patch-delta.o path.o pkt-line.o \
+       date.o diff-delta.o entry.o exec_cmd.o ident.o \
+       interpolate.o \
+       lockfile.o \
+       object.o pack-check.o patch-delta.o path.o pkt-line.o sideband.o \
        quote.o read-cache.o refs.o run-command.o dir.o object-refs.o \
        server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
        tag.o tree.o usage.o config.o environment.o ctype.o copy.o \
        fetch-clone.o revision.o pager.o tree-walk.o xdiff-interface.o \
-       alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS)
+       write_or_die.o trace.o list-objects.o grep.o \
+       alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \
+       color.o wt-status.o archive-zip.o archive-tar.o
 
 BUILTIN_OBJS = \
        builtin-add.o \
        builtin-apply.o \
+       builtin-archive.o \
        builtin-cat-file.o \
        builtin-checkout-index.o \
        builtin-check-ref-format.o \
@@ -280,6 +288,7 @@ BUILTIN_OBJS = \
        builtin-mv.o \
        builtin-name-rev.o \
        builtin-pack-objects.o \
+       builtin-pickaxe.o \
        builtin-prune.o \
        builtin-prune-packed.o \
        builtin-push.o \
@@ -288,6 +297,7 @@ BUILTIN_OBJS = \
        builtin-rev-list.o \
        builtin-rev-parse.o \
        builtin-rm.o \
+       builtin-runstatus.o \
        builtin-show-branch.o \
        builtin-stripspace.o \
        builtin-symbolic-ref.o \
@@ -295,7 +305,7 @@ BUILTIN_OBJS = \
        builtin-unpack-objects.o \
        builtin-update-index.o \
        builtin-update-ref.o \
-       builtin-upload-tar.o \
+       builtin-upload-archive.o \
        builtin-verify-pack.o \
        builtin-write-tree.o
 
@@ -342,10 +352,12 @@ ifeq ($(uname_S),SunOS)
                NEEDS_LIBICONV = YesPlease
                NO_UNSETENV = YesPlease
                NO_SETENV = YesPlease
+               NO_C99_FORMAT = YesPlease
        endif
        ifeq ($(uname_R),5.9)
                NO_UNSETENV = YesPlease
                NO_SETENV = YesPlease
+               NO_C99_FORMAT = YesPlease
        endif
        INSTALL = ginstall
        TAR = gtar
@@ -403,12 +415,6 @@ endif
 ifneq (,$(findstring arm,$(uname_M)))
        ARM_SHA1 = YesPlease
 endif
-ifeq ($(uname_M),sun4u)
-       USE_PIC = YesPlease
-endif
-ifeq ($(uname_M),x86_64)
-       USE_PIC = YesPlease
-endif
 
 -include config.mak.autogen
 -include config.mak
@@ -504,7 +510,7 @@ ifdef NO_SETENV
        COMPAT_CFLAGS += -DNO_SETENV
        COMPAT_OBJS += compat/setenv.o
 endif
-ifdef NO_SETENV
+ifdef NO_UNSETENV
        COMPAT_CFLAGS += -DNO_UNSETENV
        COMPAT_OBJS += compat/unsetenv.o
 endif
@@ -525,6 +531,9 @@ endif
 ifdef NO_INET_NTOP
        LIB_OBJS += compat/inet_ntop.o
 endif
+ifdef NO_INET_PTON
+       LIB_OBJS += compat/inet_pton.o
+endif
 
 ifdef NO_ICONV
        BASIC_CFLAGS += -DNO_ICONV
@@ -547,9 +556,6 @@ else
 endif
 endif
 endif
-ifdef USE_PIC
-       ALL_CFLAGS += $(PIC_FLAG)
-endif
 ifdef NO_ACCURATE_DIFF
        BASIC_CFLAGS += -DNO_ACCURATE_DIFF
 endif
@@ -598,6 +604,9 @@ git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS
 
 help.o: common-cmds.h
 
+git-merge-recur$X: git-merge-recursive$X
+       rm -f $@ && ln git-merge-recursive$X $@
+
 $(BUILT_INS): git$X
        rm -f $@ && ln git$X $@
 
@@ -659,10 +668,14 @@ gitweb/gitweb.cgi: gitweb/gitweb.perl
            -e 's|++GITWEB_HOME_LINK_STR++|$(GITWEB_HOME_LINK_STR)|g' \
            -e 's|++GITWEB_SITENAME++|$(GITWEB_SITENAME)|g' \
            -e 's|++GITWEB_PROJECTROOT++|$(GITWEB_PROJECTROOT)|g' \
+           -e 's|++GITWEB_EXPORT_OK++|$(GITWEB_EXPORT_OK)|g' \
+           -e 's|++GITWEB_STRICT_EXPORT++|$(GITWEB_STRICT_EXPORT)|g' \
+           -e 's|++GITWEB_BASE_URL++|$(GITWEB_BASE_URL)|g' \
            -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \
            -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \
            -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \
            -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
+           -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
            $< >$@+
        chmod +x $@+
        mv $@+ $@
@@ -748,20 +761,16 @@ $(LIB_FILE): $(LIB_OBJS)
        rm -f $@ && $(AR) rcs $@ $(LIB_OBJS)
 
 XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o
+$(XDIFF_OBJS): xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \
+       xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
 
 $(XDIFF_LIB): $(XDIFF_OBJS)
        rm -f $@ && $(AR) rcs $@ $(XDIFF_OBJS)
 
 
-PERL_DEFINE = $(BASIC_CFLAGS) -DGIT_VERSION='"$(GIT_VERSION)"'
-PERL_DEFINE_SQ = $(subst ','\'',$(PERL_DEFINE))
-PERL_LIBS = $(BASIC_LDFLAGS) $(EXTLIBS)
-PERL_LIBS_SQ = $(subst ','\'',$(PERL_LIBS))
 perl/Makefile: perl/Git.pm perl/Makefile.PL GIT-CFLAGS
        (cd perl && $(PERL_PATH) Makefile.PL \
-               PREFIX='$(prefix_SQ)' \
-               DEFINE='$(PERL_DEFINE_SQ)' \
-               LIBS='$(PERL_LIBS_SQ)')
+               PREFIX='$(prefix_SQ)')
 
 doc:
        $(MAKE) -C Documentation all
@@ -850,8 +859,9 @@ git.spec: git.spec.in
        mv $@+ $@
 
 GIT_TARNAME=git-$(GIT_VERSION)
-dist: git.spec git-tar-tree
-       ./git-tar-tree HEAD^{tree} $(GIT_TARNAME) > $(GIT_TARNAME).tar
+dist: git.spec git-archive
+       ./git-archive --format=tar \
+               --prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar
        @mkdir -p $(GIT_TARNAME)
        @cp git.spec $(GIT_TARNAME)
        @echo $(GIT_VERSION) > $(GIT_TARNAME)/version
@@ -912,7 +922,8 @@ check-docs::
        do \
                case "$$v" in \
                git-merge-octopus | git-merge-ours | git-merge-recursive | \
-               git-merge-resolve | git-merge-stupid | \
+               git-merge-resolve | git-merge-stupid | git-merge-recur | \
+               git-merge-recursive-old | \
                git-ssh-pull | git-ssh-push ) continue ;; \
                esac ; \
                test -f "Documentation/$$v.txt" || \