Merge branch 'jn/make'
authorJunio C Hamano <junkio@cox.net>
Sun, 30 Jul 2006 20:24:29 +0000 (13:24 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 30 Jul 2006 20:24:29 +0000 (13:24 -0700)
* jn/make:
Set datarootdir in config.mak.in
Quote all calls to GIT_CONF_APPEND_LINE
Typofix in configure.ac comment.
configure.ac vertical whitespace usage cleanup
autoconf: Checks for some programs
autoconf: Checks for libraries
autoconf: Checks for some library functions.
autoconf: Checks for typedefs, structures, and compiler characteristics.
autoconf: Preparing the way for autodetection
Copy description of build configuration variables to configure.ac
Teach make clean about configure and autoconf
autoconf: Use autoconf to write installation directories to config.mak.autogen

1  2 
.gitignore
INSTALL
Makefile
diff --combined .gitignore
index 52d61f31939d4fbbd55521cff85939fd1cf97e28,e103777026a893194d533dd2b73b063cbe8889ac..fb0fa3f16a7c8a42c5d0d1be62666cc4ea4c6575
@@@ -46,7 -46,6 +46,7 @@@ git-http-pus
  git-imap-send
  git-index-pack
  git-init-db
 +git-instaweb
  git-local-fetch
  git-log
  git-lost-found
@@@ -107,7 -106,6 +107,7 @@@ git-ssh-pus
  git-ssh-upload
  git-status
  git-stripspace
 +git-svn
  git-svnimport
  git-symbolic-ref
  git-tag
@@@ -137,4 -135,10 +137,10 @@@ git-core.spe
  *.[ao]
  *.py[co]
  config.mak
+ autom4te.cache
+ config.log
+ config.status
+ config.mak.in
+ config.mak.autogen
+ configure
  git-blame
diff --combined INSTALL
index 7da2c8982978e9ff069eb1cc2338330a45669100,28245b3e680fe0c057b7dbafd04ad35f1e109c7c..ba9778cd4de187878b6445be5fbf490d76879f30
+++ b/INSTALL
@@@ -13,6 -13,15 +13,15 @@@ that uses $prefix, the built results ha
  which are derived from $prefix, so "make all; make prefix=/usr
  install" would not work.
  
+ Alternatively you can use autoconf generated ./configure script to
+ set up install paths (via config.mak.autogen), so you can write instead
+       $ autoconf ;# as yourself if ./configure doesn't exist yet
+       $ ./configure --prefix=/usr ;# as yourself
+       $ make all doc ;# as yourself
+       # make install install-doc ;# as root
  Issues of note:
  
   - git normally installs a helper script wrapper called "git", which
@@@ -44,7 -53,7 +53,7 @@@
  
        - "libcurl" and "curl" executable.  git-http-fetch and
          git-fetch use them.  If you do not use http
 -        transfer, you are probabaly OK if you do not have
 +        transfer, you are probably OK if you do not have
          them.
  
        - expat library; git-http-push uses it for remote lock
@@@ -69,7 -78,7 +78,7 @@@
          git, and if you only use git to track other peoples work you'll
          never notice the lack of it. 
  
 -        - "wish", the TCL/Tk windowing shell is used in gitk to show the
 +        - "wish", the Tcl/Tk windowing shell is used in gitk to show the
            history graphically
  
        - "ssh" is used to push and pull over the net
diff --combined Makefile
index 8349e3defacca69ae48c477ff99be527b9af3b77,cef65861c40f6d963952d54f131d231781b69e6d..814c5642e70e15b3754e88a5c0818e70260a773f
+++ b/Makefile
@@@ -33,22 -33,6 +33,22 @@@ all
  # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
  # Enable it on Windows.  By default, symrefs are still used.
  #
 +# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability
 +# tests.  These tests take up a significant amount of the total test time
 +# but are not needed unless you plan to talk to SVN repos.
 +#
 +# Define NO_FINK if you are building on Darwin/Mac OS X, have Fink
 +# installed in /sw, but don't want GIT to link against any libraries
 +# installed there.  If defined you may specify your own (or Fink's)
 +# include directories and library directories by defining CFLAGS
 +# and LDFLAGS appropriately.
 +#
 +# Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X,
 +# have DarwinPorts installed in /opt/local, but don't want GIT to
 +# link against any libraries installed there.  If defined you may
 +# specify your own (or DarwinPort's) include directories and
 +# library directories by defining CFLAGS and LDFLAGS appropriately.
 +#
  # Define PPC_SHA1 environment variable when running make to make use of
  # a bundled SHA1 routine optimized for PowerPC.
  #
@@@ -76,7 -60,7 +76,7 @@@
  # Define NO_ACCURATE_DIFF if your diff program at least sometimes misses
  # a missing newline at the end of the file.
  #
 -# Define NO_PYTHON if you want to loose all benefits of the recursive merge.
 +# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
  #
  # Define COLLISION_CHECK below if you believe that SHA1's
  # 1461501637330902918203684832716283019655932542976 hashes do not give you
@@@ -138,7 -122,7 +138,7 @@@ SCRIPT_SH = 
        git-fetch.sh \
        git-ls-remote.sh \
        git-merge-one-file.sh git-parse-remote.sh \
 -      git-prune.sh git-pull.sh git-rebase.sh \
 +      git-pull.sh git-rebase.sh \
        git-repack.sh git-request-pull.sh git-reset.sh \
        git-resolve.sh git-revert.sh git-sh-setup.sh \
        git-tag.sh git-verify-tag.sh \
  
  SCRIPT_PERL = \
        git-archimport.perl git-cvsimport.perl git-relink.perl \
 -      git-shortlog.perl git-fmt-merge-msg.perl git-rerere.perl \
 +      git-shortlog.perl git-rerere.perl \
        git-annotate.perl git-cvsserver.perl \
        git-svnimport.perl git-mv.perl git-cvsexportcommit.perl \
 -      git-send-email.perl
 +      git-send-email.perl git-svn.perl
  
  SCRIPT_PYTHON = \
        git-merge-recursive.py
  SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
          $(patsubst %.perl,%,$(SCRIPT_PERL)) \
          $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
 -        git-cherry-pick git-status
 +        git-cherry-pick git-status git-instaweb
  
  # The ones that do not have to link with lcrypto, lz nor xdiff.
  SIMPLE_PROGRAMS = \
@@@ -191,8 -175,7 +191,8 @@@ BUILT_INS = git-log$X git-whatchanged$
        git-ls-files$X git-ls-tree$X git-get-tar-commit-id$X \
        git-read-tree$X git-commit-tree$X git-write-tree$X \
        git-apply$X git-show-branch$X git-diff-files$X git-update-index$X \
 -      git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X
 +      git-diff-index$X git-diff-stages$X git-diff-tree$X git-cat-file$X \
 +      git-fmt-merge-msg$X git-prune$X
  
  # what 'all' will build and 'install' will install, in gitexecdir
  ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS)
