Skip to content
Snippets Groups Projects
Commit 69741274 authored by rdubner's avatar rdubner
Browse files

WIP: Refinements to release_build process

parent d9a8569b
No related branches found
No related tags found
No related merge requests found
......@@ -264,10 +264,10 @@ cobol.start.encap: gcobol$(exeext)
cobol.rest.encap:
cobol.install-common: installdirs
$(INSTALL_PROGRAM) gcobol$(exeext) \
$(DESTDIR)$(bindir)/$(gcobol_INSTALL_NAME)$(exeext)
$(INSTALL_PROGRAM) gcobol$(exeext) $(DESTDIR)$(bindir)/$(gcobol_INSTALL_NAME)$(exeext)
$(INSTALL) -m 755 $(srcdir)/cobol/gcobc $(DESTDIR)$(bindir)/
$(INSTALL_DATA) $(srcdir)/cobol/udf/* $(udfdir)/
mkdir -p $(DESTDIR)$(bindir)/udf/
$(INSTALL_DATA) $(srcdir)/cobol/udf/* $(DESTDIR)$(datadir)/cobol/udf
cobol.install-man: installdirs
$(INSTALL_DATA) $(srcdir)/cobol/gcobol.1 $(DESTDIR)$(man1dir)/
......
File deleted
#!/bin/sh
arch=$(arch)
test "$arch"
if [ $arch = x86_64 ]
then
arch_options='--with-abi=m64 --with-tune=generic --enable-default-pie'
fi
# We start in <repo>/gcc/cobol/scripts
cd ${0%/*}/../../..
# Switch back to the repository:
cd $( git rev-parse --show-toplevel)
mkdir -p build
cd build
rm -fr *
......@@ -18,9 +13,6 @@ rm -fr *
--disable-multilib \
$END
# --libdir=/usr/local/gcobol/LIBDIR \
# --libexecdir=/usr/local/gcobol/LIBEXECDIR \
make -j $(ncomp)
make -j $(nproc)
#!/bin/sh
set -e
set -x
set +x
# We want a relevant version code:
if test -z "$(which git || true)"
then
# Without git, we want *something*
COMMIT_VERSION=-rel-000000
else
# git exists
MD5_HASH=-$(git log --abbrev-commit --abbrev=6 | head -n1 | head -n1 | sed 's/commit //')
# And we'll use the GIT date of the repo as a final pseudo-build number
# as a version tiebreaker.
GITDATE=$(git show --date=iso-strict | grep Date | head -n1 | sed 's/.*\([0-9]\{4\}\)[-]\([0-9]\{2\}\)[-]\([0-9]\{2\}\).*/\1\2\3/')
# As of this writing, we are building on Ubuntu 22.04 and 24.04 systems:
COMMIT_VERSION=-dev-$MD5_HASH
fi
RELEASE_ID=-$(cat /etc/os-release | grep "^ID=" | sed 's/ID=\(.*\).*$/\1/g' | sed 's/ubuntu/ubu/g')
RELEASE_VERSION_ID=$(cat /etc/os-release | grep "^VERSION_ID=\"" | sed 's/^VERSION_ID="\([0-9]\+\)[.].*$/\1/g')
if [ "$1" = "commit-release" ]
then
pwd
commit_md5=$(git log -1 --abbrev-commit | awk '/^commit/ { print $2}')
COMMIT_VERSION=-dev-$commit_md5
# We want to know exactly where various files go for the purposes of
# creating the distribution package
ULIBDIR=--libdir=/usr/lib/gcobol
ULIBEXECDIR=--libexecdir=/usr/libexec/gcobol
shift
else
COMMIT_VERSION=-dev-000000000
fi
#
# Process flow: Invoke this routine when it is time to compile the current
# branch, starting with a full configure.
#
# These prerequisites suffice for a compilation on Ubuntu 20.04 The various
# These prerequisites suffice for a compilation on Ubuntu 20.04 through 24.04 The various
# tests avoid attempting to re-install packages, which can be annoying when the
# user doesn't have complete sudo permissions.
if test -z "$(which g++ || true)"; then sudo apt -y install g++; fi
......@@ -30,14 +42,10 @@ if test -z "$(which make || true)"; then sudo apt -y install make; fi
if test -z "$(which bison || true)"; then sudo apt -y install bison; fi
if test -z "$(which flex || true)"; then sudo apt -y install flex; fi
VERSION=$(cat ${0%/*}/../../../gcc/BASE-VER)
MAJOR_VERSION=$(echo $VERSION | sed 's/^\([0-9]\+\)[.].*$/\1/')
test "$VERSION"
PKGVERSION="GCOBOL ${VERSION}${COMMIT_VERSION}"
# Set up for a build, using the presumptive directory tree that we've been using
# for development.
DOTTED_VERSION=$(cat ${0%/*}/../../../gcc/BASE-VER)
MAJOR_VERSION=$(echo $DOTTED_VERSION | sed 's/^\([0-9]\+\)[.].*$/\1/')
PKGVERSION="GCOBOL-$MAJOR_VERSION.$GITDATE$MD5_HASH$SYSTEM$RELEASE_ID$RELEASE_VERSION_ID"
PKGVERSION="GCOBOL-$DOTTED_VERSION.$GITDATE$MD5_HASH$SYSTEM$RELEASE_ID$RELEASE_VERSION_ID"
arch=$(arch)
......@@ -57,40 +65,41 @@ mkdir -p $BUILDDIR
cd $BUILDDIR
rm -fr *
../configure \
--with-pkgversion="$PKGVERSION" \
--enable-languages=c,c++,cobol \
--prefix=/usr \
--libdir=/usr/lib/gcobol \
--libexecdir=/usr/libexec/gcobol \
--with-gcc-major-version-only \
--program-suffix=-$MAJOR_VERSION \
--enable-shared \
--enable-linker-build-id \
--without-included-gettext \
--enable-threads=posix \
--disable-bootstrap \
--enable-clocale=gnu \
--enable-libstdcxx-debug \
--enable-libstdcxx-time=yes \
--with-default-libstdcxx-abi=new \
--enable-gnu-unique-object \
--disable-vtable-verify \
--enable-plugin \
--with-system-zlib \
--with-target-system-zlib=auto \
--disable-werror \
--disable-cet \
$arch_options \
--disable-multilib \
--without-cuda-driver \
--enable-checking=release \
--build=${arch}-linux-gnu \
--host=${arch}-linux-gnu \
--target=${arch}-linux-gnu \
--with-build-config=bootstrap-lto-lean \
../configure \
--with-pkgversion="$PKGVERSION" \
--enable-languages=c,c++,cobol \
--prefix=/usr \
$ULIBDIR \
$ULIBEXECDIR \
--with-gcc-major-version-only \
--program-suffix=-$MAJOR_VERSION \
--enable-shared \
--enable-linker-build-id \
--without-included-gettext \
--enable-threads=posix \
--disable-bootstrap \
--enable-clocale=gnu \
--enable-libstdcxx-debug \
--enable-libstdcxx-time=yes \
--with-default-libstdcxx-abi=new \
--enable-gnu-unique-object \
--disable-vtable-verify \
--enable-plugin \
--with-system-zlib \
--with-target-system-zlib=auto \
--disable-werror \
--disable-cet \
$arch_options \
--disable-multilib \
--without-cuda-driver \
--enable-checking=release \
--build=${arch}-linux-gnu \
--host=${arch}-linux-gnu \
--target=${arch}-linux-gnu \
--with-build-config=bootstrap-lto-lean \
--enable-link-mutex --without-isl
if [ "$1" ]
then
make $@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment