cb106f18ff72c3aaf15f63004466cf2cdc429434
hiram
  Fri Jan 31 09:23:37 2014 -0800
avoid an extra leading slash when DESTDIR is empty for DESTBINDIR refs #12106
diff --git src/inc/common.mk src/inc/common.mk
index 0a0e55a..5bda7d6 100644
--- src/inc/common.mk
+++ src/inc/common.mk
@@ -283,31 +283,36 @@
     SCRIPTS=${HOME}/bin/scripts
 endif
 ifeq (${CGI_BIN},)
     CGI_BIN=/usr/local/apache/cgi-bin
 endif
 ifeq (${DOCUMENTROOT},)
     DOCUMENTROOT=/usr/local/apache/htdocs
 endif
 ifeq (${BINDIR},)
     BINDIR = ${HOME}/bin/${MACHTYPE}
 endif
 ifeq (${ENCODE_PIPELINE_BIN},)
     ENCODE_PIPELINE_BIN=/cluster/data/encode/pipeline/bin
 endif
 
+# avoid an extra leading slash when DESTDIR is empty
+ifeq (${DESTDIR},)
+  DESTBINDIR=${BINDIR}
+else
   DESTBINDIR=${DESTDIR}/${BINDIR}
+endif
 
 # location of stringify program
 STRINGIFY = ${DESTBINDIR}/stringify
 
 MKDIR=mkdir -p
 ifeq (${STRIP},)
    STRIP=true
 endif
 CVS=cvs
 GIT=git
 
 # portable naming of compiled executables: add ".exe" if compiled on 
 # Windows (with cygwin).
 ifeq (${OS}, Windows_NT)
   AOUT=a