8f99feed6b400b329aa5eb37bdb020425782631c
hiram
  Mon May 20 13:36:49 2013 -0700
begin to segregate the utilities into categories all, userApps, cellar refs #9104
diff --git src/utils/makefile src/utils/makefile
index a063c0f..9baed70 100644
--- src/utils/makefile
+++ src/utils/makefile
@@ -1,179 +1,192 @@
 # Build all directories in utils
 
 include ../inc/common.mk
 
+# all: builds all utilities here
+
 all:    
 	@for D in $(USE_DIRS) x; do \
 	  if test "$$D" != "x" ; then \
 	    ( cd $$D && echo $$D && $(MAKE) ) ;\
 	    x=$$? ; if [ $$x -ne 0 ]; then exit $$x ; fi \
 	    fi ;\
 	done
 
+# userApps: builds on user application specific programs
+
+userApps: $(UTILS_APPLIST:%=%.uApp)
+
+%.uApp:
+	( cd $* && echo $* && $(MAKE) )
+
 scripts:
 	@for F in ${SCRIPT_FILES}; do \
 	    chmod +x $$F; \
 	    rm -f ${SCRIPTS}/$${F}; \
 	    echo cp -p $$F ${SCRIPTS}; \
 	    cp -p $$F ${SCRIPTS}; \
 	 done
 	chmod +x genePredToBed/genePredToBed;
 	rm -f ${SCRIPTS}/genePredToBed;
 	echo cp -p genePredToBed/genePredToBed ${SCRIPTS};
 	@cp -p genePredToBed/genePredToBed ${SCRIPTS};
 
 alpha: scripts all
 
 test:
 	cd faToTwoBit && ${MAKE} test
 	cd twoBitToFa && ${MAKE} test
 	cd twoBitInfo && ${MAKE} test
 	cd pslLiftSubrangeBlat && ${MAKE} test
 	cd bedGeneParts && ${MAKE} test
 
 clean:
 	@for D in $(USE_DIRS) x; do \
 	  if test "$$D" != "x" ; then \
 	    ( cd $$D && echo $$D && $(MAKE) clean ) ;\
 	    x=$$? ; if [ $$x -ne 0 ]; then exit $$x ; fi \
 	    fi ;\
 	done
 	touch non-empty-rm.o
 	- find . -name \*.o -print | xargs rm
 
 SCRIPT_FILES = \
         agpToLift \
         bedCollapse.pl \
         iSync \
         lodToBedScore \
 	mkMafFrames.pl
 
 # List of directories to build
-USE_DIRS = $(DIRS)
+USE_DIRS = $(DIRS) $(UTILS_APPLIST) $(UCSC_DIRS)
 
-DIRS = \
-	aNotB \
-	addCols \
-	ave \
-	aveCols \
+UCSC_DIRS = \
+	aNotB
+
+UTILS_APPLIST = \
 	bedClip \
-	bedCommonRegions \
-	bedGeneParts \
 	bedGraphToBigWig \
-	bedPileUps \
-	bedRemoveOverlap \
-	bedRestrictToPositions \
 	bedToBigBed \
-	bigBedInfo \
 	bigBedNamedItems \
 	bigBedSummary \
 	bigBedToBed \
 	bigWigAverageOverBed \
 	bigWigInfo \
 	bigWigMerge \
 	bigWigSummary \
 	bigWigToBedGraph \
 	bigWigToWig \
+	faCount \
+	faFrag \
+	faOneRecord \
+	faPolyASizes \
+	faRandomize \
+	faSize \
+	faSomeRecords \
+	faToNib \
+	faToTwoBit \
+	htmlCheck \
+	nibFrag \
+	nibSize \
+	paraFetch \
+	paraSync \
+	sizeof \
+	stringify \
+	textHistogram \
+	twoBitDup \
+	twoBitInfo \
+	twoBitToFa \
+	wigCorrelate \
+	wigToBigWig
+
+DIRS = \
+	addCols \
+	ave \
+	aveCols \
+	bedCommonRegions \
+	bedGeneParts \
+	bedPileUps \
+	bedRemoveOverlap \
+	bedRestrictToPositions \
 	calc \
 	catDir \
 	catUncomment \
 	ccCp \
 	chopFaLines \
 	colTransform \
 	countChars \
 	convolve \
 	detab \
 	endsInLf \
 	fastqToFa \
 	faAlign \
 	faCmp \
-	faCount \
 	faFilterN \
 	faFilter \
 	faFlyBaseToUcsc \
-	faFrag \
 	faGapLocs \
 	faGapSizes \
 	faNcbiToUcsc \
 	faNoise \
-	faOneRecord \
-	faPolyASizes \
-	faRandomize \
 	faRc \
 	faSimplify \
-	faSize \
-	faSomeRecords \
 	faSplit \
 	faToFastq \
-	faToNib \
 	faToTab \
-	faToTwoBit \
 	faTrans \
 	faTrimPolyA \
 	faTrimRead \
 	findMotif \
 	fixCr \
 	gapSplit \
 	gffPeek \
 	git-reports \
 	gitTools \
 	headRest \
 	htmlPics \
-	htmlCheck \
 	jkUniq \
 	lineCount \
 	newProg \
-	nibFrag \
-	nibSize \
 	nt4Frag \
-	paraFetch \
-	paraSync \
 	pslLiftSubrangeBlat \
 	pslToPslx \
 	pslToXa \
 	randomLines \
 	raSqlQuery \
 	raToTab \
 	raToLines \
 	rmFaDups \
 	rowsToCols \
 	scaffoldFaToAgp \
 	scrambleFa \
-	sizeof \
 	spacedToTab \
 	splitFile \
 	splitFileByColumn \
-	stringify \
 	subChar \
 	subColumn \
 	subs \
 	tableSum \
 	tailLines \
 	textHist2 \
-	textHistogram \
 	tickToDate \
 	timing \
 	toLower \
 	toUpper \
-	twoBitInfo \
-	twoBitToFa \
 	udcCleanup \
 	undupFa \
 	upper \
 	venn \
 	verticalSplitSqlTable \
 	weedLines \
-	wigCorrelate \
-	wigToBigWig \
 	wigTestMaker \
 	wordLine
 
 BAD_DIRS= \
 	ccCpLock \
 	est2genomeToPsl \
 	geneStarts \
 	jimgrep \
 	jkShell \
 	dnsInfo \
 	wigAsciiToBinary \
 	cCp