Skip to content

Commit e4e802c

Browse files
committed
revert to previous meryl version
1 parent b42b151 commit e4e802c

111 files changed

Lines changed: 2960 additions & 6530 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ext/meryl/.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/utility"]
2+
path = src/utility
3+
url = https://github.com/marbl/meryl-utility

ext/meryl/scripts/buildRelease.sh

Lines changed: 0 additions & 147 deletions
This file was deleted.

ext/meryl/scripts/version_update.pl

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
my $label = "snapshot"; # If not 'release' print this in the version output.
4141
my $major = "1"; # Bump before release.
42-
my $minor = "2"; # Bump before release.
42+
my $minor = "0"; # Bump before release.
4343

4444
my $branch = "master";
4545
my $version = "v$major.$minor";
@@ -87,12 +87,7 @@
8787

8888
$version = "v$major.$minor";
8989
} else {
90-
$major = "0";
91-
$minor = "0";
92-
$commits = "0";
93-
$hash1 = $_;
94-
95-
$version = "v$major.$minor";
90+
die "Failed to parse describe string '$_'.\n";
9691
}
9792
}
9893
close(F);
@@ -168,12 +163,14 @@
168163
# Report what we found. This is really for the gmake output.
169164

170165
if (defined($commits)) {
171-
print "\$(info Building $label $version +$commits changes (r$revCount $hash1) ($dirty))\n";
166+
print STDERR "Building $label $version +$commits changes (r$revCount $hash1) ($dirty)\n";
172167
foreach my $s (@submodules) {
173-
print "\$(info \$(space) $s)\n";
168+
print STDERR " $s\n";
174169
}
170+
print STDERR "\n";
175171
} else {
176-
print "\$(info Building $label $version)\n";
172+
print STDERR "Building $label $version\n";
173+
print STDERR "\n";
177174
}
178175

179176
# Dump a new file, but don't overwrite the original.
243 KB
Binary file not shown.

ext/meryl/src/Makefile

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,7 @@
2727
# instances of "$" within them need to be escaped with a second "$" to
2828
# accomodate the double expansion that occurs when eval is invoked.
2929

30-
# Before doing ANYTHING, initialize submodules...if the version of
31-
# git is compatible.
32-
gitv := $(shell git --version | cut -d\ -f 3 | cut -c 1)
33-
ifeq (1, $(gitv))
34-
gitv := $(shell git --version | cut -d\ -f 3)
35-
$(error git '$(shell which git)' version '$(gitv)' too old; at least version 2.12 is required)
36-
endif
37-
30+
# Before doing ANYTHING, initialize submodules.
3831
ifeq ($(wildcard utility/src/Makefile), )
3932
$(info $(shell git submodule update --init utility))
4033
$(info $(space))
@@ -350,9 +343,8 @@ DIR_STACK :=
350343
INCDIRS :=
351344
TGT_STACK :=
352345

353-
# Discover our OS and architecture. These were previously used to set
354-
# BUILD_DIR and TARGET_DIR to allow multi-platform builds. DESTDIR will do
355-
# that for us too.
346+
# Discover our OS and architecture. These are used to set the BUILD_DIR and TARGET_DIR to
347+
# something more useful than 'build' and '.'.
356348

357349
OSTYPE := $(shell echo `uname`)
358350
OSVERSION := $(shell echo `uname -r`)
@@ -377,18 +369,6 @@ ifeq (${OSTYPE}, SunOS)
377369
endif
378370
endif
379371

380-
# Set paths for building and installing. If DESTDIR doesn't exist, use the
381-
# directory just above us.
382-
383-
ifeq "$(strip ${DESTDIR})" ""
384-
BUILD_DIR := $(realpath ..)/build/obj
385-
TARGET_DIR := $(realpath ..)/build
386-
else
387-
BUILD_DIR := $(DESTDIR)/canu/build/obj
388-
TARGET_DIR := $(DESTDIR)/canu/build
389-
endif
390-
391-
#
392372
# Set compiler and flags based on discovered hardware
393373
#
394374
# By default, debug symbols are included in all builds (even optimized).
@@ -405,6 +385,7 @@ endif
405385
# BUILDJEMALLOC will enable jemalloc library support.
406386
#
407387

388+
408389
ifeq ($(origin CXXFLAGS), undefined)
409390
ifeq ($(BUILDOPTIMIZED), 1)
410391
else
@@ -456,27 +437,44 @@ endif
456437
# So, we require gcc7 (from MacPorts) or gcc8 (from hommebrew).
457438
#
458439
# If from MacPorts:
459-
# port install gcc9
460-
# port select gcc mp-gcc9
440+
# port install gcc7
441+
# port select gcc mp-gcc7
461442
#
462443
# If CC is set to 'cc', the GNU make default, we'll automagically search for other
463-
# versions and use those if found.
444+
# versions and use those if found, preferring gcc7 over gcc8.
464445
#
446+
# There' definitely a clever way to do this with 'foreach', but my Make is lacking.
447+
#
448+
ifeq (${OSTYPE}, Darwin)
449+
ifeq ($(CC), cc)
450+
CC7 := $(shell echo `which gcc-mp-7`)
451+
CXX7 := $(shell echo `which g++-mp-7`)
465452

466-
define TEST_COMPILER
467-
ifeq ($${CC}, cc)
468-
CCTEST := $$(shell echo `which gcc-${1}`)
469-
CXXTEST := $$(shell echo `which g++-${1}`)
453+
ifdef CXX7
454+
CC := $(CC7)
455+
CXX := $(CXX7)
456+
endif
457+
endif
458+
459+
ifeq ($(CC), cc)
460+
CC8 := $(shell echo `which gcc-7`)
461+
CXX8 := $(shell echo `which g++-7`)
470462

