Commit graph

1253 commits

Author SHA1 Message Date
Jonathan Nieder 162213d232 Describe DOCBOOK_XSL_172, ASCIIDOC_NO_ROFF options in Makefile
There is excellent documentation for these options in
Documentation/Makefile, but some users may never find it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09 14:38:14 -07:00
Junio C Hamano 8ba5effa26 Merge branch 'ms/msvc'
* ms/msvc:
  Fix the exit code of MSVC build scripts on cygwin
  Fix MSVC build on cygwin
2009-10-09 00:02:23 -07:00
Brandon Casey 651aef3428 Makefile: add a note about the NO_MMAP setting on IRIX and IRIX64
When git is compiled with the MIPSpro 7.4.4m compiler, and NO_PTHREADS is
set, and NO_MMAP is _not_ set, then git segfaults when trying to access the
first entry in a reflog.  If NO_PTHREADS is not set (which implies that the
pthread library is linked in), or NO_MMAP _is_ set, then the segfault is
not encountered.  The conservative choice has been made to set NO_MMAP in
the Makefile to avoid this flaw.  The GNU C compiler does not produce this
behavior.

The segfault happens in refs.c:read_ref_at().  The mmap succeeds, and the
loop is executed properly until rec is rewound into the first line (reflog
entry) of the file.  The segfault is caught by test 28 of
t1400-update-ref.sh which fails when 'git rev-parse --verify "master@{May 25
2005}"' is called.

So, add a comment in the Makefile to describe why NO_MMAP is set and as a
hint to those who may be interested in unsetting it.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08 22:55:25 -07:00
Brandon Casey 817350d3af Makefile: enable THREADED_DELTA_SEARCH on IRIX and IRIX64
Since commit dcda3614 removed the use of a variable length array from
builtin-pack-objects.c, it is now safe to compile with the threaded delta
search feature enabled.  Formerly, the MIPSpro 7.4.4m compiler warned that
variable length arrays should not be used with pthreads.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08 22:54:09 -07:00
Ramsay Jones f2d50d937b Fix MSVC build on cygwin
In the MSVC section of the Makefile, BASIC_CFLAGS is set to a
value which contains the string "-DWIN32-D_CONSOLE". This results
in a (single) malformed -Define being passed to the compiler.
At least on my cygwin installation, the msvc compiler seems to
ignore this parameter, without issuing an error or warning, and
results in the WIN32 and _CONSOLE macros being undefined. This
breaks the build.

In order to fix the build, we simply insert a space between the
two -Define parameters, "-DWIN32" and "-D_CONSOLE", as originally
intended.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-08 22:50:58 -07:00
Brandon Casey 294ac78d14 Makefile: enable THREADED_DELTA_SEARCH on SunOS
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-07 22:04:19 -07:00
Marius Storm-Olsen f5c3178151 Tag GIT_VERSION when Git is built with MSVC
This may help us debug issues on Windows, as we now can build Git
natively on Windows with both MinGW and MSVC.

Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18 20:00:42 -07:00
Marius Storm-Olsen 164a5e3faa Add MSVC to Makefile
Enable MSVC builds with GNU Make by simply calling
    make MSVC=1
(Debug build possible by adding DEBUG=1 as well)

Two scripts, clink.pl and lib.pl, are used to convert certain GCC
specific command line options into something MSVC understands.
By building for MSVC with GNU Make, we can ensure that the MSVC
port always follows the latest code, and does not lag behind due
to unmaintained NMake Makefile or IDE projects.

Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-18 20:00:42 -07:00
Junio C Hamano dc1b0c06ee Merge branch 'jk/unwanted-advices'
* jk/unwanted-advices:
  status: make "how to stage" messages optional
  push: make non-fast-forward help message configurable
2009-09-13 01:33:18 -07:00
Junio C Hamano cd03eebbfd Merge branch 'db/vcs-helper'
* db/vcs-helper:
  Makefile: remove remnant of separate http/https/ftp helpers
  Use a clearer style to issue commands to remote helpers
  Make the "traditionally-supported" URLs a special case
  Makefile: install hardlinks for git-remote-<scheme> supported by libcurl if possible
  Makefile: do not link three copies of git-remote-* programs
  Makefile: git-http-fetch does not need expat
  http-fetch: Fix Makefile dependancies
  Add transport native helper executables to .gitignore
  git-http-fetch: not a builtin
  Use an external program to implement fetching with curl
  Add support for external programs for handling native fetches
2009-09-13 01:31:55 -07:00
Junio C Hamano 85cdaa468d Makefile: remove remnant of separate http/https/ftp helpers
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11 22:35:30 -07:00
Jeff King 75194438f4 push: make non-fast-forward help message configurable
This message is designed to help new users understand what
has happened when refs fail to push. However, it does not
help experienced users at all, and significantly clutters
the output, frequently dwarfing the regular status table and
making it harder to see.

