diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..d45fb603f --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,59 @@ +name: MacOS Workflow + +on: + pull_request: + branches: + - master + - gcos + push: + branches: + - master + - gcos + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + + runs-on: ${{ matrix.os }} + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Set git user + run: | + git config --global user.name github-actions + git config --global user.email github-actions-bot@users.noreply.github.com + + - run: | + brew install automake libtool help2man texinfo bison + echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH + echo "/usr/local/opt/texinfo/bin" >> $GITHUB_PATH + + - name: ./build_aux/bootstrap + run: | + cd build_aux + ./bootstrap + + - run: | + mkdir _build + + - name: configure + run: | + cd _build + ../configure --enable-cobc-internal-checks --enable-debug --prefix /opt/cobol/gnucobol-gcos --exec-prefix /opt/cobol/gnucobol-gcos + + - name: make + run: | + cd _build + make + + - name: install + run: | + cd _build + sudo make install + diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 000000000..06f5628d9 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,61 @@ +name: Ubuntu Workflow + +on: + pull_request: + branches: + - master + - gcos + push: + branches: + - master + - gcos + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest +# - macos-latest + + include: + - os: ubuntu-latest + skip_test: true + + + runs-on: ${{ matrix.os }} + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Set git user + run: | + git config --global user.name github-actions + git config --global user.email github-actions-bot@users.noreply.github.com + + - run: | + sudo apt-get install libdb5.3-dev help2man + + - run: | + ./build_aux/bootstrap + + - run: | + mkdir _build + + - name: configure + run: | + cd _build + ../configure --enable-cobc-internal-checks --enable-debug --prefix /opt/cobol/gnucobol-gcos --exec-prefix /opt/cobol/gnucobol-gcos + + - name: make + run: | + cd _build + make + + - name: install + run: | + cd _build + make install + diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..05939fa9d --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,62 @@ +name: Windows Workflow + +on: + pull_request: + branches: + - master + - gcos + push: + branches: + - master + - gcos + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - windows-latest + + runs-on: ${{ matrix.os }} + + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Set git user + run: | + git config --global user.name github-actions + git config --global user.email github-actions-bot@users.noreply.github.com + + - uses: msys2/setup-msys2@v2 + with: + update: true + install: autoconf automake libtool make mingw-w64-x86_64-db mingw-w64-x86_64-gmp libdb-devel mingw-w64-x86_64-gcc flex bison gmp-devel help2man texinfo + + - run: | + ./build_aux/bootstrap + shell: msys2 {0} + + - run: | + mkdir _build + shell: msys2 {0} + + - name: configure + run: | + cd _build + ../configure --enable-cobc-internal-checks --enable-debug --prefix /opt/cobol/gnucobol-gcos --exec-prefix /opt/cobol/gnucobol-gcos + shell: msys2 {0} + + - name: make + run: | + cd _build + make + shell: msys2 {0} + + - name: install + run: | + cd _build + make install + shell: msys2 {0} + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..a2fa2e9b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +Makefile.in +/_build +aclocal.m4 +aminclude_static.am +autom4te.cache +config.h.in +/configure +/doc/gnucobol.info +/doc/stamp-vti +/doc/version.texi +/tarstamp.h +*~ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..cd8e2acad --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +build: + stage: build + image: registry.ocamlpro.com/ocamlpro/ocaml-docker-images:4.12 + before_script: + - sudo apk add --upgrade --no-cache make patch gcc curl coreutils musl-dev opam git gmp-dev pkgconf libressl-dev emacs cmake g++ boost boost-dev boost-static autoconf automake libtool help2man texinfo bison make gcc db-dev flex gawk bash + script: + - ./build_aux/bootstrap + - mkdir _build + - cd _build + - ../configure --enable-cobc-internal-checks --enable-debug --prefix /opt/cobol/gnucobol-gcos --exec-prefix /opt/cobol/gnucobol-gcos + - make + - sudo make install + diff --git a/build_aux/ar-lib b/build_aux/ar-lib deleted file mode 120000 index be8806a2f..000000000 --- a/build_aux/ar-lib +++ /dev/null @@ -1,271 +0,0 @@ -#! /bin/sh -# Wrapper for Microsoft lib.exe - -me=ar-lib -scriptversion=2019-07-04.01; # UTC - -# Copyright (C) 2010-2019 Free Software Foundation, Inc. -# Written by Peter Rosin . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - - -# func_error message -func_error () -{ - echo "$me: $1" 1>&2 - exit 1 -} - -file_conv= - -# func_file_conv build_file -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN* | MSYS*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv in - mingw) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin | msys) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_at_file at_file operation archive -# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE -# for each of them. -# When interpreting the content of the @FILE, do NOT use func_file_conv, -# since the user would need to supply preconverted file names to -# binutils ar, at least for MinGW. -func_at_file () -{ - operation=$2 - archive=$3 - at_file_contents=`cat "$1"` - eval set x "$at_file_contents" - shift - - for member - do - $AR -NOLOGO $operation:"$member" "$archive" || exit $? - done -} - -case $1 in - '') - func_error "no command. Try '$0 --help' for more information." - ;; - -h | --h*) - cat <. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv in + mingw) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin | msys) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat <