Skip to content

Commit

Permalink
follow-up to "moving out version definitions to own header" r4775
Browse files Browse the repository at this point in the history
libversion.h as libcob/version.h

libcob:
* Makefile.am: distribution of version.h

build_windows:
* makedist.cmd: cater for new header files
  • Loading branch information
sf-mensch committed Oct 16, 2022
1 parent 25d0c52 commit 6af1384
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion build_windows/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
* added statement.def to all cobc and libcob projects,
new libversion.h to libcob
* version_cobc, version_cobcrun, version_libcob: use simple
libversion.h instead of full common.h, preventing
version.h instead of full common.h, preventing
resource compilers to stumble over C definitions
* makedist.cmd: cater for new header files

2022-10-01 Simon Sobisch <[email protected]>

Expand Down
5 changes: 4 additions & 1 deletion build_windows/makedist.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:: Copyright (C) 2014-2021 Free Software Foundation, Inc.
:: Copyright (C) 2014-2022 Free Software Foundation, Inc.
:: Written by Simon Sobisch, Edward Hart
::
:: This file is part of GnuCOBOL.
Expand Down Expand Up @@ -134,7 +134,10 @@ mkdir include
mkdir include\libcob
copy "%cob_source_path%libcob.h" include\ 1>nul
copy "%cob_source_path%libcob\common.h" include\libcob\ 1>nul
copy "%cob_source_path%libcob\version.h" include\libcob\ 1>nul
copy "%cob_source_path%libcob\cobgetopt.h" include\libcob\ 1>nul
copy "%cob_source_path%libcob\exception*.def" include\libcob\ 1>nul
copy "%cob_source_path%libcob\statement.def" include\libcob\ 1>nul

echo Copying translations...
mkdir po
Expand Down
4 changes: 2 additions & 2 deletions build_windows/version_cobc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include "tarstamp.h"
#include "config.h"

#include "../libcob/libversion.h"
#define VCS_REF 4775
#include "../libcob/version.h"
#define VCS_REF 4776

#define STRINGIZE_DETAIL_(v) #v
#define STRINGIZE(v) STRINGIZE_DETAIL_(v)
Expand Down
4 changes: 2 additions & 2 deletions build_windows/version_cobcrun.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include "tarstamp.h"
#include "config.h"

#include "../libcob/libversion.h"
#define VCS_REF 4775
#include "../libcob/version.h"
#define VCS_REF 4776

#define STRINGIZE_DETAIL_(v) #v
#define STRINGIZE(v) STRINGIZE_DETAIL_(v)
Expand Down
4 changes: 2 additions & 2 deletions build_windows/version_libcob.rc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include "tarstamp.h"
#include "config.h"

#include "../libcob/libversion.h"
#define VCS_REF 4775
#include "../libcob/version.h"
#define VCS_REF 4776

#define STRINGIZE_DETAIL_(v) #v
#define STRINGIZE(v) STRINGIZE_DETAIL_(v)
Expand Down
3 changes: 2 additions & 1 deletion libcob/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

2022-10-15 Simon Sobisch <[email protected]>

* libversion.h: nre file, moving out version definitions from common.h
* version.h, Makefile.am: new file, moving out version
definitions from common.h
* common.h: drop COB_WITHOUT_EXCEPTIONS, which was added only for
resource compilers, which should now include libversion.h
* common.c (cob_runtime_warning_external, cob_runtime_warning):
Expand Down
3 changes: 2 additions & 1 deletion libcob/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ AM_LDFLAGS = $(COB_FIX_LIB)

EXTRA_DIST = coblocal.h system.def
pkgincludedir = $(includedir)/libcob
pkginclude_HEADERS = common.h cobgetopt.h exception.def exception-io.def statement.def
pkginclude_HEADERS = common.h version.h cobgetopt.h \
exception.def exception-io.def statement.def

# Add rules for code-coverage testing, as provided by AX_CODE_COVERAGE
include $(top_srcdir)/aminclude_static.am
Expand Down
4 changes: 1 addition & 3 deletions libcob/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ struct cobjmp_buf {
#endif

/* version definition and related functions from common.c */
#include "libversion.h" /* located and installed next to common.h */
#include "version.h" /* located and installed next to common.h */

/*******************************/

Expand All @@ -1609,8 +1609,6 @@ COB_EXPIMP const char* cob_get_sig_name (int);
COB_EXPIMP const char* cob_get_sig_description (int);
COB_EXPIMP void print_info (void);
COB_EXPIMP void print_info_detailed (const int);
COB_EXPIMP void print_version (void);
COB_EXPIMP void print_version_summary (void);
COB_EXPIMP int cob_load_config (void);
COB_EXPIMP void print_runtime_conf (void);

Expand Down
3 changes: 3 additions & 0 deletions libcob/libversion.h → libcob/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@
COB_EXPIMP const char *libcob_version (void);
COB_EXPIMP int set_libcob_version (int *, int *, int *);

COB_EXPIMP void print_version (void);
COB_EXPIMP void print_version_summary (void);

#endif

0 comments on commit 6af1384

Please sign in to comment.