Skip to content

Commit

Permalink
userApps working as before on hgwdev
Browse files Browse the repository at this point in the history
  • Loading branch information
diekhans committed Jan 29, 2025
1 parent 0763964 commit 4d1132f
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 156 deletions.
1 change: 1 addition & 0 deletions src/ameme/makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
kentSrc = ..
A = ameme
extraObjects = fragFind.o
extraHeaders = fragFind.h
include $(kentSrc)/inc/userApp.mk
4 changes: 3 additions & 1 deletion src/hg/makeDb/hgGoldGapGl/makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
kentSrc = ../../..
A = hgLoadGap
A = hgGoldGapGl hgLoadGap
extraHeaders = ntContig.h
extraObjects = ntContig.o
include ${kentSrc}/inc/userApp.mk
22 changes: 6 additions & 16 deletions src/hg/makeDb/hgLoadWiggle/makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
kentSrc = ../../..
A = hgLoadWiggle hgWiggle wigEncode

include ${kentSrc}/inc/userApp.mk
include ${kentSrc}/inc/cgiLoader.mk

perl_progs = fixStepToBedGraph varStepToBedGraph
default:: ${perl_progs:%=%.pl}
default:: ${perl_progs:%=${DESTDIR}${BINDIR}/%.pl}

${DESTDIR}${BINDIR}/%.pl: %.pl
@mkdir -p $(dir $@)
cp -f $< $@

clean::
rm -f test_data/chr1_0.wib test_data/chr1_0.wig test_data/chr1_1.wib \
test_data/chr1_1.wig test_data/chr1_2.wib test_data/chr1_2.wig \
test_data/chr1_begin.ascii test_data/chr1_end.ascii \
test_data/chr1_middle.ascii test_data/chrM.ascii test_data/chrM.wib \
test_data/chrM.wig test_data/wiggle.tab

user_loader_dir = ${CGI_BIN}-${USER}/loader
alpha_loader_dir = ${CGI_BIN}/loader
beta_loader_dir = ${CGI_BIN}-beta/loader

cgi:: ${A:%=${user_loader_dir}/%}

${user_loader_dir}/%: %
@{MKDIR} $(dir $@)
cp -f $< $@

alpha::

52 changes: 1 addition & 51 deletions src/hg/utils/chainToBigChain/makefile
Original file line number Diff line number Diff line change
@@ -1,54 +1,4 @@
COPT=-ggdb
kentSrc = ../../..
A = chainToBigChain
include $(kentSrc)/inc/userApp.mk

cgi:: compile
chmod a+rx $A${EXE}
@if [ ! -d "${CGI_BIN}-${USER}/loader" ]; then \
${MKDIR} ${CGI_BIN}-${USER}/loader; \
fi
rm -f ${CGI_BIN}-${USER}/loader/$A
mv $A${EXE} ${CGI_BIN}-${USER}/loader/$A
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}-${USER}/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}-${USER}/loader/$$B ; \
done

alpha:: strip
@if [ ! -d "${CGI_BIN}/loader" ]; then \
${MKDIR} ${CGI_BIN}/loader; \
fi
rm -f ${CGI_BIN}/loader/$A
mv $A${EXE} ${CGI_BIN}/loader/$A
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}/loader/$$B ; \
done

beta:: strip
@if [ ! -d "${CGI_BIN}-beta/loader" ]; then \
${MKDIR} ${CGI_BIN}-beta/loader; \
fi
rm -f ${CGI_BIN}-beta/loader/$A
mv $A${EXE} ${CGI_BIN}-beta/loader/$A
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}-beta/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}-beta/loader/$$B ; \
done

strip:: compile
${STRIP} $A${EXE}
chmod g+w $A${EXE}
chmod a+rx $A${EXE}

debug:: $O
${CC} $O ${MYLIBS} ${L}
mv ${AOUT} $A${EXE}

clean::
rm -f $O $A${EXE} tests/bed.tab

include ${kentSrc}/inc/cgiLoader.mk
2 changes: 1 addition & 1 deletion src/hg/utils/overlapSelect/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kentSrc = ../../..
A = overlapSelect
extraHeaders = rowReader.h chromAnn.h chromAnnMap.h selectTable.h coordCols.h \
usage.h
usage.h
extraObjects = rowReader.o chromAnn.o chromAnnMap.o selectTable.o coordCols.o
include ${kentSrc}/inc/userApp.mk

Expand Down
27 changes: 6 additions & 21 deletions src/inc/cgiLoader.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,13 @@ cgi:: compile
chmod a+rx ${A:%=%${EXE}}
${MKDIR} ${CGI_BIN}-${USER}/loader; \
mv -f ${A:%=%${EXE}} ${CGI_BIN}-${USER}/loader/
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}-${USER}/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}-${USER}/loader/$$B ; \
done

alpha:: strip
alpha:: compile
${MKDIR} ${CGI_BIN}/loader; \
mv -f ${A:%=%${EXE}} ${CGI_BIN}/loader/
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}/loader/$$B ; \
done
${STRIP} ${A:%=%${EXE}}
cp -f ${A:%=%${EXE}} ${CGI_BIN}/loader/

beta:: strip
beta:: compile
${MKDIR} ${CGI_BIN}-beta/loader; \
mv -f ${A:%=%${EXE}} ${CGI_BIN}-beta/loader/
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}-beta/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}-beta/loader/$$B ; \
done


