Merge branch 'js/compat-mkdir'
authorJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2012 21:21:39 +0000 (14:21 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2012 21:21:39 +0000 (14:21 -0700)
Finishing touches to recently added wrapper for mkdir() that do not
want to see trailing slashes.

* js/compat-mkdir:
Document MKDIR_WO_TRAILING_SLASH in Makefile

1  2 
Makefile
diff --combined Makefile
index 26b697d1756dac4f37e04b8857ca9ea15df7d18d,556bc9fc1301a2973ae9958841d08701abc1f263..99157da2df475d3e7869472646528f705b3cc198
+++ b/Makefile
@@@ -90,6 -90,8 +90,8 @@@ all:
  #
  # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
  #
+ # Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
+ #
  # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
  #
  # Define NO_STRTOK_R if you don't have strtok_r in the C library.
@@@ -496,7 -498,6 +498,7 @@@ TEST_PROGRAMS_NEED_X += test-mergesor
  TEST_PROGRAMS_NEED_X += test-mktemp
  TEST_PROGRAMS_NEED_X += test-parse-options
  TEST_PROGRAMS_NEED_X += test-path-utils
 +TEST_PROGRAMS_NEED_X += test-regex
  TEST_PROGRAMS_NEED_X += test-revision-walking
  TEST_PROGRAMS_NEED_X += test-run-command
  TEST_PROGRAMS_NEED_X += test-scrap-cache-tree
@@@ -1640,6 -1641,10 +1642,10 @@@ ifdef NO_MKDTEM
        COMPAT_CFLAGS += -DNO_MKDTEMP
        COMPAT_OBJS += compat/mkdtemp.o
  endif
+ ifdef MKDIR_WO_TRAILING_SLASH
+       COMPAT_CFLAGS += -DMKDIR_WO_TRAILING_SLASH
+       COMPAT_OBJS += compat/mkdir.o
+ endif
  ifdef NO_MKSTEMPS
        COMPAT_CFLAGS += -DNO_MKSTEMPS
  endif
@@@ -2806,13 -2811,8 +2812,13 @@@ endi
  
  ### Check documentation
  #
 +ALL_COMMANDS = $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS)
 +ALL_COMMANDS += git
 +ALL_COMMANDS += gitk
 +ALL_COMMANDS += gitweb
 +ALL_COMMANDS += git-gui git-citool
  check-docs::
 -      @(for v in $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk; \
 +      @(for v in $(ALL_COMMANDS); \
        do \
                case "$$v" in \
                git-merge-octopus | git-merge-ours | git-merge-recursive | \
                sed -e '/^#/d' \
                    -e 's/[     ].*//' \
                    -e 's/^/listed /' command-list.txt; \
 -              ls -1 Documentation/git*txt | \
 +              $(MAKE) -C Documentation print-man1 | \
 +              grep '\.txt$$' | \
                sed -e 's|Documentation/|documented |' \
                    -e 's/\.txt//'; \
        ) | while read how cmd; \
        do \
 -              case "$$how,$$cmd" in \
 -              *,git-citool | \
 -              *,git-gui | \
 -              *,git-help | \
 -              documented,gitattributes | \
 -              documented,gitignore | \
 -              documented,gitmodules | \
 -              documented,gitcli | \
 -              documented,git-tools | \
 -              documented,gitcore-tutorial | \
 -              documented,gitcvs-migration | \
 -              documented,gitdiffcore | \
 -              documented,gitglossary | \
 -              documented,githooks | \
 -              documented,gitrepository-layout | \
 -              documented,gitrevisions | \
 -              documented,gittutorial | \
 -              documented,gittutorial-2 | \
 -              documented,git-bisect-lk2009 | \
 -              documented,git-remote-helpers | \
 -              documented,gitworkflows | \
 -              sentinel,not,matching,is,ok ) continue ;; \
 -              esac; \
 -              case " $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk " in \
 +              case " $(ALL_COMMANDS) " in \
                *" $$cmd "*)    ;; \
                *) echo "removed but $$how: $$cmd" ;; \
                esac; \