From 5fb51bd0f26c5a61c3b26bd4092459e96c6286f8 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Tue, 28 Apr 2009 12:28:50 +0000 Subject: [PATCH] fixed various issues about the GNU building scripts --- Makefile.am | 38 ------------------------ autogen.sh | 34 ---------------------- cleanup.sh | 8 ------ configure.ac | 75 +----------------------------------------------- misc/Makefile.am | 39 +++++++++++++++++++++++++ 5 files changed, 40 insertions(+), 154 deletions(-) create mode 100644 misc/Makefile.am diff --git a/Makefile.am b/Makefile.am index e2304f7..2f22f3b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,42 +15,4 @@ samtools_LDADD = -lm -lz -lcurses razip_SOURCES = razip.c razf.c razip_LDADD = -lm -lz -dist_bin_SCRIPTS = bowtie2sam.pl export2sam.pl novo2sam.pl samtools.pl soap2sam.pl wgsim_eval.pl zoom2sam.pl -bin_PROGRAMS = faidx maq2sam-short maq2sam-long md5fa md5sum-lite wgsim -faidx_SOURCES = ../faidx.c ../faidx.c -#faidx_LDFLAGS = -D_NO_RAZF -DFAIDX_MAIN - -md5fa_SOURCES = md5.c md5.h md5fa.c ../kseq.h -#md5fa_LDADD = -lz - -md5sum_lite_SOURCES = md5.c md5.h -#md5sum_lite_LDFLAGS = -DMD5SUM_MAIN - -maq2sam_short_SOURCES = maq2sam.c -#maq2sam_short_LDADD = -lz - -maq2sam_long_SOURCES = maq2sam.c -#maq2sam_long_LDADD = -lz - -wgsim_SOURCES = wgsim.c -wgsim_LDADD = -lm - -faidx:../faidx.c ../faidx.h - $(CC) $(CFLAGS) -D_NO_RAZF -DFAIDX_MAIN -o $@ ../faidx.c -md5fa:md5.o md5fa.o md5.h ../kseq.h - $(CC) $(CFLAGS) -o $@ md5.o md5fa.o -lz -md5fa.o:md5.h md5fa.c - $(CC) $(CFLAGS) -c -I.. -o $@ md5fa.c -md5sum-lite:md5sum-lite.o - $(CC) $(CFLAGS) -o $@ md5sum-lite.o -md5sum-lite.o:md5.c md5.h - $(CC) -c $(CFLAGS) -DMD5SUM_MAIN -o $@ md5.c -maq2sam-short:maq2sam-short.o - $(CC) $(CFLAGS) -o $@ maq2sam-short.o -lz -maq2sam-short.o:maq2sam.c - $(CC) -c $(CFLAGS) -o $@ maq2sam.c -maq2sam-long:maq2sam-long.o - $(CC) $(CFLAGS) -o $@ maq2sam-long.o -lz -maq2sam-long.o:maq2sam.c - $(CC) -c $(CFLAGS) -DMAQ_LONGREADS -D_MAQ_LONGREADS -o $@ maq2sam.c diff --git a/autogen.sh b/autogen.sh index 99f0a5f..117462c 100644 --- a/autogen.sh +++ b/autogen.sh @@ -15,37 +15,3 @@ run aclocal run autoheader run automake -a run autoconf -#!/bin/sh - -run () -{ - echo "running: $*" - eval $* - - if test $? != 0 ; then - echo "error: while running '$*'" - exit 1 - fi -} - -run aclocal -run autoheader -run automake -a -run autoconf -#!/bin/sh - -run () -{ - echo "running: $*" - eval $* - - if test $? != 0 ; then - echo "error: while running '$*'" - exit 1 - fi -} - -run aclocal -run autoheader -run automake -a -run autoconf diff --git a/cleanup.sh b/cleanup.sh index 96381e6..899479e 100644 --- a/cleanup.sh +++ b/cleanup.sh @@ -2,11 +2,3 @@ if [ -f "Makefile" ]; then make distclean fi rm -fr *~ .in .gdb_history Makefile.in aclocal.m4 configure autom4*.cache config.guess config.h.in config.sub depcomp install-sh missing mkinstalldirs -if [ -f "Makefile" ]; then - make distclean -fi -rm -fr *~ .in .gdb_history Makefile.in aclocal.m4 configure autom4*.cache config.guess config.h.in config.sub depcomp install-sh missing mkinstalldirs -if [ -f "Makefile" ]; then - make distclean -fi -rm -fr *~ .in .gdb_history Makefile.in aclocal.m4 configure autom4*.cache config.guess config.h.in config.sub depcomp install-sh missing mkinstalldirs diff --git a/configure.ac b/configure.ac index 7bd8696..d8d25e1 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,6 @@ AC_CANONICAL_HOST AC_PROG_INSTALL AC_PROG_CC -AC_PROG_CXX # set CFLAGS and CXXFLAGS user_CFLAGS="${CFLAGS} -D_IOLIB=2 -D_FILE_OFFSET_BITS=64" @@ -33,76 +32,4 @@ AC_HEADER_STDBOOL AC_TYPE_OFF_T AC_TYPE_SIZE_T -AC_OUTPUT([Makefile misc/Makefile]) -AC_INIT(SAMTOOLS, 0.1.3) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE([no-dependencies]) -AC_CANONICAL_HOST - -AC_PROG_INSTALL - -AC_PROG_CC -AC_PROG_CXX - -# set CFLAGS and CXXFLAGS -user_CFLAGS="${CFLAGS} -D_IOLIB=2 -D_FILE_OFFSET_BITS=64" -generic_CFLAGS="-Wall -L." - -AC_ARG_ENABLE(norazf, [ --disable-razf disable razf support], - [user_DFLAGS="${user_DFLAGS} -D_NO_RAZF"], []) -AC_ARG_ENABLE(nocurses, [ --disable-curses disable curses support], - [user_DFLAGS="${user_DFLAGS} -D_NO_CURSES"], []) -CFLAGS="${generic_CFLAGS} ${user_CFLAGS}" -CXXFLAGS=$CFLAGS - -AC_STDC_HEADERS -AC_CHECK_FUNCS([bzero memset pow sqrt strcasecmp strdup strstr strtol]) -AC_CHECK_HEADERS([zlib.h fcntl.h malloc.h stddef.h]) -AC_CHECK_TYPES([ptrdiff_t]) -AC_C_CONST -AC_C_INLINE -AC_FUNC_FSEEKO -AC_FUNC_MALLOC -AC_FUNC_MEMCMP -AC_FUNC_REALLOC -AC_HEADER_STDBOOL -AC_TYPE_OFF_T -AC_TYPE_SIZE_T - -AC_OUTPUT([Makefile misc/Makefile]) -AC_INIT(SAMTOOLS, 0.1.3) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE([no-dependencies]) -AC_CANONICAL_HOST - -AC_PROG_INSTALL - -AC_PROG_CC -AC_PROG_CXX - -# set CFLAGS and CXXFLAGS -user_CFLAGS="${CFLAGS} -D_IOLIB=2 -D_FILE_OFFSET_BITS=64" -generic_CFLAGS="-Wall -L." - -AC_ARG_ENABLE(norazf, [ --disable-razf disable razf support], - [user_DFLAGS="${user_DFLAGS} -D_NO_RAZF"], []) -AC_ARG_ENABLE(nocurses, [ --disable-curses disable curses support], - [user_DFLAGS="${user_DFLAGS} -D_NO_CURSES"], []) -CFLAGS="${generic_CFLAGS} ${user_CFLAGS}" -CXXFLAGS=$CFLAGS - -AC_STDC_HEADERS -AC_CHECK_FUNCS([bzero memset pow sqrt strcasecmp strdup strstr strtol]) -AC_CHECK_HEADERS([zlib.h fcntl.h malloc.h stddef.h]) -AC_CHECK_TYPES([ptrdiff_t]) -AC_C_CONST -AC_C_INLINE -AC_FUNC_FSEEKO -AC_FUNC_MALLOC -AC_FUNC_MEMCMP -AC_FUNC_REALLOC -AC_HEADER_STDBOOL -AC_TYPE_OFF_T -AC_TYPE_SIZE_T - -AC_OUTPUT([Makefile misc/Makefile]) +AC_OUTPUT([Makefile misc/Makefile]) \ No newline at end of file diff --git a/misc/Makefile.am b/misc/Makefile.am new file mode 100644 index 0000000..6caaf63 --- /dev/null +++ b/misc/Makefile.am @@ -0,0 +1,39 @@ +dist_bin_SCRIPTS = bowtie2sam.pl export2sam.pl novo2sam.pl samtools.pl soap2sam.pl wgsim_eval.pl zoom2sam.pl +bin_PROGRAMS = faidx maq2sam-short maq2sam-long md5fa md5sum-lite wgsim + +faidx_SOURCES = ../faidx.c ../faidx.c +#faidx_LDFLAGS = -D_NO_RAZF -DFAIDX_MAIN + +md5fa_SOURCES = md5.c md5.h md5fa.c ../kseq.h +#md5fa_LDADD = -lz + +md5sum_lite_SOURCES = md5.c md5.h +#md5sum_lite_LDFLAGS = -DMD5SUM_MAIN + +maq2sam_short_SOURCES = maq2sam.c +#maq2sam_short_LDADD = -lz + +maq2sam_long_SOURCES = maq2sam.c +#maq2sam_long_LDADD = -lz + +wgsim_SOURCES = wgsim.c +wgsim_LDADD = -lm + +faidx:../faidx.c ../faidx.h + $(CC) $(CFLAGS) -D_NO_RAZF -DFAIDX_MAIN -o $@ ../faidx.c +md5fa:md5.o md5fa.o md5.h ../kseq.h + $(CC) $(CFLAGS) -o $@ md5.o md5fa.o -lz +md5fa.o:md5.h md5fa.c + $(CC) $(CFLAGS) -c -I.. -o $@ md5fa.c +md5sum-lite:md5sum-lite.o + $(CC) $(CFLAGS) -o $@ md5sum-lite.o +md5sum-lite.o:md5.c md5.h + $(CC) -c $(CFLAGS) -DMD5SUM_MAIN -o $@ md5.c +maq2sam-short:maq2sam-short.o + $(CC) $(CFLAGS) -o $@ maq2sam-short.o -lz +maq2sam-short.o:maq2sam.c + $(CC) -c $(CFLAGS) -o $@ maq2sam.c +maq2sam-long:maq2sam-long.o + $(CC) $(CFLAGS) -o $@ maq2sam-long.o -lz +maq2sam-long.o:maq2sam.c + $(CC) -c $(CFLAGS) -DMAQ_LONGREADS -D_MAQ_LONGREADS -o $@ maq2sam.c -- 2.39.5