Skip to content

Commit

Permalink
revert to previous meryl version
Browse files Browse the repository at this point in the history
  • Loading branch information
cjain7 committed Apr 3, 2021
1 parent b42b151 commit e4e802c
Show file tree
Hide file tree
Showing 111 changed files with 2,960 additions and 6,530 deletions.
3 changes: 3 additions & 0 deletions ext/meryl/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/utility"]
path = src/utility
url = https://github.com/marbl/meryl-utility
147 changes: 0 additions & 147 deletions ext/meryl/scripts/buildRelease.sh

This file was deleted.

17 changes: 7 additions & 10 deletions ext/meryl/scripts/version_update.pl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

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

my $branch = "master";
my $version = "v$major.$minor";
Expand Down Expand Up @@ -87,12 +87,7 @@

$version = "v$major.$minor";
} else {
$major = "0";
$minor = "0";
$commits = "0";
$hash1 = $_;

$version = "v$major.$minor";
die "Failed to parse describe string '$_'.\n";
}
}
close(F);
Expand Down Expand Up @@ -168,12 +163,14 @@
# Report what we found. This is really for the gmake output.

if (defined($commits)) {
print "\$(info Building $label $version +$commits changes (r$revCount $hash1) ($dirty))\n";
print STDERR "Building $label $version +$commits changes (r$revCount $hash1) ($dirty)\n";
foreach my $s (@submodules) {
print "\$(info \$(space) $s)\n";
print STDERR " $s\n";
}
print STDERR "\n";
} else {
print "\$(info Building $label $version)\n";
print STDERR "Building $label $version\n";
print STDERR "\n";
}

# Dump a new file, but don't overwrite the original.
Expand Down
Binary file not shown.
83 changes: 39 additions & 44 deletions ext/meryl/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@
# instances of "$" within them need to be escaped with a second "$" to
# accomodate the double expansion that occurs when eval is invoked.

# Before doing ANYTHING, initialize submodules...if the version of
# git is compatible.
gitv := $(shell git --version | cut -d\ -f 3 | cut -c 1)
ifeq (1, $(gitv))
gitv := $(shell git --version | cut -d\ -f 3)
$(error git '$(shell which git)' version '$(gitv)' too old; at least version 2.12 is required)
endif

# Before doing ANYTHING, initialize submodules.
ifeq ($(wildcard utility/src/Makefile), )
$(info $(shell git submodule update --init utility))
$(info $(space))
Expand Down Expand Up @@ -350,9 +343,8 @@ DIR_STACK :=
INCDIRS :=
TGT_STACK :=

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

OSTYPE := $(shell echo `uname`)
OSVERSION := $(shell echo `uname -r`)
Expand All @@ -377,18 +369,6 @@ ifeq (${OSTYPE}, SunOS)
endif
endif

# Set paths for building and installing. If DESTDIR doesn't exist, use the
# directory just above us.

ifeq "$(strip ${DESTDIR})" ""
BUILD_DIR := $(realpath ..)/build/obj
TARGET_DIR := $(realpath ..)/build
else
BUILD_DIR := $(DESTDIR)/canu/build/obj
TARGET_DIR := $(DESTDIR)/canu/build
endif

#
# Set compiler and flags based on discovered hardware
#
# By default, debug symbols are included in all builds (even optimized).
Expand All @@ -405,6 +385,7 @@ endif
# BUILDJEMALLOC will enable jemalloc library support.
#


ifeq ($(origin CXXFLAGS), undefined)
ifeq ($(BUILDOPTIMIZED), 1)
else
Expand Down Expand Up @@ -456,27 +437,44 @@ endif
# So, we require gcc7 (from MacPorts) or gcc8 (from hommebrew).
#
# If from MacPorts:
# port install gcc9
# port select gcc mp-gcc9
# port install gcc7
# port select gcc mp-gcc7
#
# If CC is set to 'cc', the GNU make default, we'll automagically search for other
# versions and use those if found.
# versions and use those if found, preferring gcc7 over gcc8.
#
# There' definitely a clever way to do this with 'foreach', but my Make is lacking.
#
ifeq (${OSTYPE}, Darwin)
ifeq ($(CC), cc)
CC7 := $(shell echo `which gcc-mp-7`)
CXX7 := $(shell echo `which g++-mp-7`)

define TEST_COMPILER
ifeq ($${CC}, cc)
CCTEST := $$(shell echo `which gcc-${1}`)
CXXTEST := $$(shell echo `which g++-${1}`)
ifdef CXX7
CC := $(CC7)
CXX := $(CXX7)
endif
endif

