X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=0d230227c2de3ad8ae78de640d682258189111e3;hb=cbb08c2e0b41ab162838aa1e83b959bac91151e2;hp=75b407c276f71ec0feded0b31ddf25df2530d4fc;hpb=3fc44a10f62fdca29558dc553a3e12949af30637;p=git.git diff --git a/Makefile b/Makefile index 75b407c27..0d230227c 100644 --- a/Makefile +++ b/Makefile @@ -30,15 +30,15 @@ all:: # Define LIBPCREDIR=/foo/bar if your libpcre header and library files are in # /foo/bar/include and /foo/bar/lib directories. # -# Define NO_CURL if you do not have libcurl installed. git-http-pull and +# Define NO_CURL if you do not have libcurl installed. git-http-fetch and # git-http-push are not built, and you cannot use http:// and https:// -# transports. +# transports (neither smart nor dumb). # # Define CURLDIR=/foo/bar if your curl header and library files are in # /foo/bar/include and /foo/bar/lib directories. # # 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. +# not built, and you cannot push using http:// and https:// transports (dumb). # # Define EXPATDIR=/foo/bar if your expat header and library files are in # /foo/bar/include and /foo/bar/lib directories. @@ -115,6 +115,10 @@ all:: # # Define NEEDS_SSL_WITH_CRYPTO if you need -lssl when using -lcrypto (Darwin). # +# Define NEEDS_SSL_WITH_CURL if you need -lssl with -lcurl (Minix). +# +# Define NEEDS_IDN_WITH_CURL if you need -lidn when using -lcurl (Minix). +# # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin). # # Define NEEDS_SOCKET if linking with libc is not enough (SunOS, @@ -153,6 +157,9 @@ all:: # that tells runtime paths to dynamic libraries; # "-Wl,-rpath=/path/lib" is used instead. # +# Define NO_NORETURN if using buggy versions of gcc 4.6+ and profile feedback, +# 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 @@ -243,10 +250,6 @@ all:: # DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR', # DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork' # -# Define COMPUTE_HEADER_DEPENDENCIES if your compiler supports the -MMD option -# and you want to avoid rebuilding objects when an unrelated header file -# changes. -# # Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded # dependency rules. # @@ -295,6 +298,7 @@ bindir = $(prefix)/$(bindir_relative) mandir = share/man infodir = share/info gitexecdir = libexec/git-core +mergetoolsdir = $(gitexecdir)/mergetools sharedir = $(prefix)/share gitwebdir = $(sharedir)/gitweb template_dir = share/git-core/templates @@ -497,6 +501,7 @@ VCSSVN_LIB=vcs-svn/lib.a LIB_H += advice.h LIB_H += archive.h +LIB_H += argv-array.h LIB_H += attr.h LIB_H += blob.h LIB_H += builtin.h @@ -507,10 +512,12 @@ LIB_H += commit.h LIB_H += compat/bswap.h LIB_H += compat/cygwin.h LIB_H += compat/mingw.h +LIB_H += compat/obstack.h LIB_H += compat/win32/pthread.h LIB_H += compat/win32/syslog.h LIB_H += compat/win32/sys/poll.h LIB_H += compat/win32/dirent.h +LIB_H += connected.h LIB_H += csum-file.h LIB_H += decorate.h LIB_H += delta.h @@ -525,6 +532,7 @@ LIB_H += graph.h LIB_H += grep.h LIB_H += hash.h LIB_H += help.h +LIB_H += kwset.h LIB_H += levenshtein.h LIB_H += list-objects.h LIB_H += ll-merge.h @@ -551,11 +559,13 @@ LIB_H += rerere.h LIB_H += resolve-undo.h LIB_H += revision.h LIB_H += run-command.h +LIB_H += sequencer.h LIB_H += sha1-array.h LIB_H += sha1-lookup.h LIB_H += sideband.h LIB_H += sigchain.h LIB_H += strbuf.h +LIB_H += streaming.h LIB_H += string-list.h LIB_H += submodule.h LIB_H += tag.h @@ -575,6 +585,7 @@ LIB_OBJS += alloc.o LIB_OBJS += archive.o LIB_OBJS += archive-tar.o LIB_OBJS += archive-zip.o +LIB_OBJS += argv-array.o LIB_OBJS += attr.o LIB_OBJS += base85.o LIB_OBJS += bisect.o @@ -585,8 +596,10 @@ LIB_OBJS += cache-tree.o LIB_OBJS += color.o LIB_OBJS += combine-diff.o LIB_OBJS += commit.o +LIB_OBJS += compat/obstack.o LIB_OBJS += config.o LIB_OBJS += connect.o +LIB_OBJS += connected.o LIB_OBJS += convert.o LIB_OBJS += copy.o LIB_OBJS += csum-file.o @@ -614,6 +627,7 @@ LIB_OBJS += hash.o LIB_OBJS += help.o LIB_OBJS += hex.o LIB_OBJS += ident.o +LIB_OBJS += kwset.o LIB_OBJS += levenshtein.o LIB_OBJS += list-objects.o LIB_OBJS += ll-merge.o @@ -634,6 +648,7 @@ LIB_OBJS += pack-revindex.o LIB_OBJS += pack-write.o LIB_OBJS += pager.o LIB_OBJS += parse-options.o +LIB_OBJS += parse-options-cb.o LIB_OBJS += patch-delta.o LIB_OBJS += patch-ids.o LIB_OBJS += path.o @@ -654,6 +669,7 @@ LIB_OBJS += revision.o LIB_OBJS += run-command.o LIB_OBJS += server-info.o LIB_OBJS += setup.o +LIB_OBJS += sequencer.o LIB_OBJS += sha1-array.o LIB_OBJS += sha1-lookup.o LIB_OBJS += sha1_file.o @@ -662,6 +678,7 @@ LIB_OBJS += shallow.o LIB_OBJS += sideband.o LIB_OBJS += sigchain.o LIB_OBJS += strbuf.o +LIB_OBJS += streaming.o LIB_OBJS += string-list.o LIB_OBJS += submodule.o LIB_OBJS += symlinks.o @@ -1124,8 +1141,6 @@ endif X = .exe endif ifeq ($(uname_S),Interix) - NO_SYS_POLL_H = YesPlease - NO_INTTYPES_H = YesPlease NO_INITGROUPS = YesPlease NO_IPV6 = YesPlease NO_MEMMEM = YesPlease @@ -1136,12 +1151,30 @@ ifeq ($(uname_S),Interix) ifeq ($(uname_R),3.5) NO_INET_NTOP = YesPlease NO_INET_PTON = YesPlease + NO_SOCKADDR_STORAGE = YesPlease + NO_FNMATCH_CASEFOLD = YesPlease endif ifeq ($(uname_R),5.2) NO_INET_NTOP = YesPlease NO_INET_PTON = YesPlease + NO_SOCKADDR_STORAGE = YesPlease + NO_FNMATCH_CASEFOLD = YesPlease endif endif +ifeq ($(uname_S),Minix) + NO_IPV6 = YesPlease + NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease + NO_NSEC = YesPlease + NEEDS_LIBGEN = + NEEDS_CRYPTO_WITH_SSL = YesPlease + NEEDS_IDN_WITH_CURL = YesPlease + NEEDS_SSL_WITH_CURL = YesPlease + NEEDS_RESOLV = + NO_HSTRERROR = YesPlease + NO_MMAP = YesPlease + NO_CURL = + NO_EXPAT = +endif ifneq (,$(findstring MINGW,$(uname_S))) pathsep = ; NO_PREAD = YesPlease @@ -1211,6 +1244,15 @@ endif ifdef CHECK_HEADER_DEPENDENCIES COMPUTE_HEADER_DEPENDENCIES = USE_COMPUTED_HEADER_DEPENDENCIES = +else +ifndef COMPUTE_HEADER_DEPENDENCIES +dep_check = $(shell $(CC) $(ALL_CFLAGS) \ + -c -MF /dev/null -MMD -MP -x c /dev/null -o /dev/null 2>&1; \ + echo $$?) +ifeq ($(dep_check),0) +COMPUTE_HEADER_DEPENDENCIES=YesPlease +endif +endif endif ifdef COMPUTE_HEADER_DEPENDENCIES @@ -1286,6 +1328,16 @@ else else CURL_LIBCURL = -lcurl endif + ifdef NEEDS_SSL_WITH_CURL + CURL_LIBCURL += -lssl + ifdef NEEDS_CRYPTO_WITH_SSL + CURL_LIBCURL += -lcrypto + endif + endif + ifdef NEEDS_IDN_WITH_CURL + CURL_LIBCURL += -lidn + endif + REMOTE_CURL_PRIMARY = git-remote-http$X REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) @@ -1322,7 +1374,7 @@ ifndef NO_OPENSSL OPENSSL_LINK = endif ifdef NEEDS_CRYPTO_WITH_SSL - OPENSSL_LINK += -lcrypto + OPENSSL_LIBSSL += -lcrypto endif else BASIC_CFLAGS += -DNO_OPENSSL @@ -1374,6 +1426,9 @@ endif ifdef USE_ST_TIMESPEC BASIC_CFLAGS += -DUSE_ST_TIMESPEC endif +ifdef NO_NORETURN + BASIC_CFLAGS += -DNO_NORETURN +endif ifdef NO_NSEC BASIC_CFLAGS += -DNO_NSEC endif @@ -1838,7 +1893,7 @@ ifndef NO_CURL GIT_OBJS += http.o http-walker.o remote-curl.o endif XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \ - xdiff/xmerge.o xdiff/xpatience.o + xdiff/xmerge.o xdiff/xpatience.o xdiff/xhistogram.o VCSSVN_OBJS = vcs-svn/string_pool.o vcs-svn/line_buffer.o \ vcs-svn/repo_tree.o vcs-svn/fast_export.o vcs-svn/svndump.o VCSSVN_TEST_OBJS = test-obj-pool.o test-string-pool.o \ @@ -1850,7 +1905,7 @@ dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS)))) ifdef COMPUTE_HEADER_DEPENDENCIES $(dep_dirs): - mkdir -p $@ + @mkdir -p $@ missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs)) dep_file = $(dir $@).depend/$(notdir $@).d @@ -2166,7 +2221,7 @@ test-delta$X: diff-delta.o patch-delta.o test-line-buffer$X: vcs-svn/lib.a -test-parse-options$X: parse-options.o +test-parse-options$X: parse-options.o parse-options-cb.o test-string-pool$X: vcs-svn/lib.a @@ -2219,6 +2274,13 @@ endif gitexec_instdir_SQ = $(subst ','\'',$(gitexec_instdir)) export gitexec_instdir +ifneq ($(filter /%,$(firstword $(mergetoolsdir))),) +mergetools_instdir = $(mergetoolsdir) +else +mergetools_instdir = $(prefix)/$(mergetoolsdir) +endif +mergetools_instdir_SQ = $(subst ','\'',$(mergetools_instdir)) + install_bindir_programs := $(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)) $(BINDIR_PROGRAMS_NO_X) install: all @@ -2228,6 +2290,8 @@ install: all $(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)' $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)' + $(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)' ifndef NO_PERL $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install $(MAKE) -C gitweb install @@ -2495,3 +2559,19 @@ cover_db: coverage-report cover_db_html: cover_db cover -report html -outputdir cover_db_html cover_db + +### profile feedback build +# +.PHONY: profile-all profile-clean + +PROFILE_GEN_CFLAGS := $(CFLAGS) -fprofile-generate -DNO_NORETURN=1 +PROFILE_USE_CFLAGS := $(CFLAGS) -fprofile-use -fprofile-correction -DNO_NORETURN=1 + +profile-clean: + $(RM) $(addsuffix *.gcda,$(object_dirs)) + $(RM) $(addsuffix *.gcno,$(object_dirs)) + +profile-all: profile-clean + $(MAKE) CFLAGS="$(PROFILE_GEN_CFLAGS)" all + $(MAKE) CFLAGS="$(PROFILE_GEN_CFLAGS)" -j1 test + $(MAKE) CFLAGS="$(PROFILE_USE_CFLAGS)" all