DEFAULT_DOC_TARGET
Subsystems (2)
v2 cover DEFAULT_DOC_TARGET
This allows things like:
$ DEFAULT_DOC_TARGET=html make doc $ DEFAULT_DOC_INSTALL_TARGET=html make install-doc
on a platform that does not have manpage viewer. Which is not very useful, given that you can already say
$ make install-html
on such a platform, and these install-$format targets will not go away.
The real motivation behind this was to let me say:
$ git checkout $some_old_fork_point $ DEFAULT_DOC_TARGET=git-push.1 make doc
while updating the sources to the documentation for the maintainance track, without having to format everything else that is different between the old fork point and the primary branch I usually work on.
The first one was discussed some time ago on the list and all the fixes mentioned on the thread already squashed in. The second one is merely for completeness.
For previous round, see:
http://thread.gmane.org/gmane.comp.version-control.git/207193/focus=207201
Junio C Hamano (2):
Allow generating a non-default set of documentation Allow installing a non-default set of documentation
Documentation/Makefile | 10 ++++++++-- Makefile | 13 ++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-)
Signature · 1 line
1.8.1.293.g4a210a9
PATCH v2 1/2 Allow generating a non-default set of documentation
By default, "make doc" generates the manpages and htmldocs in the Documentation directory, but you may want to change this depending on the target environment, e.g. to include 'pdf'. Introduce a new Makefile variable DEFAULT_DOC_TARGET to allow customizing this.
The primary motivation is to let us check documentation patches with
$ DEFAULT_DOC_TARGET=git-push.1 make doc
but it is not so far-fetched to imagine that Windows users may want to omit manpages with
$ DEFAULT_DOC_TARGET=html make doc
or somesuch. It won't be useful without additional support to tweak the format installed by default via DEFAULT_DOC_INSTALL_TARGET, though.
--- Documentation/Makefile | 7 ++++++- Makefile | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-)
Documentation/Makefile +6 -1
@@ -1,3 +1,6 @@ +# The default target of this Makefile is... +all:: + MAN1_TXT= \ $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \ $(wildcard git-*.txt)) \
@@ -65,6 +68,8 @@ endif -include ../config.mak.autogen -include ../config.mak +DEFAULT_DOC_TARGET ?= html man + # # For docbook-xsl ... # -1.68.1, no extra settings are needed?
@@ -151,7 +156,7 @@ ifndef V endif endif -all: html man +all:: $(DEFAULT_DOC_TARGET) html: $(DOC_HTML)
Makefile +9 -1
@@ -281,6 +281,12 @@ all:: # DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR', # DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork' # +# You can define DEFAULT_DOC_TARGET to change it from the built-in +# default of generating manpages and htmldocs. e.g. +# +# DEFAULT_DOC_TARGET='man html info pdf' +# DEFAULT_DOC_TARGET='html' +# # Define COMPUTE_HEADER_DEPENDENCIES to "yes" if you want dependencies on # header files to be automatically computed, to avoid rebuilding objects when # an unrelated header file changes. Define it to "no" to use the hard-coded
@@ -1421,6 +1427,8 @@ ifneq (,$(SOCKLEN_T)) BASIC_CFLAGS += -Dsocklen_t=$(SOCKLEN_T) endif +DEFAULT_DOC_TARGET ?= html man + ifeq ($(uname_S),Darwin) ifndef NO_FINK ifeq ($(shell test -d /sw/lib && echo y),y)
@@ -2371,7 +2379,7 @@ $(XDIFF_LIB): $(XDIFF_OBJS) $(VCSSVN_LIB): $(VCSSVN_OBJS) $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(VCSSVN_OBJS) -export DEFAULT_EDITOR DEFAULT_PAGER +export DEFAULT_EDITOR DEFAULT_PAGER DEFAULT_DOC_TARGET doc: $(MAKE) -C Documentation all
Signature · 1 line
1.8.1.293.g4a210a9
PATCH v2 2/2 Allow installing a non-default set of documentation
In reply to Junio C HamanoIn a fashion similar to the previous DEFAULT_DOC_TARGET patch, teach the build procedure to allow installing the documentation sets specified via DEFAULT_DOC_INSTALL_TARGET.
These two symbols must be separate, as we should allow formatting more than what will be installed. The default has been to format both html and manpages, and to install only the latter.
$ make DEFAULT_DOC_INSTALL_TARGET='html man' install-doc
will format and install both html and manpages.
--- Documentation/Makefile | 3 ++- Makefile | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-)
Documentation/Makefile +2 -1
@@ -69,6 +69,7 @@ endif -include ../config.mak DEFAULT_DOC_TARGET ?= html man +DEFAULT_DOC_INSTALL_TARGET ?= $(DEFAULT_DOC_TARGET) # # For docbook-xsl ...
@@ -171,7 +172,7 @@ info: git.info gitman.info pdf: user-manual.pdf -install: install-man +install: $(patsubst %,install-%,$(DEFAULT_DOC_INSTALL_TARGET)) install-man: man $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
Makefile +4 -1
@@ -287,6 +287,8 @@ all:: # DEFAULT_DOC_TARGET='man html info pdf' # DEFAULT_DOC_TARGET='html' # +# DEFAULT_DOC_INSTALL_TARGET can be used in a similar way. +# # Define COMPUTE_HEADER_DEPENDENCIES to "yes" if you want dependencies on # header files to be automatically computed, to avoid rebuilding objects when # an unrelated header file changes. Define it to "no" to use the hard-coded
@@ -1428,6 +1430,7 @@ ifneq (,$(SOCKLEN_T)) endif DEFAULT_DOC_TARGET ?= html man +DEFAULT_DOC_INSTALL_TARGET ?= man ifeq ($(uname_S),Darwin) ifndef NO_FINK
@@ -2379,7 +2382,7 @@ $(XDIFF_LIB): $(XDIFF_OBJS) $(VCSSVN_LIB): $(VCSSVN_OBJS) $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(VCSSVN_OBJS) -export DEFAULT_EDITOR DEFAULT_PAGER DEFAULT_DOC_TARGET +export DEFAULT_EDITOR DEFAULT_PAGER DEFAULT_DOC_TARGET DEFAULT_DOC_INSTALL_TARGET doc: $(MAKE) -C Documentation all
Signature · 1 line
1.8.1.293.g4a210a9
Quoted 5 lines · Junio C Hamano
This allows things like:
$ DEFAULT_DOC_TARGET=html make doc $ DEFAULT_DOC_INSTALL_TARGET=html make install-doc
Quoted 7 lines
on a platform that does not have manpage viewer. Which is not very useful, given that you can already say
$ make install-htmlon such a platform, and these install-$format targets will not go away.
I think the usefulness is that it can be set by default for a particular uname, so people on Windows can just type "make install-doc" without having to care about setting anything (though to be honest, I do not even know what they build by default; maybe they do build manpages). Except that in the original thread:
it became clear that to do that we would also want to hoist the uname automagic defaults into their own file that could be read from Documentation/Makefile.
Quoted 8 lines
The real motivation behind this was to let me say:
$ git checkout $some_old_fork_point $ DEFAULT_DOC_TARGET=git-push.1 make docwhile updating the sources to the documentation for the maintainance track, without having to format everything else that is different between the old fork point and the primary branch I usually work on.
I still don't see how this is any advantage over:
make -C Documentation git-push.1
Quoted 3 lines
The first one was discussed some time ago on the list and all the fixes mentioned on the thread already squashed in. The second one is merely for completeness.
I wonder...do we really need DEFAULT_DOC_INSTALL_TARGET? Why isn't it the same as DEFAULT_DOC_TARGET? I realize that right now we build html and manpages by default, but only install man. But then why do we bother building html then?
-Peff
Quoted 12 lines · Jeff King
Quoted 10 lines · Junio C Hamano
This allows things like:
$ DEFAULT_DOC_TARGET=html make doc $ DEFAULT_DOC_INSTALL_TARGET=html make install-docon a platform that does not have manpage viewer. Which is not very useful, given that you can already say
$ make install-html
Quoted 7 lines
Quoted 2 lines
on such a platform, and these install-$format targets will not go away.
I think the usefulness is that it can be set by default for a particular uname, so people on Windows can just type "make install-doc" without having to care about setting anything (though to be honest, I do not even know what they build by default; maybe they do build manpages).
I also notice that we have DEFAULT_HELP_FORMAT (which is "html" on Windows). Wouldn't that be a sane default for DEFAULT_DOC_TARGET if it is set? I guess we can set all three independently for maximum flexibility, though, but it seems like a sane fallback.
-Peff
Quoted 11 lines · Jeff King
I think the usefulness is that it can be set by default for a particular uname, so people on Windows can just type "make install-doc" without having to care about setting anything (though to be honest, I do not even know what they build by default; maybe they do build manpages). Except that in the original thread:
it became clear that to do that we would also want to hoist the uname automagic defaults into their own file that could be read from
Documentation/Makefile.
IOW, this (on the current master), which I think is a nice cleanup regardless of this series:
-- >8 --
Subject: [PATCH] Makefile: hoist uname autodetection to config.mak.uname
Our Makefile first sets up some sane per-platform defaults by looking at "uname", then modifies that according to the results of autoconf (if any), then modifies that according to the user's wishes in config.mak.
For sub-Makefiles like Documentation/Makefile, the latter two are available, but the uname defaults are available only to the main Makefile. This hasn't been a problem so far, because the sub-Makefiles do not rely on any of those automatic settings to do their work.
This patch puts the uname magic into its own file so it can be reused in other Makefiles, opening up the possibility of new knobs.
Note that we leave one reference to uname in the top-levelMakefile: if we are on Darwin, we must check the NO_FINK and NO_DARWIN_PORTS settings. But because we are combining uname settings with user-options, we must do so after all of the config is loaded. This is acceptable, as the resulting conditionals are about setting variables specific to the top-level Makefile (and if that ever changes, we can hoist them into a separate post-config include, too).
---
I'm happy to call it "config.mak.autodetect" if you prefer. My rationale was that we might eventually have several levels of autodetection, and we would want to be able to order them individually (in fact, we already do; config.mak.autogen is another form that should take precedence over uname detection, and it is already split out).
Makefile | 526 +------------------------------------------------------ config.mak.uname | 522 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 523 insertions(+), 525 deletions(-) create mode 100644 config.mak.uname
Makefile +1 -525
@@ -326,19 +326,6 @@ GIT-VERSION-FILE: FORCE @$(SHELL_PATH) ./GIT-VERSION-GEN -include GIT-VERSION-FILE -uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') -uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') -uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') -uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') -uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') -uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') - -ifdef MSVC - # avoid the MingW and Cygwin configuration sections - uname_S := Windows - uname_O := Windows -endif - # CFLAGS and LDFLAGS are for the users to override from the command line. CFLAGS = -g -O2 -Wall
@@ -937,518 +924,7 @@ GIT_USER_AGENT = git/$(GIT_VERSION) GIT_USER_AGENT = git/$(GIT_VERSION) -# -# Platform specific tweaks -# - -# We choose to avoid "if .. else if .. else .. endif endif" -# because maintaining the nesting to match is a pain. If -# we had "elif" things would have been much nicer... - -ifeq ($(uname_M),x86_64) - XDL_FAST_HASH = YesPlease -endif -ifeq ($(uname_S),OSF1) - # Need this for u_short definitions et al - BASIC_CFLAGS += -D_OSF_SOURCE - SOCKLEN_T = int - NO_STRTOULL = YesPlease - NO_NSEC = YesPlease -endif -ifeq ($(uname_S),Linux) - NO_STRLCPY = YesPlease - NO_MKSTEMPS = YesPlease - HAVE_PATHS_H = YesPlease - LIBC_CONTAINS_LIBINTL = YesPlease - HAVE_DEV_TTY = YesPlease -endif -ifeq ($(uname_S),GNU/kFreeBSD) - NO_STRLCPY = YesPlease - NO_MKSTEMPS = YesPlease - HAVE_PATHS_H = YesPlease - DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease - LIBC_CONTAINS_LIBINTL = YesPlease -endif -ifeq ($(uname_S),UnixWare) - CC = cc - NEEDS_SOCKET = YesPlease - NEEDS_NSL = YesPlease - NEEDS_SSL_WITH_CRYPTO = YesPlease - NEEDS_LIBICONV = YesPlease - SHELL_PATH = /usr/local/bin/bash - NO_IPV6 = YesPlease - NO_HSTRERROR = YesPlease - NO_MKSTEMPS = YesPlease - BASIC_CFLAGS += -Kthread - BASIC_CFLAGS += -I/usr/local/include - BASIC_LDFLAGS += -L/usr/local/lib - INSTALL = ginstall - TAR = gtar - NO_STRCASESTR = YesPlease - NO_MEMMEM = YesPlease -endif -ifeq ($(uname_S),SCO_SV) - ifeq ($(uname_R),3.2) - CFLAGS = -O2 - endif - ifeq ($(uname_R),5) - CC = cc - BASIC_CFLAGS += -Kthread - endif - NEEDS_SOCKET = YesPlease - NEEDS_NSL = YesPlease - NEEDS_SSL_WITH_CRYPTO = YesPlease - NEEDS_LIBICONV = YesPlease - SHELL_PATH = /usr/bin/bash - NO_IPV6 = YesPlease - NO_HSTRERROR = YesPlease - NO_MKSTEMPS = YesPlease - BASIC_CFLAGS += -I/usr/local/include - BASIC_LDFLAGS += -L/usr/local/lib - NO_STRCASESTR = YesPlease - NO_MEMMEM = YesPlease - INSTALL = ginstall - TAR = gtar -endif -ifeq ($(uname_S),Darwin) - NEEDS_CRYPTO_WITH_SSL = YesPlease - NEEDS_SSL_WITH_CRYPTO = YesPlease - NEEDS_LIBICONV = YesPlease - ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2) - OLD_ICONV = UnfortunatelyYes - endif - ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2) - NO_STRLCPY = YesPlease - endif - NO_MEMMEM = YesPlease - USE_ST_TIMESPEC = YesPlease - HAVE_DEV_TTY = YesPlease - COMPAT_OBJS += compat/precompose_utf8.o - BASIC_CFLAGS += -DPRECOMPOSE_UNICODE -endif -ifeq ($(uname_S),SunOS) - NEEDS_SOCKET = YesPlease - NEEDS_NSL = YesPlease - SHELL_PATH = /bin/bash - SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin - NO_STRCASESTR = YesPlease - NO_MEMMEM = YesPlease - NO_MKDTEMP = YesPlease - NO_MKSTEMPS = YesPlease - NO_REGEX = YesPlease - NO_FNMATCH_CASEFOLD = YesPlease - NO_MSGFMT_EXTENDED_OPTIONS = YesPlease - HAVE_DEV_TTY = YesPlease - ifeq ($(uname_R),5.6) - SOCKLEN_T = int - NO_HSTRERROR = YesPlease - NO_IPV6 = YesPlease - NO_SOCKADDR_STORAGE = YesPlease - NO_UNSETENV = YesPlease - NO_SETENV = YesPlease - NO_STRLCPY = YesPlease - NO_STRTOUMAX = YesPlease - GIT_TEST_CMP = cmp - endif - ifeq ($(uname_R),5.7) - NEEDS_RESOLV = YesPlease - NO_IPV6 = YesPlease - NO_SOCKADDR_STORAGE = YesPlease - NO_UNSETENV = YesPlease - NO_SETENV = YesPlease - NO_STRLCPY = YesPlease - NO_STRTOUMAX = YesPlease - GIT_TEST_CMP = cmp - endif - ifeq ($(uname_R),5.8) - NO_UNSETENV = YesPlease - NO_SETENV = YesPlease - NO_STRTOUMAX = YesPlease - GIT_TEST_CMP = cmp - endif - ifeq ($(uname_R),5.9) - NO_UNSETENV = YesPlease - NO_SETENV = YesPlease - NO_STRTOUMAX = YesPlease - GIT_TEST_CMP = cmp - endif - INSTALL = /usr/ucb/install - TAR = gtar - BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ -DHAVE_ALLOCA_H -endif -ifeq ($(uname_O),Cygwin) - ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4) - NO_D_TYPE_IN_DIRENT = YesPlease - NO_D_INO_IN_DIRENT = YesPlease - NO_STRCASESTR = YesPlease - NO_MEMMEM = YesPlease - NO_MKSTEMPS = YesPlease - NO_SYMLINK_HEAD = YesPlease - NO_IPV6 = YesPlease - OLD_ICONV = UnfortunatelyYes - CYGWIN_V15_WIN32API = YesPlease - endif - NO_THREAD_SAFE_PREAD = YesPlease - NEEDS_LIBICONV = YesPlease - NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes - NO_TRUSTABLE_FILEMODE = UnfortunatelyYes - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease - # There are conflicting reports about this. - # On some boxes NO_MMAP is needed, and not so elsewhere. - # Try commenting this out if you suspect MMAP is more efficient - NO_MMAP = YesPlease - X = .exe - COMPAT_OBJS += compat/cygwin.o - UNRELIABLE_FSTAT = UnfortunatelyYes - SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield -endif -ifeq ($(uname_S),FreeBSD) - NEEDS_LIBICONV = YesPlease - OLD_ICONV = YesPlease - NO_MEMMEM = YesPlease - BASIC_CFLAGS += -I/usr/local/include - BASIC_LDFLAGS += -L/usr/local/lib - DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease - USE_ST_TIMESPEC = YesPlease - ifeq ($(shell expr "$(uname_R)" : '4\.'),2) - PTHREAD_LIBS = -pthread - NO_UINTMAX_T = YesPlease - NO_STRTOUMAX = YesPlease - endif - PYTHON_PATH = /usr/local/bin/python - HAVE_PATHS_H = YesPlease -endif -ifeq ($(uname_S),OpenBSD) - NO_STRCASESTR = YesPlease - NO_MEMMEM = YesPlease - USE_ST_TIMESPEC = 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) - NEEDS_LIBICONV = YesPlease - endif - BASIC_CFLAGS += -I/usr/pkg/include - 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 - NO_MKSTEMPS = YesPlease - NO_STRLCPY = YesPlease - NO_NSEC = YesPlease - FREAD_READS_DIRECTORIES = UnfortunatelyYes - INTERNAL_QSORT = UnfortunatelyYes - NEEDS_LIBICONV = YesPlease - BASIC_CFLAGS += -D_LARGE_FILES - ifeq ($(shell expr "$(uname_V)" : '[1234]'),1) - NO_PTHREADS = YesPlease - else - PTHREAD_LIBS = -lpthread - endif - ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3) - INLINE = '' - endif - GIT_TEST_CMP = cmp -endif -ifeq ($(uname_S),GNU) - # GNU/Hurd - NO_STRLCPY = YesPlease - NO_MKSTEMPS = YesPlease - HAVE_PATHS_H = YesPlease - LIBC_CONTAINS_LIBINTL = YesPlease -endif -ifeq ($(uname_S),IRIX) - NO_SETENV = YesPlease - NO_UNSETENV = YesPlease - NO_STRCASESTR = YesPlease - NO_MEMMEM = YesPlease - NO_MKSTEMPS = YesPlease - NO_MKDTEMP = YesPlease - # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads - # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), - # git dies with a segmentation fault when trying to access the first - # entry of a reflog. The conservative choice is made to always set - # NO_MMAP. If you suspect that your compiler is not affected by this - # issue, comment out the NO_MMAP statement. - NO_MMAP = YesPlease - NO_REGEX = YesPlease - NO_FNMATCH_CASEFOLD = YesPlease - SNPRINTF_RETURNS_BOGUS = YesPlease - SHELL_PATH = /usr/gnu/bin/bash - NEEDS_LIBGEN = YesPlease -endif -ifeq ($(uname_S),IRIX64) - NO_SETENV = YesPlease - NO_UNSETENV = YesPlease - NO_STRCASESTR = YesPlease - NO_MEMMEM = YesPlease - NO_MKSTEMPS = YesPlease - NO_MKDTEMP = YesPlease - # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads - # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), - # git dies with a segmentation fault when trying to access the first - # entry of a reflog. The conservative choice is made to always set - # NO_MMAP. If you suspect that your compiler is not affected by this - # issue, comment out the NO_MMAP statement. - NO_MMAP = YesPlease - NO_REGEX = YesPlease - NO_FNMATCH_CASEFOLD = YesPlease - SNPRINTF_RETURNS_BOGUS = YesPlease - SHELL_PATH = /usr/gnu/bin/bash - NEEDS_LIBGEN = YesPlease -endif -ifeq ($(uname_S),HP-UX) - INLINE = __inline - NO_IPV6 = YesPlease - NO_SETENV = YesPlease - NO_STRCASESTR = YesPlease - NO_MEMMEM = YesPlease - NO_MKSTEMPS = YesPlease - NO_STRLCPY = YesPlease - NO_MKDTEMP = YesPlease - NO_UNSETENV = YesPlease - NO_HSTRERROR = YesPlease - NO_SYS_SELECT_H = YesPlease - NO_FNMATCH_CASEFOLD = YesPlease - SNPRINTF_RETURNS_BOGUS = YesPlease - NO_NSEC = YesPlease - ifeq ($(uname_R),B.11.00) - NO_INET_NTOP = YesPlease - NO_INET_PTON = YesPlease - endif - ifeq ($(uname_R),B.10.20) - # Override HP-UX 11.x setting: - INLINE = - SOCKLEN_T = size_t - NO_PREAD = YesPlease - NO_INET_NTOP = YesPlease - NO_INET_PTON = YesPlease - endif - GIT_TEST_CMP = cmp -endif -ifeq ($(uname_S),Windows) - GIT_VERSION := $(GIT_VERSION).MSVC - pathsep = ; - NO_PREAD = YesPlease - NEEDS_CRYPTO_WITH_SSL = YesPlease - NO_LIBGEN_H = YesPlease - NO_POLL = YesPlease - NO_SYMLINK_HEAD = YesPlease - NO_IPV6 = YesPlease - NO_UNIX_SOCKETS = YesPlease - NO_SETENV = YesPlease - NO_UNSETENV = YesPlease - NO_STRCASESTR = YesPlease - NO_STRLCPY = YesPlease - NO_STRTOK_R = YesPlease - NO_FNMATCH = YesPlease - NO_MEMMEM = YesPlease - # NEEDS_LIBICONV = YesPlease - NO_ICONV = YesPlease - NO_STRTOUMAX = YesPlease - NO_STRTOULL = YesPlease - NO_MKDTEMP = YesPlease - NO_MKSTEMPS = YesPlease - SNPRINTF_RETURNS_BOGUS = YesPlease - NO_SVN_TESTS = YesPlease - NO_PERL_MAKEMAKER = YesPlease - RUNTIME_PREFIX = YesPlease - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease - NO_NSEC = YesPlease - USE_WIN32_MMAP = YesPlease - # USE_NED_ALLOCATOR = YesPlease - UNRELIABLE_FSTAT = UnfortunatelyYes - OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo - NO_REGEX = YesPlease - NO_CURL = YesPlease - NO_PYTHON = YesPlease - BLK_SHA1 = YesPlease - NO_POSIX_GOODIES = UnfortunatelyYes - NATIVE_CRLF = YesPlease - DEFAULT_HELP_FORMAT = html - - CC = compat/vcbuild/scripts/clink.pl - AR = compat/vcbuild/scripts/lib.pl - CFLAGS = - BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE - COMPAT_OBJS = compat/msvc.o compat/winansi.o \ - compat/win32/pthread.o compat/win32/syslog.o \ - compat/win32/dirent.o - COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" - BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib - EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib - PTHREAD_LIBS = - lib = -ifndef DEBUG - BASIC_CFLAGS += -GL -Os -MT - BASIC_LDFLAGS += -LTCG - AR += -LTCG -else - BASIC_CFLAGS += -Zi -MTd -endif - X = .exe -endif -ifeq ($(uname_S),Interix) - NO_INITGROUPS = YesPlease - NO_IPV6 = YesPlease - NO_MEMMEM = YesPlease - NO_MKDTEMP = YesPlease - NO_STRTOUMAX = YesPlease - NO_NSEC = YesPlease - NO_MKSTEMPS = YesPlease - ifeq ($(uname_R),3.5) - NO_INET_NTOP = YesPlease - NO_INET_PTON = YesPlease - NO_SOCKADDR_STORAGE = YesPlease - NO_FNMATCH_CASEFOLD = YesPlease - endif - ifeq ($(uname_R),5.2) - NO_INET_NTOP = YesPlease - NO_INET_PTON = YesPlease - NO_SOCKADDR_STORAGE = YesPlease - NO_FNMATCH_CASEFOLD = YesPlease - endif -endif -ifeq ($(uname_S),Minix) - NO_IPV6 = YesPlease - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease - NO_NSEC = YesPlease - NEEDS_LIBGEN = - NEEDS_CRYPTO_WITH_SSL = YesPlease - NEEDS_IDN_WITH_CURL = YesPlease - NEEDS_SSL_WITH_CURL = YesPlease - NEEDS_RESOLV = - NO_HSTRERROR = YesPlease - NO_MMAP = YesPlease - NO_CURL = - NO_EXPAT = -endif -ifeq ($(uname_S),NONSTOP_KERNEL) - # Needs some C99 features, "inline" is just one of them. - # INLINE='' would just replace one set of warnings with another and - # still not compile in c89 mode, due to non-const array initializations. - CC = cc -c99 - # Disable all optimization, seems to result in bad code, with -O or -O2 - # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects - # abends on "git push". Needs more investigation. - CFLAGS = -g -O0 - # We'd want it to be here. - prefix = /usr/local - # Our's are in ${prefix}/bin (perl might also be in /usr/bin/perl). - PERL_PATH = ${prefix}/bin/perl - PYTHON_PATH = ${prefix}/bin/python - - # As detected by './configure'. - # Missdetected, hence commented out, see below. - #NO_CURL = YesPlease - # Added manually, see above. - NEEDS_SSL_WITH_CURL = YesPlease - HAVE_LIBCHARSET_H = YesPlease - NEEDS_LIBICONV = YesPlease - NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease - NO_SYS_SELECT_H = UnfortunatelyYes - NO_D_TYPE_IN_DIRENT = YesPlease - NO_HSTRERROR = YesPlease - NO_STRCASESTR = YesPlease - NO_FNMATCH_CASEFOLD = YesPlease - NO_MEMMEM = YesPlease - NO_STRLCPY = YesPlease - NO_SETENV = YesPlease - NO_UNSETENV = YesPlease - NO_MKDTEMP = YesPlease - NO_MKSTEMPS = YesPlease - # Currently libiconv-1.9.1. - OLD_ICONV = UnfortunatelyYes - NO_REGEX = YesPlease - NO_PTHREADS = UnfortunatelyYes - - # Not detected (nor checked for) by './configure'. - # We don't have SA_RESTART on NonStop, unfortunalety. - COMPAT_CFLAGS += -DSA_RESTART=0 - # Apparently needed in compat/fnmatch/fnmatch.c. - COMPAT_CFLAGS += -DHAVE_STRING_H=1 - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease - NO_NSEC = YesPlease - NO_PREAD = YesPlease - NO_MMAP = YesPlease - NO_POLL = YesPlease - NO_INTPTR_T = UnfortunatelyYes - # Bug report 10-120822-4477 submitted to HP NonStop development. - MKDIR_WO_TRAILING_SLASH = YesPlease - # RFE 10-120912-4693 submitted to HP NonStop development. - NO_SETITIMER = UnfortunatelyYes - SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin - SHELL_PATH = /usr/local/bin/bash - # as of H06.25/J06.14, we might better use this - #SHELL_PATH = /usr/coreutils/bin/bash -endif -ifneq (,$(findstring MINGW,$(uname_S))) - pathsep = ; - NO_PREAD = YesPlease - NEEDS_CRYPTO_WITH_SSL = YesPlease - NO_LIBGEN_H = YesPlease - NO_POLL = YesPlease - NO_SYMLINK_HEAD = YesPlease - NO_UNIX_SOCKETS = YesPlease - NO_SETENV = YesPlease - NO_UNSETENV = YesPlease - NO_STRCASESTR = YesPlease - NO_STRLCPY = YesPlease - NO_STRTOK_R = YesPlease - NO_FNMATCH = YesPlease - NO_MEMMEM = YesPlease - NEEDS_LIBICONV = YesPlease - OLD_ICONV = YesPlease - NO_STRTOUMAX = YesPlease - NO_MKDTEMP = YesPlease - NO_MKSTEMPS = YesPlease - NO_SVN_TESTS = YesPlease - NO_PERL_MAKEMAKER = YesPlease - RUNTIME_PREFIX = YesPlease - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease - NO_NSEC = YesPlease - USE_WIN32_MMAP = YesPlease - USE_NED_ALLOCATOR = YesPlease - UNRELIABLE_FSTAT = UnfortunatelyYes - OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo - NO_REGEX = YesPlease - NO_PYTHON = YesPlease - BLK_SHA1 = YesPlease - ETAGS_TARGET = ETAGS - NO_INET_PTON = YesPlease - NO_INET_NTOP = YesPlease - NO_POSIX_GOODIES = UnfortunatelyYes - COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32 - COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" - COMPAT_OBJS += compat/mingw.o compat/winansi.o \ - compat/win32/pthread.o compat/win32/syslog.o \ - compat/win32/dirent.o - EXTLIBS += -lws2_32 - PTHREAD_LIBS = - X = .exe - SPARSE_FLAGS = -Wno-one-bit-signed-bitfield -ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) - htmldir = doc/git/html/ - prefix = - INSTALL = /bin/install - EXTLIBS += /mingw/lib/libz.a - NO_R_TO_GCC_LINKER = YesPlease - INTERNAL_QSORT = YesPlease - HAVE_LIBCHARSET_H = YesPlease -else - NO_CURL = YesPlease -endif -endif - +include config.mak.uname -include config.mak.autogen -include config.mak
config.mak.uname new file +522 -0
522 lines not on this page · raw message
Signature · 1 line
1.8.1.rc3.4.gf3a2f57
Quoted 14 lines · Jeff King
Quoted 11 lines · Jeff King
I think the usefulness is that it can be set by default for a particular uname, so people on Windows can just type "make install-doc" without having to care about setting anything (though to be honest, I do not even know what they build by default; maybe they do build manpages). Except that in the original thread:
it became clear that to do that we would also want to hoist the uname automagic defaults into their own file that could be read from
Documentation/Makefile.
Quoted 5 lines
IOW, this (on the current master), which I think is a nice cleanup regardless of this series:
-- >8 --
Subject: [PATCH]Makefile: hoist uname autodetection to config.mak.uname
Not surprising for such a large refactoring, but this has conflicts with what's in next. Here's the patch to apply on top of the conflicted tree you get from merging this with "next":
Makefile +0 -0
config.mak.uname +17 -0
@@ -425,6 +425,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) # Added manually, see above. NEEDS_SSL_WITH_CURL = YesPlease HAVE_LIBCHARSET_H = YesPlease + HAVE_STRINGS_H = YesPlease NEEDS_LIBICONV = YesPlease NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease NO_SYS_SELECT_H = UnfortunatelyYes
@@ -520,3 +521,19 @@ endif NO_CURL = YesPlease endif endif +ifeq ($(uname_S),QNX) + COMPAT_CFLAGS += -DSA_RESTART=0 + HAVE_STRINGS_H = YesPlease + NEEDS_SOCKET = YesPlease + NO_FNMATCH_CASEFOLD = YesPlease + NO_GETPAGESIZE = YesPlease + NO_ICONV = YesPlease + NO_MEMMEM = YesPlease + NO_MKDTEMP = YesPlease + NO_MKSTEMPS = YesPlease + NO_NSEC = YesPlease + NO_PTHREADS = YesPlease + NO_R_TO_GCC_LINKER = YesPlease + NO_STRCASESTR = YesPlease + NO_STRLCPY = YesPlease +endif
Quoted 3 lines · Jeff King
Not surprising for such a large refactoring, but this has conflicts with what's in next. Here's the patch to apply on top of the conflicted tree you get from merging this with "next":
Yeah, verifying the manual fixup is a bit tricky indeed. The output from
$ git blame -C HEAD^.. -- config.mak.uname | grep '^[^^]'
shows only the first line of the resulting file, and the output from
$ git blame --reverse -C HEAD^.. -- Makefile | grep '^^'
shows only the three-line "Platform specific tweaks" comment, which was replaced by your version in config.mak.uname, so nothing extra was added and nothing important was lost between the two, it seems.
Thanks.
Quoted 10 lines · Junio C Hamano
Quoted 3 lines · Jeff King
Not surprising for such a large refactoring, but this has conflicts with what's in next. Here's the patch to apply on top of the conflicted tree you get from merging this with "next":
Yeah, verifying the manual fixup is a bit tricky indeed. The output from
$ git blame -C HEAD^.. -- config.mak.uname | grep '^[^^]'
Quoted 7 lines
shows only the first line of the resulting file, and the output from
$ git blame --reverse -C HEAD^.. -- Makefile | grep '^^'shows only the three-line "Platform specific tweaks" comment, which was replaced by your version in config.mak.uname, so nothing extra was added and nothing important was lost between the two, it seems.
Yeah, it's probably easier to do than verify. I knew that my patch was a straight copy/paste move of the big if/else block, replacing it with the include. So the obvious resolution is to mechanically move the "theirs" block from next in the same way. And then the resulting diff shows the fixup (which you can verify does not do anything fancy).
It's really the same logic that merge-recursive uses for full-file renames, except that git is not smart enough to figure out that it was a 500-line block that moved, not the whole file. It comes up rarely enough that it is probably not worth trying to teach the merge machinery about code block movement. But it would be cool. :)
-Peff