@@@ -236,7 -219,7 +236,7 @@@ LIB_OBJS = 
        server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \
        tag.o tree.o usage.o config.o environment.o ctype.o copy.o \
        fetch-clone.o revision.o pager.o tree-walk.o xdiff-interface.o \
 -      alloc.o $(DIFF_OBJS)
 +      alloc.o merge-file.o $(DIFF_OBJS)
  
  BUILTIN_OBJS = \
        builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
        builtin-apply.o builtin-show-branch.o builtin-diff-files.o \
        builtin-diff-index.o builtin-diff-stages.o builtin-diff-tree.o \
        builtin-cat-file.o builtin-mailsplit.o builtin-stripspace.o \
 -      builtin-update-ref.o
 +      builtin-update-ref.o builtin-fmt-merge-msg.o builtin-prune.o
  
  GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
  LIBS = $(GITLIBS) -lz
@@@ -268,17 -251,15 +268,17 @@@ ifeq ($(uname_S),Darwin
        NEEDS_SSL_WITH_CRYPTO = YesPlease
        NEEDS_LIBICONV = YesPlease
        NO_STRLCPY = YesPlease
 -      ## fink
 -      ifeq ($(shell test -d /sw/lib && echo y),y)
 -              ALL_CFLAGS += -I/sw/include
 -              ALL_LDFLAGS += -L/sw/lib
 +      ifndef NO_FINK
 +              ifeq ($(shell test -d /sw/lib && echo y),y)
 +                      ALL_CFLAGS += -I/sw/include
 +                      ALL_LDFLAGS += -L/sw/lib
 +              endif
        endif
 -      ## darwinports
 -      ifeq ($(shell test -d /opt/local/lib && echo y),y)
 -              ALL_CFLAGS += -I/opt/local/include
 -              ALL_LDFLAGS += -L/opt/local/lib
 +      ifndef NO_DARWIN_PORTS
 +              ifeq ($(shell test -d /opt/local/lib && echo y),y)
 +                      ALL_CFLAGS += -I/opt/local/include
 +                      ALL_LDFLAGS += -L/opt/local/lib
 +              endif
        endif
  endif
  ifeq ($(uname_S),SunOS)
@@@ -352,6 -333,7 +352,7 @@@ ifneq (,$(findstring arm,$(uname_M))
        ARM_SHA1 = YesPlease
  endif
  
+ -include config.mak.autogen
  -include config.mak
  
  ifdef WITH_OWN_SUBPROCESS_PY
@@@ -489,7 -471,7 +490,7 @@@ ifdef NO_ACCURATE_DIF
        ALL_CFLAGS += -DNO_ACCURATE_DIFF
  endif
  
 -# Shell quote (do not use $(call) to accomodate ancient setups);
 +# Shell quote (do not use $(call) to accommodate ancient setups);
  
  SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER))
  
