Merge branch 'jk/make-findstring-makeflags-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 16 Oct 2015 21:32:38 +0000 (14:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Oct 2015 21:32:38 +0000 (14:32 -0700)
Customization to change the behaviour with "make -w" and "make -s"
in our Makefile was broken when they were used together.

* jk/make-findstring-makeflags-fix:
Makefile: fix MAKEFLAGS tests with multiple flags

1  2 
Makefile
diff --cc Makefile
index 0f68c7075dc802597b1e2b79c04534994e488e5d,ef95ada06c1a09da9c71da83856e8d6a957e4b49..04c223102346c209bad78550723027543cffe7d1
+++ b/Makefile
  ifdef NO_PERL_MAKEMAKER
        export NO_PERL_MAKEMAKER
  endif
 +ifdef NO_HSTRERROR
 +      COMPAT_CFLAGS += -DNO_HSTRERROR
 +      COMPAT_OBJS += compat/hstrerror.o
 +endif
 +ifdef NO_MEMMEM
 +      COMPAT_CFLAGS += -DNO_MEMMEM
 +      COMPAT_OBJS += compat/memmem.o
 +endif
 +ifdef NO_GETPAGESIZE
 +      COMPAT_CFLAGS += -DNO_GETPAGESIZE
 +endif
 +ifdef INTERNAL_QSORT
 +      COMPAT_CFLAGS += -DINTERNAL_QSORT
 +      COMPAT_OBJS += compat/qsort.o
 +endif
 +ifdef RUNTIME_PREFIX
 +      COMPAT_CFLAGS += -DRUNTIME_PREFIX
 +endif
 +
 +ifdef NO_PTHREADS
 +      BASIC_CFLAGS += -DNO_PTHREADS
 +else
 +      BASIC_CFLAGS += $(PTHREAD_CFLAGS)
 +      EXTLIBS += $(PTHREAD_LIBS)
 +      LIB_OBJS += thread-utils.o
 +endif
 +
 +ifdef HAVE_PATHS_H
 +      BASIC_CFLAGS += -DHAVE_PATHS_H
 +endif
 +
 +ifdef HAVE_LIBCHARSET_H
 +      BASIC_CFLAGS += -DHAVE_LIBCHARSET_H
 +      EXTLIBS += $(CHARSET_LIB)
 +endif
 +
 +ifdef HAVE_STRINGS_H
 +      BASIC_CFLAGS += -DHAVE_STRINGS_H
 +endif
 +
 +ifdef HAVE_DEV_TTY
 +      BASIC_CFLAGS += -DHAVE_DEV_TTY
 +endif
 +
 +ifdef DIR_HAS_BSD_GROUP_SEMANTICS
 +      COMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS
 +endif
 +ifdef UNRELIABLE_FSTAT
 +      BASIC_CFLAGS += -DUNRELIABLE_FSTAT
 +endif
 +ifdef NO_REGEX
 +      COMPAT_CFLAGS += -Icompat/regex
 +      COMPAT_OBJS += compat/regex/regex.o
 +endif
 +ifdef NATIVE_CRLF
 +      BASIC_CFLAGS += -DNATIVE_CRLF
 +endif
 +
 +ifdef USE_NED_ALLOCATOR
 +       COMPAT_CFLAGS += -Icompat/nedmalloc
 +       COMPAT_OBJS += compat/nedmalloc/nedmalloc.o
 +endif
 +
 +ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
 +      export GIT_TEST_CMP_USE_COPIED_CONTEXT
 +endif
 +
 +ifndef NO_MSGFMT_EXTENDED_OPTIONS
 +      MSGFMT += --check --statistics
 +endif
 +
 +ifneq (,$(XDL_FAST_HASH))
 +      BASIC_CFLAGS += -DXDL_FAST_HASH
 +endif
  
 -QUIET_SUBDIR0  = $(MAKE) -C # space to separate -C and subdir
 +ifdef GMTIME_UNRELIABLE_ERRORS
 +      COMPAT_OBJS += compat/gmtime.o
 +      BASIC_CFLAGS += -DGMTIME_UNRELIABLE_ERRORS
 +endif
 +
 +ifdef HAVE_CLOCK_GETTIME
 +      BASIC_CFLAGS += -DHAVE_CLOCK_GETTIME
 +      EXTLIBS += -lrt
 +endif
 +
 +ifdef HAVE_CLOCK_MONOTONIC
 +      BASIC_CFLAGS += -DHAVE_CLOCK_MONOTONIC
 +endif
 +
 +ifdef HAVE_BSD_SYSCTL
 +      BASIC_CFLAGS += -DHAVE_BSD_SYSCTL
 +endif
 +
 +ifdef HAVE_GETDELIM
 +      BASIC_CFLAGS += -DHAVE_GETDELIM
 +endif
 +
 +ifeq ($(TCLTK_PATH),)
 +NO_TCLTK = NoThanks
 +endif
 +
 +ifeq ($(PERL_PATH),)
 +NO_PERL = NoThanks
 +endif
 +
 +ifeq ($(PYTHON_PATH),)
 +NO_PYTHON = NoThanks
 +endif
 +
 +QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir
  QUIET_SUBDIR1  =
  
- ifneq ($(findstring $(MAKEFLAGS),w),w)
+ ifneq ($(findstring w,$(MAKEFLAGS)),w)
  PRINT_DIR = --no-print-directory
  else # "make -w"
  NO_SUBDIR = :