Browse Source

Move the version location

This is in preparation for upcoming commits.
master
Gavin Howard 1 month ago
parent
commit
fd3dee2bb6
Signed by: gavin GPG Key ID: C08038BDF280D33E
  1. 7
      Makefile.in
  2. 41
      include/version.h
  3. 1
      include/vm.h
  4. 4
      release.sh
  5. 1
      src/main.c

7
Makefile.in

@ -29,8 +29,6 @@
#
.POSIX:
VERSION = 3.3.4
SRC = %%SRC%%
OBJ = %%OBJ%%
GCDA = %%GCDA%%
@ -158,7 +156,7 @@ TEST_STARS = "******************************************************************
BC_NUM_KARATSUBA_LEN = %%KARATSUBA_LEN%%
CPPFLAGS1 = -D$(BC_ENABLED_NAME)=$(BC_ENABLED) -D$(DC_ENABLED_NAME)=$(DC_ENABLED)
CPPFLAGS2 = $(CPPFLAGS1) -I./include/ -DVERSION=$(VERSION) %%LONG_BIT_DEFINE%%
CPPFLAGS2 = $(CPPFLAGS1) -I./include/ %%LONG_BIT_DEFINE%%
CPPFLAGS3 = $(CPPFLAGS2) -DEXECPREFIX=$(EXEC_PREFIX) -DMAINEXEC=$(MAIN_EXEC)
CPPFLAGS4 = $(CPPFLAGS3) -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
CPPFLAGS5 = $(CPPFLAGS4) -DBC_NUM_KARATSUBA_LEN=$(BC_NUM_KARATSUBA_LEN)
@ -322,9 +320,6 @@ coverage_output:
coverage:%%COVERAGE_PREREQS%%
version:
@printf '%s' "$(VERSION)"
libcname:
@printf '%s' "$(BC_LIB_C)"

41
include/version.h

@ -0,0 +1,41 @@
/*
* *****************************************************************************
*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2018-2021 Gavin D. Howard and contributors.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *****************************************************************************
*
* Definitions for processing command-line arguments.
*
*/
#ifndef BC_VERSION_H
#define BC_VERSION_H
#define VERSION 3.4.0
#endif // BC_VERSION_H

1
include/vm.h

@ -52,6 +52,7 @@
#endif // BC_ENABLE_NLS
#include <version.h>
#include <status.h>
#include <num.h>
#include <parse.h>

4
release.sh

@ -523,8 +523,6 @@ header "Running math library under --standard"
printf 'quit\n' | bin/bc -ls
version=$(make version)
do_make clean_tests
if [ "$test_with_clang" -ne 0 ]; then
@ -573,7 +571,7 @@ if [ "$run_tests" -ne 0 ]; then
printf '\n'
printf 'Then run the GitHub release script as follows:\n'
printf '\n'
printf ' <github_release> %s release.sh RELEASE.md\\\n' "$version"
printf ' <github_release> <version> release.sh RELEASE.md\\\n'
printf ' tests/afl.py tests/radamsa.sh tests/radamsa.txt tests/randmath.py \\\n'
printf ' tests/fuzzing/ tests/bc/scripts/timeconst.bc\n'

1
src/main.c

@ -42,6 +42,7 @@
#include <setjmp.h>
#include <version.h>
#include <status.h>
#include <vm.h>
#include <bc.h>

Loading…
Cancel
Save