Skip to content

Commit

Permalink
Makefile.am: targets to create binary distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
sf-mensch committed Mar 11, 2022
1 parent e53dd3a commit 2f81ec8
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 7 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

2022-03-11 Simon Sobisch <[email protected]>

* Makefile.am: targets to create binary distributions

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

* general: revert change 2019-06-05 - all header files that are included
Expand Down
44 changes: 42 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Makefile gnucobol
#
# Copyright (C) 2003-2012, 2014-2020 Free Software Foundation, Inc.
# Copyright (C) 2003-2012, 2014-2020, 2022 Free Software Foundation, Inc.
# Written by Keisuke Nishida, Roger While, Simon Sobisch
#
# This file is part of GnuCOBOL.
Expand Down Expand Up @@ -100,6 +100,45 @@ distmingwdir: all $(top_srcdir)/build_aux/create_mingw_bindist.sh
distwin: distwindir
distmingw: distmingwdir

distbindir = $(distdir)_bin
distbindir: all distdir
$(MAKE) $(AM_MAKEFLAGS) DESTDIR=$(abs_builddir)/$(distbindir) install
install -d "$(distbindir)/${datarootdir}/licenses/$(PACKAGE)"
install -p -m644 $(distdir)/COPYING* "$(distbindir)/${datarootdir}/licenses/$(PACKAGE)"
install -d "$(distbindir)/${datarootdir}/doc/$(PACKAGE)"
install -p -m644 $(distdir)/README* "$(distbindir)/${datarootdir}/doc/$(PACKAGE)"
install -p -m644 $(distdir)/NEWS* "$(distbindir)/${datarootdir}/doc/$(PACKAGE)"
install -p -m644 $(distdir)/ChangeLog "$(distbindir)/${datarootdir}/doc/$(PACKAGE)"
install -p -m644 $(distdir)/bin/ChangeLog "$(distbindir)/${datarootdir}/doc/$(PACKAGE)/ChangeLog_bin"
install -p -m644 $(distdir)/cobc/ChangeLog "$(distbindir)/${datarootdir}/doc/$(PACKAGE)/ChangeLog_cobc"
install -p -m644 $(distdir)/libcob/ChangeLog "$(distbindir)/${datarootdir}/doc/$(PACKAGE)/ChangeLog_libcob"
install -p -m644 $(distdir)/doc/gnucobol*.pdf "$(distbindir)/${datarootdir}/doc/$(PACKAGE)"

DISTBIN_TARGETS = distbin-gzip
gc__remove_bindistdir = rm -rf $(distbindir)
gc__post_remove_bindistdir = $(gc__remove_bindistdir)
distbin-gzip: distbindir
tardir=$(distbindir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distbindir).tar.gz
$(gc__post_remove_bindistdir)
$(am__post_remove_distdir)
distbin-bzip2: distbindir
tardir=$(distbindir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distbindir).tar.bz2
$(gc__post_remove_bindistdir)
$(am__post_remove_distdir)
distbin-lzip: distbindir
tardir=$(distbindir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distbindir).tar.lz
$(gc__post_remove_bindistdir)
$(am__post_remove_distdir)
distbin-xz: distbindir
tardir=$(distbindir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distbindir).tar.xz
$(gc__post_remove_bindistdir)
$(am__post_remove_distdir)

distbin:
$(MAKE) $(AM_MAKEFLAGS) $(DISTBIN_TARGETS) gc__post_remove_bindistdir='@:' am__post_remove_distdir='@:'
$(gc__post_remove_bindistdir)
$(am__post_remove_distdir)

$(tarstamps):
@echo "Creating $@..."
@{ \
Expand All @@ -115,7 +154,8 @@ vcs-update:


# targets that are only logical targets and should always be executed
.PHONY: test checkall checkmanual vcs-update distwin distmingw
.PHONY: test checkall checkmanual vcs-update distwin distmingw \
distbin distbin-gzip distbin-bzip2 distbin-lzip distbin-xz

test: all
cd tests && $(MAKE) $(AM_MAKEFLAGS) test
Expand Down
2 changes: 1 addition & 1 deletion build_aux/create_mingw_bindist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ if not "%COB_MAIN_DIR%" == "" (
if "%COB_MAIN_DIR%" == "%~dp0" (
echo Information: batch was called alread from "%COB_MAIN_DIR%"
echo skipping environment setting...
if not [%1] == [] goto :call_if_needed
if not [%1] == [] goto :call_if_needed
goto :cobcver
) else (
echo Warning: batch was called before from "%COB_MAIN_DIR%"
Expand Down
8 changes: 4 additions & 4 deletions libcob/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -6962,10 +6962,10 @@ cb_config_entry (char *buf, int line)

value[j] = 0;
if (strcasecmp (keyword, "reset") != 0
&& strcasecmp (keyword, "include") != 0
&& strcasecmp (keyword, "includeif") != 0
&& strcasecmp (keyword, "setenv") != 0
&& strcasecmp (keyword, "unsetenv") != 0) {
&& strcasecmp (keyword, "include") != 0
&& strcasecmp (keyword, "includeif") != 0
&& strcasecmp (keyword, "setenv") != 0
&& strcasecmp (keyword, "unsetenv") != 0) {
i = cb_lookup_config (keyword);

if (i >= NUM_CONFIG) {
Expand Down

0 comments on commit 2f81ec8

Please sign in to comment.