aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-02 21:57:52 -0700
committerJunio C Hamano <gitster@pobox.com>2008-07-02 21:57:52 -0700
commitbb1ab2db08f48add4236a5a9c08aa1a6aa4d5d48 (patch)
treee9e85601f78f7cfaf47785db9fd65f426e79fadb /Makefile
parent7d3580d74c6d801419dd91416f9a81750b7d4e2c (diff)
parent14086b0a13f5f5ac456cb9ae16a263f92908ae61 (diff)
downloadgit-bb1ab2db08f48add4236a5a9c08aa1a6aa4d5d48.tar.gz
git-bb1ab2db08f48add4236a5a9c08aa1a6aa4d5d48.tar.xz
Merge branch 'j6t/mingw'
* j6t/mingw: (38 commits) compat/pread.c: Add a forward declaration to fix a warning Windows: Fix ntohl() related warnings about printf formatting Windows: TMP and TEMP environment variables specify a temporary directory. Windows: Make 'git help -a' work. Windows: Work around an oddity when a pipe with no reader is written to. Windows: Make the pager work. When installing, be prepared that template_dir may be relative. Windows: Use a relative default template_dir and ETC_GITCONFIG Windows: Compute the fallback for exec_path from the program invocation. Turn builtin_exec_path into a function. Windows: Use a customized struct stat that also has the st_blocks member. Windows: Add a custom implementation for utime(). Windows: Add a new lstat and fstat implementation based on Win32 API. Windows: Implement a custom spawnve(). Windows: Implement wrappers for gethostbyname(), socket(), and connect(). Windows: Work around incompatible sort and find. Windows: Implement asynchronous functions as threads. Windows: Disambiguate DOS style paths from SSH URLs. Windows: A rudimentary poll() emulation. Windows: Implement start_command(). ...
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile46
1 files changed, 43 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ba16f2679..78e08d374 100644
--- a/Makefile
+++ b/Makefile
@@ -205,7 +205,7 @@ GITWEB_FAVICON = git-favicon.png
GITWEB_SITE_HEADER =
GITWEB_SITE_FOOTER =
-export prefix bindir gitexecdir sharedir template_dir htmldir sysconfdir
+export prefix bindir gitexecdir sharedir htmldir sysconfdir
CC = gcc
AR = ar
@@ -273,11 +273,9 @@ EXTRA_PROGRAMS =
# ... and all the rest that could be moved out of bindir to gitexecdir
PROGRAMS += $(EXTRA_PROGRAMS)
-PROGRAMS += git-daemon$X
PROGRAMS += git-fast-import$X
PROGRAMS += git-fetch-pack$X
PROGRAMS += git-hash-object$X
-PROGRAMS += git-imap-send$X
PROGRAMS += git-index-pack$X
PROGRAMS += git-merge-index$X
PROGRAMS += git-merge-tree$X
@@ -337,6 +335,7 @@ LIB_H += builtin.h
LIB_H += cache.h
LIB_H += cache-tree.h
LIB_H += commit.h
+LIB_H += compat/mingw.h
LIB_H += csum-file.h
LIB_H += decorate.h
LIB_H += delta.h
@@ -717,6 +716,36 @@ ifeq ($(uname_S),HP-UX)
NO_HSTRERROR = YesPlease
NO_SYS_SELECT_H = YesPlease
endif
+ifneq (,$(findstring MINGW,$(uname_S)))
+ NO_MMAP = YesPlease
+ NO_PREAD = YesPlease
+ NO_OPENSSL = YesPlease
+ NO_CURL = YesPlease
+ NO_SYMLINK_HEAD = YesPlease
+ NO_IPV6 = YesPlease
+ NO_SETENV = YesPlease
+ NO_UNSETENV = YesPlease
+ NO_STRCASESTR = YesPlease
+ NO_STRLCPY = YesPlease
+ NO_MEMMEM = YesPlease
+ NEEDS_LIBICONV = YesPlease
+ OLD_ICONV = YesPlease
+ NO_C99_FORMAT = YesPlease
+ NO_STRTOUMAX = YesPlease
+ NO_MKDTEMP = YesPlease
+ SNPRINTF_RETURNS_BOGUS = YesPlease
+ NO_SVN_TESTS = YesPlease
+ NO_PERL_MAKEMAKER = YesPlease
+ NO_POSIX_ONLY_PROGRAMS = YesPlease
+ COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat
+ COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1
+ COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
+ COMPAT_OBJS += compat/mingw.o compat/fnmatch.o compat/regex.o
+ EXTLIBS += -lws2_32
+ X = .exe
+ template_dir = ../share/git-core/templates/
+ ETC_GITCONFIG = ../etc/gitconfig
+endif
ifneq (,$(findstring arm,$(uname_M)))
ARM_SHA1 = YesPlease
endif
@@ -777,6 +806,10 @@ ifdef ZLIB_PATH
endif
EXTLIBS += -lz
+ifndef NO_POSIX_ONLY_PROGRAMS
+ PROGRAMS += git-daemon$X
+ PROGRAMS += git-imap-send$X
+endif
ifndef NO_OPENSSL
OPENSSL_LIBSSL = -lssl
ifdef OPENSSLDIR
@@ -1268,6 +1301,13 @@ remove-dashes:
### Installation rules
+ifeq ($(firstword $(subst /, ,$(template_dir))),..)
+template_instdir = $(gitexecdir)/$(template_dir)
+else
+template_instdir = $(template_dir)
+endif
+export template_instdir
+
install: all
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'