${STRIP} ${A:%=%${EXE}}
cp -f ${A:%=%${EXE}} ${CGI_BIN}-beta/loader/
14 changes: 13 additions & 1 deletion src/inc/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ CC?=gcc
# allow the somewhat more modern C syntax, e.g. 'for (int i=5; i<10, i++)'
CFLAGS += -std=c99

# This is required to get the cgiLoader.mk compile target to work. for some
# reason, make's %.o: %.c overrides the rule below, cause the compiles to fail
# due to lack of -I flags in rule. Running with make -r to not use built-in
# rules fixes, however MAKEFLAGS += -r doesn't do the trick, this does.
# make is a very mysterious fellow traveler.
GNUMAKEFLAGS += -r

# add additional library paths
L += ${LDFLAGS}

Expand All @@ -25,6 +32,8 @@ HG_INC+=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../i

# to check for Mac OSX Darwin specifics:
UNAME_S := $(shell uname -s)
# to check for differences in Linux OS version
KERNEL_REL := $(shell uname -r)
# to check for builds on hgwdev
HOSTNAME = $(shell uname -n)

Expand Down Expand Up @@ -169,6 +178,10 @@ endif

ifneq ($(UNAME_S),Darwin)
L+=${PTHREADLIB}
ifneq ($(filter 3.%, ${KERNEL_REL}),)
# older linux needed libconv
XXXICONVLIB=-liconv
endif
else
ifeq (${ICONVLIB},)
ICONVLIB=-liconv
Expand Down Expand Up @@ -476,7 +489,6 @@ PIPELINE_PATH=/hive/groups/encode/dcc/pipeline
CONFIG_DIR = ${PIPELINE_PATH}/${PIPELINE_DIR}/config
ENCODEDCC_DIR = ${PIPELINE_PATH}/downloads/encodeDCC


CC_PROG_OPTS = ${COPT} ${CFLAGS} ${HG_DEFS} ${LOWELAB_DEFS} ${HG_WARN} ${HG_INC} ${XINC}
%.o: %.c
${CC} ${CC_PROG_OPTS} -o $@ -c $<
Expand Down
4 changes: 3 additions & 1 deletion src/inc/userApp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ objects = ${extraObjects} ${externObjects}

default:: ${A:%=${DESTDIR}${BINDIR}/%${EXE}}

${DESTDIR}${BINDIR}/%${EXE}: ${DEPLIBS} %.o ${objects}
${extraObjects}: ${extraHeaders}

${DESTDIR}${BINDIR}/%${EXE}: %.o ${objects} ${DEPLIBS}
@mkdir -p $(dir $@)
${CC} ${COPT} -o $@ $*.o ${objects} ${LINKLIBS} ${L}
${STRIP} ${DESTDIR}${BINDIR}/${A}${EXE}
Expand Down
65 changes: 1 addition & 64 deletions src/utils/bedToBigBed/makefile
Original file line number Diff line number Diff line change
@@ -1,66 +1,3 @@
kentSrc = ../..
A = bedToBigBed
include $(kentSrc)/inc/userApp.mk
L += ${SOCKETLIB}

cgi:: compile
chmod a+rx $A${EXE}
@if [ ! -d "${CGI_BIN}-${USER}/loader" ]; then \
${MKDIR} ${CGI_BIN}-${USER}/loader; \
fi
rm -f ${CGI_BIN}-${USER}/loader/$A
mv $A${EXE} ${CGI_BIN}-${USER}/loader/$A
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}-${USER}/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}-${USER}/loader/$$B ; \
done

alpha:: strip
@if [ ! -d "${CGI_BIN}/loader" ]; then \
${MKDIR} ${CGI_BIN}/loader; \
fi
rm -f ${CGI_BIN}/loader/$A
mv $A${EXE} ${CGI_BIN}/loader/$A
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}/loader/$$B ; \
done

beta:: strip
@if [ ! -d "${CGI_BIN}-beta/loader" ]; then \
${MKDIR} ${CGI_BIN}-beta/loader; \
fi
rm -f ${CGI_BIN}-beta/loader/$A
mv $A${EXE} ${CGI_BIN}-beta/loader/$A
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}-beta/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}-beta/loader/$$B ; \
done

strip:: compile
${STRIP} $A${EXE}
chmod g+w $A${EXE}
chmod a+rx $A${EXE}

install:: strip
@if [ ! -d "${DESTDIR}${CGI_BIN}/loader" ]; then \
${MKDIR} "${DESTDIR}${CGI_BIN}/loader"; \
fi
rm -f ${DESTDIR}${CGI_BIN}/loader/$A
mv $A${EXE} ${DESTDIR}${CGI_BIN}/loader/$A
for F in ${SQL_FILES}; do \
B=`basename $$F` ; \
rm -f ${DESTDIR}${CGI_BIN}/loader/$$B ; \
cp -p $$F ${DESTDIR}${CGI_BIN}/loader/$$B ; \
done

debug:: $O
${CC} $O ${MYLIBS} ${L}
mv ${AOUT} $A${EXE}

clean::
rm -f $O $A${EXE} tests/bed.tab

include ${kentSrc}/inc/cgiLoader.mk

0 comments on commit 4d1132f

Please sign in to comment.