diff --git a/GNUmakefile b/GNUmakefile index 7946d27..b75f64b 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -22,7 +22,7 @@ ifeq (${MAKECMDGOALS},config) config: make.inc make.inc: force -else ifneq ($(findstring clean,${MAKECMDGOALS}),clean) +else ifneq (clean,${findstring clean,${MAKECMDGOALS}}) # For `make clean` or `make distclean`, don't include make.inc, # which could generate it. Otherwise, include make.inc. include make.inc @@ -69,7 +69,7 @@ ldflags_shared = -shared # auto-detect OS # $OSTYPE may not be exported from the shell, so echo it ostype := ${shell echo $${OSTYPE}} -ifneq ($(findstring darwin, ${ostype}),) +ifneq (,${findstring darwin, ${ostype}}) # MacOS is darwin macos = 1 # MacOS needs shared library's path set, and shared library version. @@ -271,13 +271,20 @@ distclean: clean #------------------------------------------------------------------------------- # debugging echo: - @echo "ostype = '${ostype}'" + @echo "---------- Options" @echo "static = '${static}'" + @echo "prefix = '${prefix}'" + @echo "abs_prefix = '${abs_prefix}'" + @echo + @echo "---------- Internal variables" + @echo "ostype = '${ostype}'" + @echo "macos = '${macos}'" @echo "id = '${id}'" @echo "last_id = '${last_id}'" @echo "abi_version = '${abi_version}'" @echo "soversion = '${soversion}'" @echo + @echo "---------- Libraries" @echo "lib_name = ${lib_name}" @echo "lib_a = ${lib_a}" @echo "lib_so = ${lib_so}" @@ -297,9 +304,11 @@ echo: @echo @echo "dep = ${dep}" @echo + @echo "---------- C++ compiler" @echo "CXX = ${CXX}" @echo "CXXFLAGS = ${CXXFLAGS}" @echo + @echo "---------- Link flags" @echo "LD = ${LD}" @echo "LDFLAGS = ${LDFLAGS}" @echo "LIBS = ${LIBS}"