Skip to content

Commit

Permalink
VDB-3035 Created a single toolkit version file and removed used of pe…
Browse files Browse the repository at this point in the history
…r-tool versions
  • Loading branch information
a-nikitiuk committed Jun 28, 2016
1 parent fb109b3 commit a33888c
Show file tree
Hide file tree
Showing 264 changed files with 355 additions and 1,370 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ include $(TOP)/build/Makefile.shell
# default
#
SUBDIRS = \
shared \
tools \

# common targets for non-leaf Makefiles; must follow a definition of SUBDIRS
Expand Down
85 changes: 85 additions & 0 deletions shared/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# ===========================================================================
#
# PUBLIC DOMAIN NOTICE
# National Center for Biotechnology Information
#
# This software/database is a "United States Government Work" under the
# terms of the United States Copyright Act. It was written as part of
# the author's official duties as a United States Government employee and
# thus cannot be copyrighted. This software/database is freely available
# to the public for use. The National Library of Medicine and the U.S.
# Government have not placed any restriction on its use or reproduction.
#
# Although all reasonable efforts have been taken to ensure the accuracy
# and reliability of the software and data, the NLM and the U.S.
# Government do not and cannot warrant the performance or results that
# may be obtained by using this software or data. The NLM and the U.S.
# Government disclaim all warranties, express or implied, including
# warranties of performance, merchantability or fitness for any particular
# purpose.
#
# Please cite the author in any work or product based on this material.
#
# ===========================================================================


default: std

TOP ?= $(abspath ..)

MODULE = shared

INT_LIBS = \
libtk-version \

ALL_LIBS = \
$(INT_LIBS)

ALL_TOOLS = \
$(INT_TOOLS) \
$(EXT_TOOLS)

include $(TOP)/build/Makefile.env

#-------------------------------------------------------------------------------
# outer targets
#
all std: makedirs
@ $(MAKE_CMD) $(TARGDIR)/std

$(INT_LIBS): makedirs
@ $(MAKE_CMD) $(ILIBDIR)/$@


.PHONY: all std $(ALL_LIBS)

#-------------------------------------------------------------------------------
# std
#
$(TARGDIR)/std: \
$(addprefix $(ILIBDIR)/,$(INT_LIBS))

.PHONY: $(TARGDIR)/std

#-------------------------------------------------------------------------------
# clean
#
clean: stdclean

.PHONY: clean

#-------------------------------------------------------------------------------
# toolkit-version
#
$(ILIBDIR)/libtk-version: $(addprefix $(ILIBDIR)/libtk-version.,$(ILIBEXT))

TK_VERSION_SRC = \
toolkit.vers

TK_VERSION_OBJ = \
$(addsuffix .$(LOBX),$(TK_VERSION_SRC))

$(ILIBDIR)/libtk-version.$(LIBX): $(TK_VERSION_OBJ)
$(LD) --slib -o $@ $^ $(KFS_LIB)


File renamed without changes.
8 changes: 8 additions & 0 deletions shared/toolkit.vers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "toolkit.vers.h"

#include <kapp/main.h>

ver_t CC KAppVersion()
{
return TOOLKIT_VERS;
}
1 change: 1 addition & 0 deletions shared/toolkit.vers.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define TOOLKIT_VERS 0x02060003
14 changes: 4 additions & 10 deletions tools/align-cache/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ ALL_TOOLS = \
#-------------------------------------------------------------------------------
# outer targets
#
all std: vers-includes
all std: makedirs
@ $(MAKE_CMD) $(TARGDIR)/std

$(ALL_TOOLS): vers-includes
$(ALL_TOOLS): makedirs
@ $(MAKE_CMD) $(BINDIR)/$@

.PHONY: all std $(ALL_TOOLS)
Expand All @@ -58,13 +58,6 @@ $(TARGDIR)/std: \

.PHONY: $(TARGDIR)/std

#-------------------------------------------------------------------------------
# vers-includes
#
$(TARGDIR)/vers-includes: $(addsuffix .vers.h,$(EXT_TOOLS))

.PHONY: $(TARGDIR)/vers-includes

#-------------------------------------------------------------------------------
# clean
#
Expand All @@ -84,9 +77,10 @@ ALIGN_CACHE_OBJ = \

ALIGN_CACHE_LIB = \
-skapp \
-stk-version \
-sncbi-wvdb \
-sm \
-sload

$(BINDIR)/align-cache: $(ALIGN_CACHE_OBJ)
$(LP) --exe --vers $(SRCDIR) -o $@ $^ $(ALIGN_CACHE_LIB)
$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(ALIGN_CACHE_LIB)
5 changes: 0 additions & 5 deletions tools/align-cache/align-cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
*
*/

#include "align-cache.vers.h"
#include "helper.h"

#include <stdio.h>
Expand Down Expand Up @@ -498,10 +497,6 @@ namespace AlignCache
extern "C"
{
const char UsageDefaultName[] = "align-cache";
ver_t CC KAppVersion()
{
return ALIGN_CACHE_VERS;
}
rc_t CC UsageSummary (const char * progname)
{
printf (
Expand Down
1 change: 0 additions & 1 deletion tools/align-cache/align-cache.vers

This file was deleted.

1 change: 0 additions & 1 deletion tools/align-cache/align-cache.vers.h

This file was deleted.

14 changes: 4 additions & 10 deletions tools/align-info/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ ALL_TOOLS = \
#-------------------------------------------------------------------------------
# outer targets
#
all std: vers-includes
all std: makedirs
@ $(MAKE_CMD) $(TARGDIR)/std

$(ALL_TOOLS): vers-includes
$(ALL_TOOLS): makedirs
@ $(MAKE_CMD) $(BINDIR)/$@

.PHONY: all std $(ALL_TOOLS)
Expand All @@ -58,13 +58,6 @@ $(TARGDIR)/std: \

.PHONY: $(TARGDIR)/std

#-------------------------------------------------------------------------------
# vers-includes
#
$(TARGDIR)/vers-includes: $(addsuffix .vers.h,$(EXT_TOOLS))

.PHONY: $(TARGDIR)/vers-includes

#-------------------------------------------------------------------------------
# clean
#
Expand All @@ -83,8 +76,9 @@ ALIGN_INFO_OBJ = \

ALIGN_INFO_LIB = \
-lkapp \
-stk-version \
-sncbi-vdb \
-lm

$(BINDIR)/align-info: $(ALIGN_INFO_OBJ)
$(LD) --exe --vers $(SRCDIR) -o $@ $^ $(ALIGN_INFO_LIB)
$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(ALIGN_INFO_LIB)
4 changes: 0 additions & 4 deletions tools/align-info/align-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*
*/

#include "align-info.vers.h"

#include <sra/sraschema.h> /* VDBManagerMakeSRASchema */

#include <vdb/manager.h> /* VDBManager */
Expand Down Expand Up @@ -150,8 +148,6 @@ rc_t CC Usage(const Args* args) {

const char UsageDefaultName[] = "align-info";

ver_t CC KAppVersion(void) { return ALIGN_INFO_VERS; }

static rc_t bam_header(const VDatabase* db) {
rc_t rc = 0;
const char path[] = "BAM_HEADER";
Expand Down
1 change: 0 additions & 1 deletion tools/align-info/align-info.vers.h

This file was deleted.

17 changes: 6 additions & 11 deletions tools/bam-loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ ifeq (win,$(OS))
all std:
@ echo "not building bam-load under Windows"
else
all std: vers-includes
all std: makedirs
@ $(MAKE_CMD) $(TARGDIR)/std
endif

$(ALL_TOOLS): vers-includes
$(ALL_TOOLS): makedirs
@ $(MAKE_CMD) $(BINDIR)/$@

.PHONY: all std $(ALL_TOOLS)
Expand All @@ -64,13 +64,6 @@ $(TARGDIR)/std: \

.PHONY: $(TARGDIR)/std

#-------------------------------------------------------------------------------
# vers-includes
#
$(TARGDIR)/vers-includes: $(addsuffix .vers.h,$(EXT_TOOLS))

.PHONY: $(TARGDIR)/vers-includes

#-------------------------------------------------------------------------------
# clean
#
Expand All @@ -96,12 +89,13 @@ BAMLOAD_OBJ = \

BAMLOAD_LIB = \
-lkapp \
-stk-version \
-lload \
-sncbi-wvdb \
-lm

$(BINDIR)/bam-load: $(BAMLOAD_OBJ)
$(LP) --exe --vers $(SRCDIR) -o $@ $^ $(BAMLOAD_LIB)
$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(BAMLOAD_LIB)


#-------------------------------------------------------------------------------
Expand All @@ -116,9 +110,10 @@ SAMVIEW_OBJ = \

SAMVIEW_LIB = \
-lkapp \
-stk-version \
-sncbi-vdb \
-lm

$(BINDIR)/samview: $(SAMVIEW_OBJ)
$(LP) --exe --vers $(SRCDIR) -o $@ $^ $(SAMVIEW_LIB)
$(LP) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(SAMVIEW_LIB)

1 change: 0 additions & 1 deletion tools/bam-loader/bam-load.vers

This file was deleted.

7 changes: 0 additions & 7 deletions tools/bam-loader/bam-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*
*/

#include "bam-load.vers.h"

#include <kapp/main.h>
#include <kapp/args.h>
#include <klib/text.h>
Expand Down Expand Up @@ -559,11 +557,6 @@ rc_t CC Usage (const Args * args)

Globals G;

uint32_t CC KAppVersion (void)
{
return BAM_LOAD_VERS;
}

#ifdef _WIN32
#include <process.h>
#else
Expand Down
5 changes: 0 additions & 5 deletions tools/bam-loader/samview.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ rc_t CC Usage(Args const *args)
return 0;
}

ver_t CC KAppVersion(void)
{
return 0;
}

rc_t CC KMain(int argc, char *argv[])
{
if (argc == 1) {
Expand Down
1 change: 0 additions & 1 deletion tools/bam-loader/samview.vers

This file was deleted.

14 changes: 4 additions & 10 deletions tools/cache-mgr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ ALL_TOOLS = \
#-------------------------------------------------------------------------------
# outer targets
#
all std: vers-includes
all std: makedirs
@ $(MAKE_CMD) $(TARGDIR)/$@

$(ALL_TOOLS): vers-includes
$(ALL_TOOLS): makedirs
@ $(MAKE_CMD) $(BINDIR)/$@

.PHONY: all std $(ALL_TOOLS)
Expand All @@ -66,13 +66,6 @@ $(TARGDIR)/std: \

.PHONY: $(TARGDIR)/std

#-------------------------------------------------------------------------------
# vers-includes
#
$(TARGDIR)/vers-includes: $(addsuffix .vers.h,$(EXT_TOOLS))

.PHONY: $(TARGDIR)/vers-includes

#-------------------------------------------------------------------------------
# clean
#
Expand All @@ -91,9 +84,10 @@ TOOL_OBJ = \

TOOL_LIB = \
-lkapp \
-stk-version \
-sncbi-vdb \
-lm

$(BINDIR)/cache-mgr: $(TOOL_OBJ)
$(LD) --exe --vers $(SRCDIR) -o $@ $^ $(TOOL_LIB)
$(LD) --exe --vers $(SRCDIR)/../../shared/toolkit.vers -o $@ $^ $(TOOL_LIB)

15 changes: 0 additions & 15 deletions tools/cache-mgr/cache-mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*
*/

#include "cache-mgr.vers.h"

#include <kapp/main.h>
#include <kapp/args.h>

Expand Down Expand Up @@ -175,19 +173,6 @@ rc_t CC Usage ( const Args * args )
return rc;
}


/* Version EXTERN
* return 4-part version code: 0xMMmmrrrr, where
* MM = major release
* mm = minor release
* rrrr = bug-fix release
*/
ver_t CC KAppVersion ( void )
{
return CACHE_MGR_VERS;
}


typedef enum tool_main_function
{
tf_report,
Expand Down
1 change: 0 additions & 1 deletion tools/cache-mgr/cache-mgr.vers

This file was deleted.

1 change: 0 additions & 1 deletion tools/cache-mgr/cache-mgr.vers.h

This file was deleted.

Loading

0 comments on commit a33888c

Please sign in to comment.