diff --git a/ChangeLog b/ChangeLog index 5e6adb3ca..18f4719ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ +2022-03-11 Simon Sobisch + + * Makefile.am: targets to create binary distributions + 2022-01-03 Simon Sobisch * general: revert change 2019-06-05 - all header files that are included diff --git a/Makefile.am b/Makefile.am index 68bdec542..d432e7099 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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. @@ -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 $@..." @{ \ @@ -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 diff --git a/build_aux/create_mingw_bindist.sh b/build_aux/create_mingw_bindist.sh index 6cca2eb99..7e44bfc23 100755 --- a/build_aux/create_mingw_bindist.sh +++ b/build_aux/create_mingw_bindist.sh @@ -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%" diff --git a/libcob/common.c b/libcob/common.c index 9b7ed10f8..0221fef4e 100644 --- a/libcob/common.c +++ b/libcob/common.c @@ -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) {