$NetBSD: patch-aa,v 1.9 2007/09/11 09:23:55 bjs Exp $ NetBSD 3.0 needs -liconv, too. AR, CC, CFLAGS, LDFLAGS and LIBS should be taken from the environment. --- Makefile.orig 2007-09-02 01:57:44.000000000 -0400 +++ Makefile @@ -135,8 +135,6 @@ uname_P := $(shell sh -c 'uname -p 2>/de # CFLAGS and LDFLAGS are for the users to override from the command line. -CFLAGS = -g -O2 -Wall -LDFLAGS = ALL_CFLAGS = $(CFLAGS) ALL_LDFLAGS = $(LDFLAGS) STRIP ?= strip @@ -173,12 +171,8 @@ GITWEB_SITE_FOOTER = export prefix bindir gitexecdir sharedir template_dir sysconfdir -CC = gcc -AR = ar RM = rm -f -TAR = tar FIND = find -INSTALL = install RPMBUILD = rpmbuild TCL_PATH = tclsh TCLTK_PATH = wish @@ -398,6 +392,7 @@ ifeq ($(uname_S),Darwin) NO_STRLCPY = YesPlease endif ifeq ($(uname_S),SunOS) + NEEDS_LIBICONV = YesPlease NEEDS_SOCKET = YesPlease NEEDS_NSL = YesPlease SHELL_PATH = /bin/bash @@ -416,8 +411,6 @@ ifeq ($(uname_S),SunOS) NO_C99_FORMAT = YesPlease NO_STRTOUMAX = YesPlease endif - INSTALL = ginstall - TAR = gtar BASIC_CFLAGS += -D__EXTENSIONS__ endif ifeq ($(uname_O),Cygwin) @@ -447,9 +440,7 @@ ifeq ($(uname_S),OpenBSD) BASIC_LDFLAGS += -L/usr/local/lib endif ifeq ($(uname_S),NetBSD) - ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2) - NEEDS_LIBICONV = YesPlease - endif + NEEDS_LIBICONV = YesPlease BASIC_CFLAGS += -I/usr/pkg/include BASIC_LDFLAGS += -L/usr/pkg/lib ALL_LDFLAGS += -Wl,-rpath,/usr/pkg/lib @@ -710,7 +701,7 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_P PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH)) -LIBS = $(GITLIBS) $(EXTLIBS) +LIBS += $(GITLIBS) $(EXTLIBS) BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \ -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' $(COMPAT_CFLAGS) @@ -986,14 +977,14 @@ remove-dashes: ### Installation rules install: all - $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)' - $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)' - $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)' - $(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)' + $(BSD_INSTALL_PROGRAM_DIR) '$(DESTDIR_SQ)$(bindir_SQ)' + $(BSD_INSTALL_PROGRAM_DIR) '$(DESTDIR_SQ)$(gitexecdir_SQ)' + $(BSD_INSTALL_SCRIPT) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)' + $(BSD_INSTALL_SCRIPT) git$X '$(DESTDIR_SQ)$(bindir_SQ)' $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install $(MAKE) -C perl prefix='$(prefix_SQ)' install ifndef NO_TCLTK - $(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk + $(BSD_INSTALL_SCRIPT) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk $(MAKE) -C git-gui install endif if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \