Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.0.22] - 2024-04-30
### Added
* Add cobj-api command (#370)
* Implement a -Wstrict-typing (#369)
### Miscellaneous
* Simplify generated Java code based on SonarQube analysis (#366)
* Improve the error message for record keys with duplicates (#368)
## [1.0.21] - 2024-03-29
### Added
* Implement a new option `-info-json-dir` (#362)
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-04-30 OSS Consortium <[email protected]>

* opensource COBOL 4J v1.0.22 released.

2024-03-29 OSS Consortium <[email protected]>

* opensource COBOL 4J v1.0.21 released.
Expand Down
11 changes: 11 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ NEWS - user visible changes -*- outline -*-

-----------------------------------------------------------------------

* opensource COBOL 4J 1.0.22

** New Features
(1) Add cobj-api command
(2) Implement `-Wstrict-typing`
** Miscellaneous
(1) Simplify generated Java code based on SonarQube analysis
(2) Improve the error message for record keys with duplicates

-----------------------------------------------------------------------

* opensource COBOL 4J 1.0.21

** New Features
Expand Down
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco

### Install opensource COBOL 4J
```
curl -L -o opensourcecobol4j-v1.0.21.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.21.tar.gz
tar zxvf opensourcecobol4j-v1.0.21.tar.gz
cd opensourcecobol4j-1.0.21
curl -L -o opensourcecobol4j-v1.0.22.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.22.tar.gz
tar zxvf opensourcecobol4j-v1.0.22.tar.gz
cd opensourcecobol4j-1.0.22
./configure --prefix=/usr/
make
sudo make install
Expand All @@ -72,7 +72,7 @@ In order to check installations of older versions,
The docker container for opensource COBOL 4J is available.

```bash
docker pull opensourcecobol/opensourcecobol4j:1.0.21
docker pull opensourcecobol/opensourcecobol4j:1.0.22
```

Execute the following commands in order to run the "Hello World" COBOL program.
Expand Down Expand Up @@ -201,6 +201,23 @@ Options:
-v, --version
Print the version of cobj-idx.
```

## cobj-api
With `cobj-api`, you can easily generate an Spring boot Java file that calls the program generated by `cobj`.

```
Usage: cobj-api [options] <json-file>

Arguments:
<json-file>: a json file generated by cobj with `-info-json-dir` option

Options:
-h, --help Display this message
-java-package=<package name> Specify the package name of the generated source code
-o=<dir>, --output-dir=<dir> Set the output destination of the java file to an arbitrary destination
-v, --version Prints the version of the cobj-api
```

## Contributing

Guidelines for contributing to opensource COBOL 4J can be found in [CONTRIBUTING.md](./CONTRIBUTING.md).
Expand Down
28 changes: 22 additions & 6 deletions README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ opensource COBOL 4J は下記の環境でテストされています.

## インストール

opensource COBOL 4J v1.0.21はUbuntuとAlmaLinuxで動作を確認しています.
opensource COBOL 4J v1.0.22はUbuntuとAlmaLinuxで動作を確認しています.

## 手動インストール

Expand Down Expand Up @@ -57,9 +57,9 @@ dnf install -y java-21-amazon-corretto-devel gcc make bison flex automake autoco
下記のコマンドを実行する

```
curl -L -o opensourcecobol4j-v1.0.21.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.21.tar.gz
tar zxvf opensourcecobol4j-v1.0.21.tar.gz
cd opensourcecobol4j-1.0.21
curl -L -o opensourcecobol4j-v1.0.22.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.22.tar.gz
tar zxvf opensourcecobol4j-v1.0.22.tar.gz
cd opensourcecobol4j-1.0.22
./configure --prefix=/usr/
make
sudo make install
Expand All @@ -73,10 +73,10 @@ sudo make install

## Dockerによるインストール

opensource COBOL 4J v1.0.21をインストールしたDockerイメージを利用できます.
opensource COBOL 4J v1.0.22をインストールしたDockerイメージを利用できます.

```bash
docker pull opensourcecobol/opensourcecobol4j:1.0.21
docker pull opensourcecobol/opensourcecobol4j:1.0.22
```

コンテナ内で下記のコマンドを実行すると、Hello Worldプログラムをコンパイル&実行できる。
Expand Down Expand Up @@ -208,6 +208,22 @@ Options:
Print the version of cobj-idx.
```

## cobj-api
cobj-apiコマンドを使用することで、`cobj`で生成されたプログラムを呼び出すSpring boot向けのJavaファイルを簡単に生成できます。

```
Usage: cobj-api [options] <json-file>

Arguments:
<json-file>: a json file generated by cobj with `-info-json-dir` option

Options:
-h, --help Display this message
-java-package=<package name> Specify the package name of the generated source code
-o=<dir>, --output-dir=<dir> Set the output destination of the java file to an arbitrary destination
-v, --version Prints the version of the cobj-api
```

## コントリビューㇳ

コントリビュータの一覧は https://github.com/opensourcecobol/opensourcecobol4j/graphs/contributors に掲載されています。
Expand Down
26 changes: 13 additions & 13 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for opensource COBOL 4J 1.0.21.
# Generated by GNU Autoconf 2.71 for opensource COBOL 4J 1.0.22.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -620,9 +620,9 @@ MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='opensource COBOL 4J'
PACKAGE_TARNAME='opensource-cobol-4j-1.0.21'
PACKAGE_VERSION='1.0.21'
PACKAGE_STRING='opensource COBOL 4J 1.0.21'
PACKAGE_TARNAME='opensource-cobol-4j-1.0.22'
PACKAGE_VERSION='1.0.22'
PACKAGE_STRING='opensource COBOL 4J 1.0.22'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL=''

Expand Down Expand Up @@ -1411,7 +1411,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures opensource COBOL 4J 1.0.21 to adapt to many kinds of systems.
\`configure' configures opensource COBOL 4J 1.0.22 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1461,7 +1461,7 @@ Fine tuning of the installation directories:
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root
[DATAROOTDIR/doc/opensource-cobol-4j-1.0.21]
[DATAROOTDIR/doc/opensource-cobol-4j-1.0.22]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
Expand All @@ -1483,7 +1483,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of opensource COBOL 4J 1.0.21:";;
short | recursive ) echo "Configuration of opensource COBOL 4J 1.0.22:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1611,7 +1611,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
opensource COBOL 4J configure 1.0.21
opensource COBOL 4J configure 1.0.22
generated by GNU Autoconf 2.71

Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by opensource COBOL 4J $as_me 1.0.21, which was
It was created by opensource COBOL 4J $as_me 1.0.22, which was
generated by GNU Autoconf 2.71. Invocation command line was

$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3397,8 +3397,8 @@ fi


# Define the identity of the package.
PACKAGE='opensource-cobol-4j-1.0.21'
VERSION='1.0.21'
PACKAGE='opensource-cobol-4j-1.0.22'
VERSION='1.0.22'


printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
Expand Down Expand Up @@ -24216,7 +24216,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by opensource COBOL 4J $as_me 1.0.21, which was
This file was extended by opensource COBOL 4J $as_me 1.0.22, which was
generated by GNU Autoconf 2.71. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -24284,7 +24284,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
opensource COBOL 4J config.status 1.0.21
opensource COBOL 4J config.status 1.0.22
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

AC_PREREQ(2.59)

AC_INIT([opensource COBOL 4J],[1.0.21],[[email protected]],[opensource-cobol-4j-1.0.21])
AC_INIT([opensource COBOL 4J],[1.0.22],[[email protected]],[opensource-cobol-4j-1.0.22])
AC_CONFIG_SRCDIR([libcobj.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_TESTDIR([tests])
Expand Down
3 changes: 3 additions & 0 deletions doc/requirements-all.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
| version (opensource COBOL 4J) | OS | version (JDK) |
| -- | -- | -- |
| 1.0.22 | Ubuntu 22.04 | 21 |
| 1.0.22 | AlmaLinux 9 | 11 |
| 1.0.22 | Amazon Linux 2023 | 21 |
| 1.0.21 | Ubuntu 22.04 | 21 |
| 1.0.21 | AlmaLinux 9 | 11 |
| 1.0.21 | Amazon Linux 2023 | 21 |
Expand Down
2 changes: 1 addition & 1 deletion libcobj/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ publishing {
register<MavenPublication>("gpr") {
groupId = "jp.osscons.opensourcecobol"
artifactId = "libcobj"
version = "1.0.21"
version = "1.0.22"
from(components["java"])
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ public class Const {
// TODO 標準パスの設定
public static final String COB_LIBRARY_PATH = "";

public static final String version = "1.0.21";
public static final String version = "1.0.22";
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void getOptions(String[] args) {
System.exit(0);
return;
} else if (cmd.hasOption("v")) {
System.out.println("1.0.21");
System.out.println("1.0.22");
System.exit(0);
return;
} else if (cmd.getOptionValue("java-package") != null) {
Expand All @@ -53,6 +53,10 @@ public static void getOptions(String[] args) {

private static void printHelpMessage() {
System.out.println("Usage: cobj-api [options] <json-file>");
System.out.println();
System.out.println("Arguments:");
System.out.println(" <json-file>: a json file generated by cobj with `-info-json-dir` option");
System.out.println();
System.out.println("Options:");
System.out.println(" -h, --help\t\t\t\tDisplay this message");
System.out.println(
Expand Down
8 changes: 4 additions & 4 deletions tests/command-line-options.src/info-java-dir.at
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ AT_DATA([prog.cbl], [
AT_CHECK([${COBJ} -info-json-dir=./ callee.cbl prog.cbl])
AT_CHECK([cat info_callee.json], [0],
[{
"opensourcecobol4j_version": "1.0.21",
"opensourcecobol4j_version": "1.0.22",
"program_id": "callee",
"procedure_division_using_parameters": @<:@
{
Expand All @@ -45,7 +45,7 @@ AT_CHECK([cat info_callee.json], [0],

AT_CHECK([cat info_prog.json], [0],
[{
"opensourcecobol4j_version": "1.0.21",
"opensourcecobol4j_version": "1.0.22",
"program_id": "prog",
"procedure_division_using_parameters": @<:@
@:>@
Expand All @@ -64,7 +64,7 @@ AT_CHECK([${COBJ} -info-json-dir=bbb callee.cbl prog.cbl])

AT_CHECK([cat bbb/info_callee.json], [0],
[{
"opensourcecobol4j_version": "1.0.21",
"opensourcecobol4j_version": "1.0.22",
"program_id": "callee",
"procedure_division_using_parameters": @<:@
{
Expand All @@ -81,7 +81,7 @@ AT_CHECK([cat bbb/info_callee.json], [0],

AT_CHECK([cat bbb/info_prog.json], [0],
[{
"opensourcecobol4j_version": "1.0.21",
"opensourcecobol4j_version": "1.0.22",
"program_id": "prog",
"procedure_division_using_parameters": @<:@
@:>@
Expand Down
6 changes: 3 additions & 3 deletions tests/package.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Signature of the current package.
m4_define([AT_PACKAGE_NAME], [opensource COBOL 4J])
m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.0.20])
m4_define([AT_PACKAGE_VERSION], [1.0.20])
m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.0.20])
m4_define([AT_PACKAGE_TARNAME], [opensource-cobol-4j-1.0.22])
m4_define([AT_PACKAGE_VERSION], [1.0.22])
m4_define([AT_PACKAGE_STRING], [opensource COBOL 4J 1.0.22])
m4_define([AT_PACKAGE_BUGREPORT], [[email protected]])
1 change: 1 addition & 0 deletions update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ update_versions_in_file README_JP.md
update_versions_in_file libcobj/app/build.gradle.kts
update_versions_in_file libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/Const.java
update_versions_in_file tests/command-line-options.src/info-java-dir.at
update_versions_in_file libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/user_util/cobj_api/ApiFilesOptions.java

# Rebuild
autoreconf
Expand Down