This patch introduces a general configuration mechanism for
optional messages, with this push message as the first
example.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-11 21:33:20 -07:00
Brian Gernhardt 0460dba4b4 Makefile: Add NEEDS_CRYPTO_WITH_SSL
The Makefile comment for NEEDS_SSL_WITH_CRYPTO says to define it "if
you need -lcrypto with -lssl (Darwin)."  However, what it actually
does is add -lssl when you use -lcrypto and not the other way around.
However, libcrypto contains a majority of the ERR_* functions from
OpenSSL (at least on OS X) so we need it both ways.

So, add NEEDS_CRYPTO_WITH_SSL which adds -lcrypto to the OpenSSL link
flags and clarify the difference between it and NEEDS_SSL_WITH_CRYPTO.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-10 10:22:05 -07:00
Daniel Barkalow c9e388bb48 Make the "traditionally-supported" URLs a special case
Instead of trying to make http://, https://, and ftp:// URLs
indicative of some sort of pattern of transport helper usage, make
them a special case which runs the "curl" helper, and leave the
mechanism by which arbitrary helpers will be chosen entirely to future
work.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-03 21:27:36 -07:00
René Scharfe 53a1116c61 update-server-info: make builtin, use parseopt
Convert git update-server-info to a built-in command and use parseopt.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-29 14:07:25 -07:00
Junio C Hamano 106a36509d Merge branch 'lt/block-sha1'
* lt/block-sha1:
  remove ARM and Mozilla SHA1 implementations
  block-sha1: guard gcc extensions with __GNUC__
  make sure byte swapping is optimal for git
  block-sha1: make the size member first in the context struct
2009-08-27 17:00:35 -07:00
Brandon Casey b42c9af2cd Makefile: remove pointless conditional assignment in SunOS section
It is true that NEEDS_RESOLV is needed on SunOS if NO_IPV6 is set since
hstrerror() resides in libresolv, but performing this test at its current
location is not very useful.  It will only have any effect if the user
modifies the make variables from the make command line, and will have no
effect if a config.mak file is used.  A better location for this
conditional would have been further down in the Makefile after the
config.mak and config.mak.autogen had been parsed.  Rather than adding
clutter to the Makefile for a conditional that will likely never be
triggered, just remove it, and any user on SunOS that manually sets NO_IPV6
can also set NEEDS_RESOLV.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-27 16:20:10 -07:00
Junio C Hamano f00ecbe42b Merge branch 'cc/replace'
* cc/replace:
  t6050: check pushing something based on a replaced commit
  Documentation: add documentation for "git replace"
  Add git-replace to .gitignore
  builtin-replace: use "usage_msg_opt" to give better error messages
  parse-options: add new function "usage_msg_opt"
  builtin-replace: teach "git replace" to actually replace
  Add new "git replace" command
  environment: add global variable to disable replacement
  mktag: call "check_sha1_signature" with the replacement sha1
  replace_object: add a test case
  object: call "check_sha1_signature" with the replacement sha1
  sha1_file: add a "read_sha1_file_repl" function
  replace_object: add mechanism to replace objects found in "refs/replace/"
  refs: add a "for_each_replace_ref" function
2009-08-21 18:47:53 -07:00
Nicolas Pitre 30ae47b4cc remove ARM and Mozilla SHA1 implementations
They are both slower than the new BLK_SHA1 implementation, so it is
pointless to keep them around.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-18 14:19:40 -07:00
Junio C Hamano ad17f01399 Makefile: install hardlinks for git-remote-<scheme> supported by libcurl if possible
Instead of installing/copying three programs separately, just install one
and try to make hardlinks to the other two.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-07 12:20:29 -07:00
Junio C Hamano 611c7f6a37 Makefile: do not link three copies of git-remote-* programs
Instead, link only one and make the rest hardlinks/copies, like we do for
the built-ins.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-07 11:55:52 -07:00
Jeff King 17fd9f571f Makefile: git-http-fetch does not need expat
This appears to be a bad cut-and-paste in commit 1088261f.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-07 11:41:01 -07:00
Mike Ralphson ae209bd349 http-fetch: Fix Makefile dependancies
Specify git-http-fetch's dependancies explicitly rather than inheriting from
git-http-push, as that may not be built if the libcurl version is too old or
NO_EXPAT is defined

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-06 13:39:35 -07:00
Linus Torvalds d7c208a92e Add new optimized C 'block-sha1' routines
Based on the mozilla SHA1 routine, but doing the input data accesses a
word at a time and with 'htonl()' instead of loading bytes and shifting.

