27dd9648549f079e8f0d4fd00ff3e70cc85e8ac1
hiram
  Fri Apr 19 13:17:42 2013 -0700
it is OK to have the destination binary depend upon the objects, refs #9104
diff --git src/inc/userApp.mk src/inc/userApp.mk
index b528d64..21689cb 100644
--- src/inc/userApp.mk
+++ src/inc/userApp.mk
@@ -1,46 +1,46 @@
 ########################################################################
 # user App rules, typical three-line makefile to use this rule set,
 #   the binary program file name is specified by the 'A' variable:
 #	kentSrc = ../..
 #	A = aveCols
 #	include ${kentSrc}/inc/userApp.mk
 #
 # for more than one object file for the resulting 'A' program, use
 #       extraObjects = second.o third.o fourth.o etc.o
 #
 # to use object files built elsewhere:
 #       externObjects = ../path/other.o
 #
 # use other libraries BEFORE jkweb.a
 #     preMyLibs += path/to/lib/other.a
 #
 include ${kentSrc}/inc/common.mk
 
 MYLIBS = ${preMyLibs} ${kentSrc}/lib/${MACHTYPE}/jkweb.a
 ifeq ($(findstring src/hg/,${CURDIR}),src/hg/)
   MYLIBS = ${preMyLibs} ${kentSrc}/lib/${MACHTYPE}/jkhgap.a ${kentSrc}/lib/${MACHTYPE}/jkweb.a ${MYSQLLIBS} -lm
 endif
 
 O = ${A}.o
 objects = ${O} ${extraObjects} ${externObjects}
 
-all ${A}: ${O} ${extraObjects}
-	${CC} ${COPT} -o ${DESTDIR}${BINDIR}/${A} ${objects} ${MYLIBS} ${L} -lm
+${DESTDIR}${BINDIR}/${A}${EXE}: ${O} ${extraObjects}
+	${CC} ${COPT} -o ${DESTDIR}${BINDIR}/${A}${EXE} ${objects} ${MYLIBS} ${L} -lm
 	${STRIP} ${DESTDIR}${BINDIR}/${A}${EXE}
 
 compile:: ${O} ${extraObjects} ${MYLIBS}
 	${CC} ${COPT} ${CFLAGS} -o ${A}${EXE} ${objects} ${MYLIBS} ${L} -lm
 
 install:: compile
 	rm -f ${DESTDIR}${BINDIR}/${A}${EXE}
 	cp -p ${A}${EXE} ${DESTDIR}${BINDIR}/${A}${EXE}
 	${STRIP} ${A}${EXE} ${DESTDIR}${BINDIR}/${A}${EXE}
 	rm -f ${O} ${A}${EXE}
 
 clean::
 	rm -f ${O} ${extraObjects} ${A}${EXE}
 	@if test -d tests -a -s tests/makefile; then cd tests && ${MAKE} clean; fi
 
 test::
 	@if test -d tests -a -s tests/makefile; then (cd tests && ${MAKE} test); \
 	else echo "# no tests directory in $(CURDIR)"; fi