eed6b3f36a8c1f8095592f35abe979f82656b2ed
angie
  Thu Apr 20 10:32:35 2017 -0700
Adding vai.pl to SCRIPTS and to a new var, USER_APP_SCRIPTS, and new target %.userAppScript that installs the script in ${DESTDIR}${BINDIR} so userApps does not require the scripts directory to be added to user's PATH, per discussion with Hiram.  refs #12216

diff --git src/hg/utils/makefile src/hg/utils/makefile
index 1cb7da3..73a967e 100644
--- src/hg/utils/makefile
+++ src/hg/utils/makefile
@@ -37,35 +37,39 @@
 	gtfToGenePred \
 	hubCheck \
 	hubPublicCheck \
 	mafToBigMaf \
 	makeTableList \
 	oligoMatch \
 	overlapSelect \
 	positionalTblCheck \
 	pslToBigPsl \
 	pslMap \
 	pslMapPostChain \
 	tdbQuery \
 	transMapPslToGenePred \
 	twoBitMask
 
+USER_APP_SCRIPTS = \
+	vai.pl
+
 SCRIPT_FILES = \
 	dbNsfpToBed.pl \
 	dumpDb.pl \
 	mergeOverlapBed4.pl \
-	mergeSortedBed3Plus.pl
+	mergeSortedBed3Plus.pl \
+	${USER_APP_SCRIPTS}
 
 # List of directories to build of interest only at UCSC
 DIRS = ${buildRefresh} \
 	automation \
 	buildReleaseLog \
 	checkUrlsInTable \
 	geoMirrorNode \
 	makeTrackIndex \
 	mysqlSecurityCheck \
 	pslUniq \
 	refSeqGet \
 	safePush \
 	toDev64 \
 	wigBedToStep
 
@@ -78,33 +82,37 @@
 	hubCheck \
 	overlapSelect \
 	pslMap \
 	pslToBigPsl \
 	refSeqGet \
 	transMapPslToGenePred
 
 APPS = $(DIRS) $(UTILS_APPLIST)
 
 all:: utils
 
 utils: $(APPS:%=%.utils)
 %.utils:
 	cd $* && echo $* && $(MAKE)
 
-userApps: $(UTILS_APPLIST:%=%.userApp)
+userApps: $(UTILS_APPLIST:%=%.userApp) $(USER_APP_SCRIPTS:%=%.userAppScript)
 %.userApp:
 	cd $* && echo $* && $(MAKE)
+%.userAppScript:
+	chmod +x $*
+	rm -f ${DESTDIR}${BINDIR}/$*
+	cp -p $* ${DESTDIR}${BINDIR}/$*
 
 scripts: $(SCRIPT_FILES:%=%.scripts)
 %.scripts:
 	chmod +x $*
 	rm -f ${SCRIPTS}/$*
 	cp -p $* ${SCRIPTS}/$*
 
 alpha: scripts all
 
 test::	${TEST_DIRS:%=%.test}
 %.test:
 	(cd $* && ${MAKE} test)
 
 clean:: $(APPS:%=%.clean)
 	- find . -name '*.o' -exec rm {} \;