@@@ -534,7 -516,6 +535,7 @@@ common-cmds.h: Documentation/git-*.tx
  $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
        rm -f $@ $@+
        sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
 +          -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
            -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
            -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
            -e 's/@@NO_PYTHON@@/$(NO_PYTHON)/g' \
@@@ -567,20 -548,6 +568,20 @@@ git-status: git-commi
        cp $< $@+
        mv $@+ $@
  
 +git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css
 +      rm -f $@ $@+
 +      sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
 +          -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 +          -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
 +          -e 's/@@NO_PYTHON@@/$(NO_PYTHON)/g' \
 +          -e '/@@GITWEB_CGI@@/r gitweb/gitweb.cgi' \
 +          -e '/@@GITWEB_CGI@@/d' \
 +          -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \
 +          -e '/@@GITWEB_CSS@@/d' \
 +          $@.sh | sed "s|/usr/bin/git|$(bindir)/git|" > $@+
 +      chmod +x $@+
 +      mv $@+ $@
 +
  # These can record GIT_VERSION
  git$X git.spec \
        $(patsubst %.sh,%,$(SCRIPT_SH)) \
@@@ -614,8 -581,6 +615,8 @@@ $(SIMPLE_PROGRAMS) : git-%$X : %.
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
                $(LIB_FILE) $(SIMPLE_LIB)
  
 +ssh-pull.o: ssh-fetch.c
 +ssh-push.o: ssh-upload.c
  git-local-fetch$X: fetch.o
  git-ssh-fetch$X: rsh.o fetch.o
  git-ssh-upload$X: rsh.o
@@@ -625,11 -590,11 +626,11 @@@ git-ssh-push$X: rsh.
  git-imap-send$X: imap-send.o $(LIB_FILE)
  
  http.o http-fetch.o http-push.o: http.h
 -git-http-fetch$X: fetch.o http.o http-fetch.o $(LIB_FILE)
 +git-http-fetch$X: fetch.o http.o http-fetch.o $(GITLIBS)
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
                $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
  
 -git-http-push$X: revision.o http.o http-push.o $(LIB_FILE)
 +git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
                $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
  
@@@ -675,7 -640,6 +676,7 @@@ GIT-CFLAGS: .FORCE-GIT-CFLAG
  # with that.
  
  export NO_PYTHON
 +export NO_SVN_TESTS
  
  test: all
        $(MAKE) -C t/ all
@@@ -689,12 -653,6 +690,12 @@@ test-delta$X: test-delta.c diff-delta.
  test-dump-cache-tree$X: dump-cache-tree.o $(GITLIBS)
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
  
 +test-sha1$X: test-sha1.o $(GITLIBS)
 +      $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 +
 +check-sha1:: test-sha1$X
 +      ./test-sha1.sh
 +
  check:
        for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done
  
@@@ -771,6 -729,8 +772,8 @@@ clean
                $(LIB_FILE) $(XDIFF_LIB)
        rm -f $(ALL_PROGRAMS) $(BUILT_INS) git$X
        rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
+       rm -rf autom4te.cache
+       rm -f config.log config.mak.autogen configure config.status config.cache
        rm -rf $(GIT_TARNAME) .doc-tmp-dir
        rm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
        rm -f $(htmldocs).tar.gz $(manpages).tar.gz