OSDN Git Service

Merge branch 'ab/maint-perl-use-instlibdir'
authorJunio C Hamano <gitster@pobox.com>
Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Jun 2010 18:16:55 +0000 (11:16 -0700)
* ab/maint-perl-use-instlibdir:
  Makefile: remove redundant munging of @@INSTLIBDIR@@

1  2 
Makefile

diff --combined Makefile
+++ b/Makefile
@@@ -31,9 -31,6 +31,9 @@@ all:
  # Define EXPATDIR=/foo/bar if your expat header and library files are in
  # /foo/bar/include and /foo/bar/lib directories.
  #
 +# Define HAVE_PATHS_H if you have paths.h and want to use the default PATH
 +# it specifies.
 +#
  # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
  #
  # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
@@@ -272,7 -269,6 +272,7 @@@ mandir = share/ma
  infodir = share/info
  gitexecdir = libexec/git-core
  sharedir = $(prefix)/share
 +gitwebdir = $(sharedir)/gitweb
  template_dir = share/git-core/templates
  htmldir = share/doc/git-doc
  ifeq ($(prefix),/usr)
@@@ -370,8 -366,6 +370,8 @@@ SCRIPT_PERL += git-relink.per
  SCRIPT_PERL += git-send-email.perl
  SCRIPT_PERL += git-svn.perl
  
 +SCRIPT_PYTHON += git-remote-testgit.py
 +
  SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
          $(patsubst %.perl,%,$(SCRIPT_PERL)) \
          $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
@@@ -492,7 -486,6 +492,7 @@@ LIB_H += log-tree.
  LIB_H += mailmap.h
  LIB_H += merge-recursive.h
  LIB_H += notes.h
 +LIB_H += notes-cache.h
  LIB_H += object.h
  LIB_H += pack.h
  LIB_H += pack-refs.h
@@@ -582,7 -575,6 +582,7 @@@ LIB_OBJS += merge-file.
  LIB_OBJS += merge-recursive.o
  LIB_OBJS += name-hash.o
  LIB_OBJS += notes.o
 +LIB_OBJS += notes-cache.o
  LIB_OBJS += object.o
  LIB_OBJS += pack-check.o
  LIB_OBJS += pack-refs.o
@@@ -628,7 -620,6 +628,7 @@@ LIB_OBJS += tree-diff.
  LIB_OBJS += tree.o
  LIB_OBJS += tree-walk.o
  LIB_OBJS += unpack-trees.o
 +LIB_OBJS += url.o
  LIB_OBJS += usage.o
  LIB_OBJS += userdiff.o
  LIB_OBJS += utf8.o
@@@ -744,12 -735,10 +744,12 @@@ EXTLIBS 
  ifeq ($(uname_S),Linux)
        NO_STRLCPY = YesPlease
        NO_MKSTEMPS = YesPlease
 +      HAVE_PATHS_H = YesPlease
  endif
  ifeq ($(uname_S),GNU/kFreeBSD)
        NO_STRLCPY = YesPlease
        NO_MKSTEMPS = YesPlease
 +      HAVE_PATHS_H = YesPlease
  endif
  ifeq ($(uname_S),UnixWare)
        CC = cc
@@@ -878,7 -867,6 +878,7 @@@ ifeq ($(uname_S),FreeBSD
                NO_STRTOUMAX = YesPlease
        endif
        PYTHON_PATH = /usr/local/bin/python
 +      HAVE_PATHS_H = YesPlease
  endif
  ifeq ($(uname_S),OpenBSD)
        NO_STRCASESTR = YesPlease
        NEEDS_LIBICONV = YesPlease
        BASIC_CFLAGS += -I/usr/local/include
        BASIC_LDFLAGS += -L/usr/local/lib
 +      HAVE_PATHS_H = YesPlease
  endif
  ifeq ($(uname_S),NetBSD)
        ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)
        BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
        USE_ST_TIMESPEC = YesPlease
        NO_MKSTEMPS = YesPlease
 +      HAVE_PATHS_H = YesPlease
  endif
  ifeq ($(uname_S),AIX)
 +      DEFAULT_PAGER = more
        NO_STRCASESTR=YesPlease
        NO_MEMMEM = YesPlease
        NO_MKDTEMP = YesPlease