It requires an architecture that is ok with unaligned 32-bit loads and a
fast htonl().

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05 19:28:21 -07:00
Linus Torvalds 1088261f6f git-http-fetch: not a builtin
This splits up git-http-fetch so that it isn't built-in.

It also removes the general dependency on curl, because it is no
longer used by any built-in code. Because they are no longer LIB_OBJS,
add LIB_H to the dependencies of http-related object files, and remove
http.h from the dependencies of transport.o

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05 18:37:12 -07:00
Daniel Barkalow a2d725b7bd Use an external program to implement fetching with curl
Use the transport native helper mechanism to fetch by http (and ftp, etc).

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05 10:34:09 -07:00
Daniel Barkalow 6eb996b570 Add support for external programs for handling native fetches
transport_get() can call transport_native_helper_init() to have list and
fetch-ref operations handled by running a separate program as:

 git remote-<something> <remote> [<url>]

This program then accepts, on its stdin, "list" and "fetch <hex>
<name>" commands; the former prints out a list of available refs and
either their hashes or what they are symrefs to, while the latter
fetches them into the local object database and prints a newline when done.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-05 10:34:01 -07:00
Junio C Hamano f87dd2152a Merge branch 'maint'
* maint:
  SunOS grep does not understand -C<n> nor -e
  Fix export_marks() error handling.
  git branch: clean up detached branch handling
  git branch: avoid unnecessary object lookups
  git branch: fix performance problem
  do_one_ref(): null_sha1 check is not about broken ref

Conflicts:
	Makefile
2009-07-24 09:27:09 -07:00
Junio C Hamano 01ae841ccf SunOS grep does not understand -C<n> nor -e
The first "grep -C1" test in t7002 does not pass on my SunOS-5.11-i86pc,
and that is not because our way to spawn external grep is broken, but
because the native grep does not understand -C<n>.

It turns out that Peff was also using this option himself because our
Makefile doesn't do that automatically.  Brandon Casey uses SUNWspro
compiler without having to set this, and it turns out that the compiler
does not define preprocessor macro __unix__ which made him always use the
built-in grep, never an external one.

Let's be more explicit and say that we do not use external grep on Suns.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-24 09:20:34 -07:00
Brandon Casey 7c74ff5062 Makefile: update IRIX64 section
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-10 23:50:29 -07:00
Brandon Casey 1fdffc1bd8 Makefile: add section for SGI IRIX 6.5
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-10 23:50:29 -07:00
Brandon Casey ecc395c112 Makefile: add NEEDS_LIBGEN to optionally add -lgen to compile arguments
Commit 003b33a8 recently added a call to basename().  On IRIX 6.5, this
function resides in libgen and -lgen is required for the linker.

Update configure.ac too.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-10 23:50:29 -07:00
Junio C Hamano 6edd14968b Makefile: keep "git" when bindir is execdir
For some reason there still are people who use the old style layout
to put everything in $(bindir).  The previous commit breaks the install
for them, because it tries to unconditionally remove git from execdir
and cp/ln from bindir --- oops.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-10 20:17:33 -07:00
Jeff King 4ecbc17870 Makefile: install 'git' in execdir
When a git command executes a subcommand, it uses the "git
foo" form, which relies on finding "git" in the PATH.
Normally this should not be a problem, since the same "git"
that was used to invoke git in the first place will be
found.  And if somebody invokes a "git" outside of the PATH
(e.g., by giving its absolute path), this case is already
covered: we put that absolute path onto the front of PATH.

However, if one is using "sudo", then sudo will execute the
"git" from the PATH, but pass along a restricted PATH that
may not contain the original "git" directory. In this case,
executing a subcommand will fail.

To solve this, we put the "git" wrapper itself into the
execdir; this directory is prepended to the PATH when git
starts, so the wrapper will always be found.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-07-09 01:19:51 -07:00
Junio C Hamano e526692066 Merge branch 'jk/use-our-regexp'
* jk/use-our-regexp:
  Makefile: Solaris needs HAVE_ALLOCA_H for alloca()
  Makefile: use compat regex on Solaris
  Makefile: refactor regex compat support
2009-07-06 09:38:08 -07:00
Junio C Hamano 725cf7b45d Merge branch 'maint'
* maint:
  attr: plug minor memory leak
  request-pull: really disable pager
  Makes some cleanup/review in gittutorial
  Makefile: git.o depends on library headers
  git-submodule documentation: fix foreach example
