bb5e95e9e94531c071c2a5e89da5ac2e654c7047
markd
  Mon Apr 23 17:03:25 2018 -0700
Changes with Galt to allow getting -Werror on the CIRM machines.  This makes the make variable about hgwdev more explicit

diff --git src/inc/common.mk src/inc/common.mk
index 0a73c19..507b827 100644
--- src/inc/common.mk
+++ src/inc/common.mk
@@ -10,31 +10,41 @@
     MACHTYPE:=$(shell uname -m)
 #    $(info MACHTYPE was empty, set to: ${MACHTYPE})
 endif
 ifneq (,$(findstring -,$(MACHTYPE)))
 #    $(info MACHTYPE has - sign ${MACHTYPE})
     MACHTYPE:=$(shell uname -m)
 #    $(info MACHTYPE has - sign set to: ${MACHTYPE})
 endif
 
 HG_DEFS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_${MACHTYPE}
 HG_INC+=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc -I$(kentSrc)/htslib
 
 # to check for Mac OSX Darwin specifics:
 UNAME_S := $(shell uname -s)
 # to check for builds on hgwdev
-FULLWARN = $(shell uname -n)
+HOSTNAME = $(shell uname -n)
+
+ifeq (${HOSTNAME},hgwdev)
+  IS_HGWDEV = yes
+else
+  IS_HGWDEV = no
+endif
+
+ifeq (${IS_HGWDEV},yes)
+  FULLWARN = yes
+endif
 
 ifeq (${PTHREADLIB},)
   PTHREADLIB=-lpthread
 endif
 
 # pthreads is required
 ifneq ($(UNAME_S),Darwin)
   L+=${PTHREADLIB}
 endif
 
 # autodetect if openssl is installed
 ifeq (${SSLDIR},)
   SSLDIR = /usr/include/openssl
 endif
 
@@ -51,31 +61,31 @@
 ifeq (${USE_HAL},1)
     HALLIBS=${HALDIR}/lib/halMaf.a ${HALDIR}/lib/halChain.a ${HALDIR}/lib/halMaf.a ${HALDIR}/lib/halLiftover.a ${HALDIR}/lib/halLod.a ${HALDIR}/lib/halLib.a ${HALDIR}/lib/sonLib.a ${HALDIR}/lib/libhdf5_cpp.a ${HALDIR}/lib/libhdf5.a ${HALDIR}/lib/libhdf5_hl.a
     HG_DEFS+=-DUSE_HAL
     HG_INC+=-I${HALDIR}/inc
 endif
 
 
 # libssl: disabled by default
 ifneq (${SSL_DIR}, "/usr/include/openssl")
   ifneq ($(UNAME_S),Darwin)
     L+=-L${SSL_DIR}/lib
   endif
     HG_INC+=-I${SSL_DIR}/include
 endif
 # on hgwdev, already using the static library with mysqllient.
-ifeq (${FULLWARN},hgwdev)
+ifeq (${IS_HGWDEV},yes)
    L+=/usr/lib64/libssl.a /usr/lib64/libcrypto.a -lkrb5
 else
    L+=-lssl -lcrypto
 endif
 
 # autodetect where libm is installed
 ifeq (${MLIB},)
   ifneq ($(wildcard /usr/lib64/libm.a),)
       MLIB=/usr/lib64/libm.a
   endif
 endif
 ifeq (${MLIB},)
   MLIB=-lm
 endif
 
@@ -107,31 +117,31 @@
   PNGLIB=-lpng
 endif
 ifeq (${PNGINCL},)
   ifneq ($(wildcard /opt/local/include/png.h),)
       PNGINCL=-I/opt/local/include
   else
       PNGINCL := $(shell libpng-config --I_opts  || true)
 #       $(info using libpng-config to set PNGINCL: ${PNGINCL})
   endif
 endif
 
 # autodetect where mysql includes and libraries are installed
 # do not need to do this during 'clean' target (this is very slow for 'clean')
 ifneq ($(MAKECMDGOALS),clean)
   # on hgwdev, use the static library.
-  ifeq (${FULLWARN},hgwdev)
+  ifeq (${IS_HGWDEV},yes)
     MYSQLINC=/usr/include/mysql
     MYSQLLIBS=/usr/lib64/libssl.a /usr/lib64/libcrypto.a /usr/lib64/mysql/libmysqlclient.a -lkrb5
   endif
   # this does *not* work on Mac OSX with the dynamic libraries
   ifneq ($(UNAME_S),Darwin)
     ifeq (${MYSQLLIBS},)
       MYSQLLIBS := $(shell mysql_config --libs || true)
 #        $(info using mysql_config to set MYSQLLIBS: ${MYSQLLIBS})
     endif
   endif
 
   ifeq (${MYSQLINC},)
     MYSQLINC := $(shell mysql_config --include | sed -e 's/-I//' || true)
 #        $(info using mysql_config to set MYSQLINC: ${MYSQLINC})
   endif
@@ -209,31 +219,31 @@
     ifeq (${MYSQLINC},)
         $(error can not find installed mysql development system)
     endif
   endif
     # last resort, hoping the compiler can find it in standard locations
   ifeq (${MYSQLLIBS},)
       MYSQLLIBS="-lmysqlclient"
   endif
 endif
 
 # $(info have MYSQLINC: ${MYSQLINC})
 # $(info have MYSQLLIBS: ${MYSQLLIBS})
 
 # OK to add -lstdc++ to all MYSQLLIBS just in case it is
 #    MySQL version 5.6 libraries, but no 'librt' on Mac OSX
-ifeq (${FULLWARN},hgwdev)
+ifeq (${IS_HGWDEV},yes)
   MYSQLLIBS += /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.a /usr/lib/debug/usr/lib64/librt.a
 else
   ifeq ($(UNAME_S),Darwin)
     MYSQLLIBS += -lstdc++
   else
     MYSQLLIBS += -lstdc++ -lrt
   endif
 endif
 
 ifeq (${ZLIB},)
   ZLIB=-lz
   ifneq ($(wildcard /opt/local/lib/libz.a),)
     ZLIB=/opt/local/lib/libz.a
   endif
   ifneq ($(wildcard /usr/lib64/libz.a),)
@@ -258,31 +268,31 @@
   HG_DEFS+=-DUSE_GBIB_PWD
   HG_INC += -I${GBIBDIR}
 endif
 
 SYS = $(shell uname -s)
 
 ifeq (${HG_WARN},)
   ifeq (${SYS},Darwin)
       HG_WARN = -Wall -Wno-unused-variable -Wno-deprecated-declarations
       HG_WARN_UNINIT=
   else
     ifeq (${SYS},SunOS)
       HG_WARN = -Wall -Wformat -Wimplicit -Wreturn-type
       HG_WARN_UNINIT=-Wuninitialized
     else
-      ifeq (${FULLWARN},hgwdev)
+      ifeq (${FULLWARN},yes)
         HG_WARN = -Wall -Werror -Wformat -Wformat-security -Wimplicit -Wreturn-type -Wempty-body -Wunused-but-set-variable
         HG_WARN_UNINIT=-Wuninitialized
       else
         HG_WARN = -Wall -Wformat -Wimplicit -Wreturn-type
         HG_WARN_UNINIT=-Wuninitialized
       endif
     endif
   endif
   # -Wuninitialized generates a warning without optimization
   ifeq ($(findstring -O,${COPT}),-O)
      HG_WARN += ${HG_WARN_UNINIT}
   endif
 endif
 
 # this is to hack around many make files not including HG_WARN in