Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian bug 807150 #158

Merged
merged 2 commits into from
Dec 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.3
1.4.4
17 changes: 14 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
AC_INIT([gubbins], m4_esyscmd([tr -d '\n' < VERSION]), [aidan@ontologyengineering.org], [$(PACKAGE_NAME)$(AC_PACKAGE_VERSION)], [https://github.com/sanger-pathogens/gubbins])
AC_INIT([gubbins], m4_esyscmd([tr -d '\n' < VERSION]), [gubbins@sanger.ac.uk], [$(PACKAGE_NAME)$(AC_PACKAGE_VERSION)], [https://github.com/sanger-pathogens/gubbins])

AM_INIT_AUTOMAKE([foreign tar-pax])
AM_INIT_AUTOMAKE([foreign tar-pax subdir-objects])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_HEADERS([config.h])

# Add our own macro dir, so we can check for PTHREAD
AC_CONFIG_MACRO_DIR([m4])

AC_CANONICAL_HOST

case $host_os in
*linux*)
HOST_OS=linux
;;
*) ;;
esac
AM_CONDITIONAL([HOST_LINUX],[test x$HOST_OS = xlinux])

AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_CXX
Expand All @@ -16,6 +26,7 @@ AX_PTHREAD

# Ensure zlib is available
PKG_CHECK_MODULES([zlib], [zlib])
AC_CHECK_HEADERS([zlib.h math.h])

# Check for Python
AM_PATH_PYTHON([3.0],
Expand All @@ -28,4 +39,4 @@ AM_PATH_PYTHON([3.0],
AC_CONFIG_FILES([Makefile src/Makefile release/Makefile python/Makefile])
AC_OUTPUT

AC_CHECK_HEADERS([zlib.h math.h])

8 changes: 5 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# ship these headers in the "make dist" target
EXTRA_DIST = Newickform.h alignment_file.h block_tab_file.h string_cat.h branch_sequences.h fasta_of_snp_sites.h gff_file.h gubbins.h kseq.h parse_phylip.h parse_vcf.h phylip_of_snp_sites.h seqUtil.h snp_searching.h snp_sites.h tree_statistics.h tree_scaling.h vcf.h

Expand All @@ -18,7 +17,6 @@ libgubbins_la_LIBADD = -lm
#libPyGubbins_la_CPPFLAGS = $(PYTHON_CPPFLAGS)
#libPyGubbins_la_LIBADD = $(PYTHON_LDFLAGS) -lboost_python libgubbins.la -lz -lm


# "make check" target
TESTS = $(check_PROGRAMS)
check_PROGRAMS = run_all_tests
Expand All @@ -32,4 +30,8 @@ run_all_tests_SOURCES = \
../tests/helper_methods.c \
../tests/run_all_tests.c
run_all_tests_CFLAGS = -I../tests $(PTHREAD_CFLAGS)
run_all_tests_LDADD = -lcheck libgubbins.la -lz -lm $(PTHREAD_LDFLAGS) -lrt
run_all_tests_LDADD = -lcheck libgubbins.la -lz -lm $(PTHREAD_LDFLAGS)

if HOST_LINUX
run_all_tests_LDADD += -lrt
endif
6 changes: 3 additions & 3 deletions tests/helper_methods.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ int compare_files(char expected_output_filename[],char actual_output_filename[]
fseek(expected_output_fh, 0L, SEEK_END);
numbytes = ftell(expected_output_fh);
fseek(expected_output_fh, 0L, SEEK_SET);
expected_buffer = (char*)calloc(numbytes, sizeof(char));
expected_buffer = (char*)calloc(numbytes +1, sizeof(char));
fread(expected_buffer, sizeof(char), numbytes, expected_output_fh);
fclose(expected_output_fh);

fseek(actual_output_fh, 0L, SEEK_END);
numbytes = ftell(actual_output_fh);
fseek(actual_output_fh, 0L, SEEK_SET);
actual_buffer = (char*)calloc(numbytes, sizeof(char));
actual_buffer = (char*)calloc(numbytes +1, sizeof(char));
fread(actual_buffer, sizeof(char), numbytes, actual_output_fh);
fclose(actual_output_fh);

Expand Down Expand Up @@ -137,4 +137,4 @@ int cp(const char *to, const char *from)

errno = saved_errno;
return -1;
}
}