2009-06-30 16:12:35 -07:00
Johannes Sixt fe104986c6 Makefile: git.o depends on library headers
This dependency was not yet specified anywhere else.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-30 11:17:54 -07:00
Brandon Casey 1d7b1af420 Makefile: Solaris needs HAVE_ALLOCA_H for alloca()
There is special handling in compat/regex/regex.c for the GNU compiler
to define alloca to __builtin_alloca, but the native compiler must include
alloca.h which happens when HAVE_ALLOCA_H is defined.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-20 21:50:11 -07:00
Jeff King ee78cac22b Makefile: use compat regex on Solaris
The system regex is either slow or buggy for complex
patterns, like the built-in xfuncname pattern for java
files.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18 09:57:44 -07:00
Jeff King 02232adfd8 Makefile: refactor regex compat support
There was no tweakable knob to use the regex compat code; it
was embedded in the mingw build. Since other platforms may
want to use it, let's factor it out in the usual way for
build configuration knobs.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-18 09:57:38 -07:00
Junio C Hamano 95ad2a65fb Merge branch 'sp/msysgit'
* sp/msysgit:
  compat/ has subdirectories: do not omit them in 'make clean'
  Fix typo in nedmalloc warning fix
  MinGW: Teach Makefile to detect msysgit and apply specific settings
  Fix warnings in nedmalloc when compiling with GCC 4.4.0
  Add custom memory allocator to MinGW and MacOS builds
  MinGW readdir reimplementation to support d_type
  connect.c: Support PuTTY plink and TortoisePlink as SSH on Windows
  git: browsing paths with spaces when using the start command
  MinGW: fix warning about implicit declaration of _getch()
  test-chmtime: work around Windows limitation
  Work around a regression in Windows 7, causing erase_in_line() to crash sometimes
  Quiet make: do not leave Windows behind
  MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore

Conflicts:
	Makefile
2009-06-13 12:50:42 -07:00
Junio C Hamano 436f66b7e9 Merge branch 'bc/solaris'
* bc/solaris:
  configure: test whether -lresolv is needed
  Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin
  git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8
  Makefile: add section for SunOS 5.7
  Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH
  Makefile: define __sun__ on SunOS
  git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris
  On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec
  Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments
  Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall

Conflicts:
	Makefile
2009-06-13 12:48:34 -07:00
Johannes Sixt 021fcd99bd compat/ has subdirectories: do not omit them in 'make clean'
[1. text/plain]

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-11 14:19:10 -07:00
Junio C Hamano 61dbb3c441 Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin
In an earlier patch, we introduced SANE_TOOL_PATH that is prepended to
user's PATH.  This had an unintended consequence of overriding user's
private binary directory that typically comes earlier in the PATH to holds
even saner commands than whatever comes with the system.

For example, a user may have ~/bin that is early in the path and contains
a shell script "vi" that launches system's /bin/vi with specific options.
Prepending SANE_TOOL_PATH to the PATH that happens to have "vi" in it
defeats such customization.

This fixes the issue by inserting SANE_TOOL_PATH just before /bin or
/usr/bin appears on the PATH.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-10 00:02:20 -07:00
Steffen Prohaska 48c46f1a14 MinGW: Teach Makefile to detect msysgit and apply specific settings
This commit changes handling of the msysgit specific settings, so
that they can be applied to official git.git.  Some msysgit
settings differ from the standard MinGW settings.  We move them
into an ifndef block that is only evaluated if a file
THIS_IS_MSYSGIT is present in the parent directory, which is the
case for an msysgit working environment.  The tag file is unlikely
to be present accidentally.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-08 09:44:04 -07:00
Junio C Hamano 26c117d05d Makefile: test-parse-options depends on parse-options.h
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-07 01:34:51 -07:00
Brandon Casey a7a24ee7e0 Makefile: add section for SunOS 5.7
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 13:21:52 -07:00
Junio C Hamano 0e0aea5a47 Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH
Some platforms (like SunOS and family) have kept their common binaries at
some historical moment in time, and introduced new binaries with modern
features in a special location like /usr/xpg4/bin or /usr/ucb.  Some of the
features provided by these modern binaries are expected and required by git.
If the featureful binaries are not in the users path, then git could end up
using the less featureful binary and fail.

So provide a mechanism to prepend elements to the users PATH at runtime so
the modern binaries will be found.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 13:21:51 -07:00
Brandon Casey b213019c00 Makefile: define __sun__ on SunOS
The SUNWspro compiler does not define __sun__ (like GCC does).  A check of
this macro was recently added to detect compilation on SunOS and to modify
the handling of the NO_ICONV and _XOPEN_SOURCE feature macros.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 13:21:49 -07:00
Brandon Casey 309dbc82e3 On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec
OLD_ICONV is only necessary on Solaris until UNIX03.  This is indicated
by the private macro _XPG6 which is set in /usr/include/sys/feature_tests.h.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 13:21:05 -07:00