@@@ -919,7 -904,6 +919,7 @@@ ifeq ($(uname_S),GNU
        # GNU/Hurd
        NO_STRLCPY=YesPlease
        NO_MKSTEMPS = YesPlease
 +      HAVE_PATHS_H = YesPlease
  endif
  ifeq ($(uname_S),IRIX)
        NO_SETENV = YesPlease
@@@ -1042,6 -1026,7 +1042,6 @@@ ifneq (,$(findstring MINGW,$(uname_S))
        NO_STRTOUMAX = YesPlease
        NO_MKDTEMP = YesPlease
        NO_MKSTEMPS = YesPlease
 -      SNPRINTF_RETURNS_BOGUS = YesPlease
        NO_SVN_TESTS = YesPlease
        NO_PERL_MAKEMAKER = YesPlease
        RUNTIME_PREFIX = YesPlease
@@@ -1078,7 -1063,6 +1078,7 @@@ endi
  -include config.mak
  
  ifdef CHECK_HEADER_DEPENDENCIES
 +COMPUTE_HEADER_DEPENDENCIES =
  USE_COMPUTED_HEADER_DEPENDENCIES =
  endif
  
        LIB_OBJS += thread-utils.o
  endif
  
 +ifdef HAVE_PATHS_H
 +      BASIC_CFLAGS += -DHAVE_PATHS_H
 +endif
 +
  ifdef DIR_HAS_BSD_GROUP_SEMANTICS
        COMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS
  endif
@@@ -1445,7 -1425,6 +1445,7 @@@ gitexecdir_SQ = $(subst ','\'',$(gitexe
  template_dir_SQ = $(subst ','\'',$(template_dir))
  htmldir_SQ = $(subst ','\'',$(htmldir))
  prefix_SQ = $(subst ','\'',$(prefix))
 +gitwebdir_SQ = $(subst ','\'',$(gitwebdir))
  
  SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
  PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
@@@ -1566,11 -1545,10 +1566,10 @@@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % 
        sed -e '1{' \
            -e '        s|#!.*perl|#!$(PERL_PATH_SQ)|' \
            -e '        h' \
-           -e '        s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@"));=' \
+           -e '        s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "'"$$INSTLIBDIR"'"));=' \
            -e '        H' \
            -e '        x' \
            -e '}' \
-           -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
            -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
            $@.perl >$@+ && \
        chmod +x $@+ && \
@@@ -1582,38 -1560,45 +1581,38 @@@ gitweb
        $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all
  
  ifdef JSMIN
 -GITWEB_PROGRAMS += gitweb/gitweb.min.js
 -GITWEB_JS = gitweb/gitweb.min.js
 +GITWEB_PROGRAMS += gitweb/static/gitweb.min.js
 +GITWEB_JS = gitweb/static/gitweb.min.js
  else
 -GITWEB_JS = gitweb/gitweb.js
 +GITWEB_JS = gitweb/static/gitweb.js
  endif
  ifdef CSSMIN
 -GITWEB_PROGRAMS += gitweb/gitweb.min.css
 -GITWEB_CSS = gitweb/gitweb.min.css
 +GITWEB_PROGRAMS += gitweb/static/gitweb.min.css
 +GITWEB_CSS = gitweb/static/gitweb.min.css
  else
 -GITWEB_CSS = gitweb/gitweb.css
 +GITWEB_CSS = gitweb/static/gitweb.css
  endif
  OTHER_PROGRAMS +=  gitweb/gitweb.cgi  $(GITWEB_PROGRAMS)
  gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS)
        $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)
  
  ifdef JSMIN
 -gitweb/gitweb.min.js: gitweb/gitweb.js
 +gitweb/static/gitweb.min.js: gitweb/static/gitweb.js
        $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)
  endif # JSMIN
  ifdef CSSMIN
 -gitweb/gitweb.min.css: gitweb/gitweb.css
 +gitweb/static/gitweb.min.css: gitweb/static/gitweb.css
        $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)
  endif # CSSMIN
  
  
 -git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js
 +git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js
        $(QUIET_GEN)$(RM) $@ $@+ && \
        sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
            -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
            -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
 -          -e '/@@GITWEB_CGI@@/r gitweb/gitweb.cgi' \
 -          -e '/@@GITWEB_CGI@@/d' \
 -          -e '/@@GITWEB_CSS@@/r $(GITWEB_CSS)' \
 -          -e '/@@GITWEB_CSS@@/d' \
 -          -e '/@@GITWEB_JS@@/r $(GITWEB_JS)' \
 -          -e '/@@GITWEB_JS@@/d' \
 +          -e 's|@@GITWEBDIR@@|$(gitwebdir_SQ)|g' \
            -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
 -            -e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \
 -            -e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \
            $@.sh > $@+ && \
        chmod +x $@+ && \
        mv $@+ $@
@@@ -1634,8 -1619,13 +1633,8 @@@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % 
        INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \
                --no-print-directory prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' \
                instlibdir` && \
 -      sed -e '1{' \
 -          -e '        s|#!.*python|#!$(PYTHON_PATH_SQ)|' \
 -          -e '}' \
 -          -e 's|^import sys.*|&; \\\
 -                 import os; \\\
 -                 sys.path.insert(0, os.getenv("GITPYTHONLIB",\
 -                                              "@@INSTLIBDIR@@"));|' \
 +      sed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \
 +          -e 's|\(os\.getenv("GITPYTHONLIB"\)[^)]*)|\1,"@@INSTLIBDIR@@")|' \
            -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
            $@.py >$@+ && \
        chmod +x $@+ && \
@@@ -1665,10 -1655,7 +1664,10 @@@ git.o git.spec 
  
  TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
  GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
 -      git.o http.o http-walker.o remote-curl.o
 +      git.o
 +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
  OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS)
@@@ -1983,7 -1970,6 +1982,7 @@@ install: al
        $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
  ifndef NO_PERL
        $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
 +      $(MAKE) -C gitweb gitwebdir=$(gitwebdir_SQ) install
  endif
  ifndef NO_PYTHON
        $(MAKE) -C git_remote_helpers prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
@@@ -2018,9 -2004,6 +2017,9 @@@ endi
          done; } ; } && \
        ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
  
 +install-gitweb:
 +      $(MAKE) -C gitweb install
 +
  install-doc:
        $(MAKE) -C Documentation install