ifeq ($(CC), cc)
CC8 := $(shell echo `which gcc-7`)
CXX8 := $(shell echo `which g++-7`)

ifdef CXXTEST
CC := $${CCTEST}
CXX := $${CXXTEST}
ifdef CXX8
CC := $(CC8)
CXX := $(CXX8)
endif
endif
endef

ifeq (${OSTYPE}, Darwin)
$(foreach suffix,mp-9 9 mp-8 8 mp-7 7,$(eval $(call TEST_COMPILER,${suffix})))
ifeq ($(CC), cc)
CC8 := $(shell echo `which gcc-8`)
CXX8 := $(shell echo `which g++-8`)

ifdef CXX8
CC := $(CC8)
CXX := $(CXX8)
endif
endif

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

else

# Ignore the gmake default 'c++' and force g++9.
ifeq ($(origin CXX), default)
CC = gcc9
CXX = g++9
CCLIB = -rpath /usr/local/lib/gcc9
endif
CC ?= gcc6
CXX ?= g++6
CCLIB ?= -rpath /usr/local/lib/gcc6

# GCC
CXXFLAGS += -I/usr/local/include -pthread -fopenmp -fPIC
Expand Down Expand Up @@ -688,11 +683,11 @@ $(foreach TGT,${ALL_TGTS},\
# Makefile processed. Regenerate the version number file, make some
# directories, and report that we're starting the build.
$(eval $(shell ../scripts/version_update.pl meryl utility/src/utility/version.H))
$(shell ../scripts/version_update.pl meryl utility/src/utility/version.H)
$(shell mkdir -p ${TARGET_DIR}/bin)
$(info For '${OSTYPE}' '${OSVERSION}' as '${MACHINETYPE}' into '${TARGET_DIR}/{bin,obj}'.)
$(info For '${OSTYPE}' '${OSVERSION}' as '${MACHINETYPE}' into '${DESTDIR}${PREFIX}/$(OSTYPE)-$(MACHINETYPE)/{bin,obj}'.)
$(info Using '$(shell which ${CXX})' version '${GXX_VV}'.)
ifneq ($(origin CXXFLAGSUSER), undefined)
$(info Using user-supplied CXXFLAGS '${CXXFLAGSUSER}'.)
Expand Down
35 changes: 29 additions & 6 deletions ext/meryl/src/main.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
MODULE := meryl

# If 'make' isn't run from the root directory, we need to set these to
# point to the upper level build directory.

ifeq "$(strip ${DESTDIR})" ""
DESTDIR :=
endif

ifeq "$(strip ${PREFIX})" ""
ifeq "$(strip ${DESTDIR})" ""
PREFIX := $(realpath ..)
else
PREFIX := /meryl
endif
endif

ifeq "$(strip ${BUILD_DIR})" ""
BUILD_DIR := $(DESTDIR)$(PREFIX)/$(OSTYPE)-$(MACHINETYPE)/obj
endif

ifeq "$(strip ${TARGET_DIR})" ""
TARGET_DIR := $(DESTDIR)$(PREFIX)/$(OSTYPE)-$(MACHINETYPE)
endif

TARGET := libmeryl.a

SOURCES := utility/src/utility/edlib.C \
\
utility/src/utility/files.C \
Expand Down Expand Up @@ -28,11 +52,11 @@ SOURCES := utility/src/utility/edlib.C \
utility/src/utility/kmers.C \
\
utility/src/utility/bits.C \
utility/src/utility/bits-wordArray.C \
\
utility/src/utility/hexDump.C \
utility/src/utility/md5.C \
utility/src/utility/mt19937ar.C \
utility/src/utility/objectStore.C \
utility/src/utility/speedCounter.C \
utility/src/utility/sweatShop.C \
\
Expand All @@ -59,12 +83,11 @@ SRC_INCDIRS := . \
utility

SUBMAKEFILES := meryl/meryl.mk \
meryl-analyze/meryl-analyze.mk \
meryl-simple/meryl-simple.mk \
meryl-import/meryl-import.mk \
meryl-lookup/meryl-lookup.mk
meryl-lookup/meryl-lookup.mk \
meryl-check/meryl-check.mk

ifeq ($(BUILDTESTS), 1)
SUBMAKEFILES += tests/merylCountArrayTest.mk \
tests/merylExactLookupTest.mk
SUBMAKEFILES += tests/merylCountArrayTest.mk
endif
Loading

0 comments on commit e4e802c

Please sign in to comment.