471-
ifdef CXXTEST
472-
CC := $${CCTEST}
473-
CXX := $${CXXTEST}
463+
ifdef CXX8
464+
CC := $(CC8)
465+
CXX := $(CXX8)
474466
endif
475467
endif
476-
endef
477468

478-
ifeq (${OSTYPE}, Darwin)
479-
$(foreach suffix,mp-9 9 mp-8 8 mp-7 7,$(eval $(call TEST_COMPILER,${suffix})))
469+
ifeq ($(CC), cc)
470+
CC8 := $(shell echo `which gcc-8`)
471+
CXX8 := $(shell echo `which g++-8`)
472+
473+
ifdef CXX8
474+
CC := $(CC8)
475+
CXX := $(CXX8)
476+
endif
477+
endif
480478

481479
ifneq ($(shell echo `$(CXX) --version 2>&1 | grep -c clang`), 0)
482480
CPATH := $(shell echo `which $(CXX)`)
@@ -516,12 +514,9 @@ ifeq (${CANU_BUILD_ENV}, ports)
516514

517515
else
518516

519-
# Ignore the gmake default 'c++' and force g++9.
520-
ifeq ($(origin CXX), default)
521-
CC = gcc9
522-
CXX = g++9
523-
CCLIB = -rpath /usr/local/lib/gcc9
524-
endif
517+
CC ?= gcc6
518+
CXX ?= g++6
519+
CCLIB ?= -rpath /usr/local/lib/gcc6
525520

526521
# GCC
527522
CXXFLAGS += -I/usr/local/include -pthread -fopenmp -fPIC
@@ -688,11 +683,11 @@ $(foreach TGT,${ALL_TGTS},\
688683
# Makefile processed. Regenerate the version number file, make some
689684
# directories, and report that we're starting the build.
690685
691-
$(eval $(shell ../scripts/version_update.pl meryl utility/src/utility/version.H))
686+
$(shell ../scripts/version_update.pl meryl utility/src/utility/version.H)
692687
693688
$(shell mkdir -p ${TARGET_DIR}/bin)
694689
695-
$(info For '${OSTYPE}' '${OSVERSION}' as '${MACHINETYPE}' into '${TARGET_DIR}/{bin,obj}'.)
690+
$(info For '${OSTYPE}' '${OSVERSION}' as '${MACHINETYPE}' into '${DESTDIR}${PREFIX}/$(OSTYPE)-$(MACHINETYPE)/{bin,obj}'.)
696691
$(info Using '$(shell which ${CXX})' version '${GXX_VV}'.)
697692
ifneq ($(origin CXXFLAGSUSER), undefined)
698693
$(info Using user-supplied CXXFLAGS '${CXXFLAGSUSER}'.)

ext/meryl/src/main.mk

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
1-
MODULE := meryl
1+
2+
# If 'make' isn't run from the root directory, we need to set these to
3+
# point to the upper level build directory.
4+
5+
ifeq "$(strip ${DESTDIR})" ""
6+
DESTDIR :=
7+
endif
8+
9+
ifeq "$(strip ${PREFIX})" ""
10+
ifeq "$(strip ${DESTDIR})" ""
11+
PREFIX := $(realpath ..)
12+
else
13+
PREFIX := /meryl
14+
endif
15+
endif
16+
17+
ifeq "$(strip ${BUILD_DIR})" ""
18+
BUILD_DIR := $(DESTDIR)$(PREFIX)/$(OSTYPE)-$(MACHINETYPE)/obj
19+
endif
20+
21+
ifeq "$(strip ${TARGET_DIR})" ""
22+
TARGET_DIR := $(DESTDIR)$(PREFIX)/$(OSTYPE)-$(MACHINETYPE)
23+
endif
24+
225
TARGET := libmeryl.a
26+
327
SOURCES := utility/src/utility/edlib.C \
428
\
529
utility/src/utility/files.C \
@@ -28,11 +52,11 @@ SOURCES := utility/src/utility/edlib.C \
2852
utility/src/utility/kmers.C \
2953
\
3054
utility/src/utility/bits.C \
31-
utility/src/utility/bits-wordArray.C \
3255
\
3356
utility/src/utility/hexDump.C \
3457
utility/src/utility/md5.C \
3558
utility/src/utility/mt19937ar.C \
59+
utility/src/utility/objectStore.C \
3660
utility/src/utility/speedCounter.C \
3761
utility/src/utility/sweatShop.C \
3862
\
@@ -59,12 +83,11 @@ SRC_INCDIRS := . \
5983
utility
6084

6185
SUBMAKEFILES := meryl/meryl.mk \
62-
meryl-analyze/meryl-analyze.mk \
6386
meryl-simple/meryl-simple.mk \
6487
meryl-import/meryl-import.mk \
65-
meryl-lookup/meryl-lookup.mk
88+
meryl-lookup/meryl-lookup.mk \
89+
meryl-check/meryl-check.mk
6690

6791
ifeq ($(BUILDTESTS), 1)
68-
SUBMAKEFILES += tests/merylCountArrayTest.mk \
69-
tests/merylExactLookupTest.mk
92+
SUBMAKEFILES += tests/merylCountArrayTest.mk
7093
endif

0 commit comments

Comments
 (0)