src/utils/bedClip/makefile 1.3

1.3 2009/10/15 19:36:00 hiram
Properly create the destination directory before making a binary there
Index: src/utils/bedClip/makefile
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/bedClip/makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -b -B -U 1000000 -r1.2 -r1.3
--- src/utils/bedClip/makefile	22 Sep 2009 20:01:27 -0000	1.2
+++ src/utils/bedClip/makefile	15 Oct 2009 19:36:00 -0000	1.3
@@ -1,18 +1,20 @@
 include ../../inc/common.mk
 
 L += -lm
 MYLIBDIR = ../../lib/${MACHTYPE}
 MYLIBS = ${MYLIBDIR}/jkweb.a
 
 A = bedClip
 O = bedClip.o
+B = ${DESTDIR}${BINDIR}/${A}${EXE}
 
 bedClip: ${O} ${MYLIBS}
-	${CC} ${COPT} -o ${DESTDIR}${BINDIR}/${A}${EXE} $O ${MYLIBS} $L
-	${STRIP} ${DESTDIR}${BINDIR}/${A}${EXE}
+	@${MKDIR} `dirname $B`
+	${CC} ${COPT} -o ${B} $O ${MYLIBS} $L
+	${STRIP} ${B}
 
 compile:: ${O}
 	${CC} ${COPT} -o ${A}${EXE} ${O} ${MYLIBS} $L
 
 clean::
 	rm -f ${A} ${O}