Commit 487f702a authored by John P. Willis's avatar John P. Willis
Browse files

Polish the build and install process

parent a1e212ac
Pipeline #534 passed with stage
in 1 minute and 12 seconds
......@@ -39,7 +39,6 @@ doc/Makefile
etc/Makefile
freem*.tar.gz
src/Makefile
src/version.h
src/fmadm
doc/freem.fn
doc/freem.ky
......
......@@ -403,3 +403,8 @@ VERSION 0.26.6
VERSION 0.26.8
Another attempt at fixing documentation
********************************************************************************
VERSION 0.27.0
Polish the build and install process
......@@ -38,12 +38,45 @@
#
SUBDIRS = src doc etc
dist_bin_SCRIPTS = bin/namespace
dist_pkgdata_DATA = mlib/*.m etc/freem.conf
EXTRA_DIST = src/*.h doc/freem.1 doc/*.8
dist_sysconf_DATA = etc/freem.conf
dist_doc_DATA = README.md doc/freem.1 doc/gcompact.8 doc/gfix.8 doc/grestore.8
man1_MANS = doc/freem.1
man8_MANS = doc/gcompact.8 doc/gfix.8 doc/grestore.8
info_TEXINFOS = doc/freem.texi
systemgbldir = $(localstatedir)/freem/SYSTEM/globals
systemrtndir = $(localstatedir)/freem/SYSTEM/routines
usergbldir = $(localstatedir)/freem/USER/globals
userrtndir = $(localstatedir)/freem/USER/routines
journaldir = $(localstatedir)/freem/journals
mlib = mlib/%DB.m mlib/%HTTP.m mlib/%MAPPING.m mlib/%MENU.m mlib/%TERMIO.m mlib/%TUIAUTH.m mlib/%TUIDATE.m \
mlib/%TUIDEMO.m mlib/%TUIFILE.m mlib/%TUIFORM.m mlib/%TUI.m mlib/%TUIMENU.m mlib/%TUINET.m \
mlib/%TUIUTIL.m mlib/%ZCOLUMNS.m mlib/%ZEVENT.m mlib/%ZFREEM.m mlib/%ZFRMSAMP.m mlib/%ZFRMXEC.m \
mlib/%ZHELP.m mlib/%ZMAINT.m mlib/%ZMERGE.m mlib/%ZROWS.m mlib/%zscreen.m mlib/%ZUTILS.m mlib/%ZWRIMP.m
EXTRA_DIST = sem.ver sysns_routine.txt sysns_global.txt userns_routine.txt userns_global.txt journals.txt $(mlib)
systemrtn_DATA = $(mlib) sysns_routine.txt
systemgbl_DATA = sysns_global.txt
userrtn_DATA = userns_routine.txt
usergbl_DATA = userns_global.txt
journal_DATA = journals.txt
install-exec-hook:
mkdir -p /var/local/freem
/usr/local/bin/namespace add SYSTEM -n -p /var/local/freem
/usr/local/bin/namespace add USER -p /var/local/freem
cp mlib/*.m /var/local/freem/SYSTEM/routines
groupadd -f freem
chgrp freem $(bindir)/freem
chmod 750 $(bindir)/freem
install-data-hook:
sed -i "s:%DATAROOT%:$(localstatedir):g" $(sysconfdir)/freem.conf
chmod 770 $(journaldir) $(systemgbldir) $(usergbldir) $(userrtndir)
chmod 750 $(systemrtndir)
chgrp -R freem $(localstatedir)
#install-exec-hook:
# mkdir -p /var/local/freem
# /usr/local/bin/namespace add SYSTEM -n -p /var/local/freem
# /usr/local/bin/namespace add USER -p /var/local/freem
# cp mlib/*.m /var/local/freem/SYSTEM/routines
......@@ -37,7 +37,7 @@
#
#
AC_INIT(freem, 0.26.8, jpw@coherent-logic.com)
AC_INIT(freem, 0.27.0, jpw@coherent-logic.com)
AC_CONFIG_HEADERS([src/config.h])
AC_CHECK_LIB([readline], [readline])
AC_CHECK_LIB([readline], [history_list])
......
......@@ -4,7 +4,7 @@
@settitle The FreeM Manual
@copying
This manual is for FreeM, (version 0.26.8), which is a free and open-source implementation of the M programming language and database system.
This manual is for FreeM, (version 0.27.0), which is a free and open-source implementation of the M programming language and database system.
Copyright @copyright{} 2020 Coherent Logic Development LLC
......@@ -18,7 +18,7 @@ Permission is granted to copy, distribute and/or modify this document under the
@title The FreeM Manual
@subtitle @sc{The Official Manual of FreeM}
@subtitle Version 0.26.8
@subtitle Version 0.27.0
@c@vskip 10pt
@c@center @image{freem-logo-sm,,,,.png}
@author John P. Willis
......@@ -279,7 +279,7 @@ The FreeM direct-mode environment is the mode entered when FreeM is loaded witho
@example
Coherent Logic Development FreeM
Version 0.26.8-x86_64-Linux (commit 4ececff; jpw AT pasithea Tue 13 Oct 2020 09:03:27 AM MDT)
Version 0.27.0-x86_64-Linux (commit 4ececff; jpw AT pasithea Tue 13 Oct 2020 09:03:27 AM MDT)
*
* *
......@@ -1291,7 +1291,7 @@ In the above @emph{inclusive} form, @code{KVALUE} will kill the data values at e
@cartouche
@quotation
@emph{Note}
The below @emph{argumentless} and @emph{exclusive} forms of @code{KVALUE} are not implemented in FreeM, as of version 0.26.8, but are planned for a future release.
The below @emph{argumentless} and @emph{exclusive} forms of @code{KVALUE} are not implemented in FreeM, as of version 0.27.0, but are planned for a future release.
@end quotation
@end cartouche
......
......@@ -36,5 +36,5 @@
# along with FreeM. If not, see <https://www.gnu.org/licenses/>.
#
#
etcdir = /etc
etc_DATA = freem.conf
\ No newline at end of file
sysconf_DATA = freem.conf
[SYSTEM]
root=/var/local/freem/SYSTEM
percent_routines_path=/var/local/freem/SYSTEM/routines
percent_globals_path=/var/local/freem/SYSTEM/globals
routines_path=/var/local/freem/SYSTEM/routines
globals_path=/var/local/freem/SYSTEM/globals
locktable_file=/var/local/freem/SYSTEM/locktab
zalloctab_file=/var/local/freem/SYSTEM/zalloctab
journal_file=/var/local/freem/SYSTEM/journal
root=%DATAROOT%/freem/SYSTEM
routines_path=%DATAROOT%/freem/SYSTEM/routines
globals_path=%DATAROOT%/freem/SYSTEM/globals
locktable_file=%DATAROOT%/freem/SYSTEM/locktab
zalloctab_file=%DATAROOT%/freem/SYSTEM/zalloctab
journal_file=%DATAROOT%/freem/journals/journal
journal_mode=on
journal_host_id=DEFAULT
hardcopy_file=/var/local/freem/SYSTEM/hardcopy
hardcopy_file=%DATAROOT%/freem/SYSTEM/hardcopy
[USER]
root=/var/local/freem/USER
routines_path=/var/local/freem/USER/routines
globals_path=/var/local/freem/USER/globals
locktable_file=/var/local/freem/USER/locktab
hardcopy_file=/var/local/freem/USER/hardcopy
root=%DATAROOT%/freem/USER
routines_path=%DATAROOT%/freem/USER/routines
globals_path=%DATAROOT%/freem/USER/globals
locktable_file=%DATAROOT%/freem/USER/locktab
hardcopy_file=%DATAROOT%/freem/USER/hardcopy
#
# *
# * *
# * *
# ***************
# * * * *
# * MUMPS *
# * * * *
# ***************
# * *
# * *
# *
#
# gen_version.sh
# generate src/version.h
#
#
# Author: John P. Willis <jpw@coherent-logic.com>
# Copyright (C) 1998 MUG Deutschland
# Copyright (C) 2020 Coherent Logic Development LLC
#
#
# This file is part of FreeM.
#
# FreeM is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# FreeM 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 Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with FreeM. If not, see <https://www.gnu.org/licenses/>.
#
#
SEMVER=`cat sem.ver`
OS=`uname`
CPU=`uname -m`
if [ "$OS" = "AIX" ]
then
COMMIT="no-git"
CPU="ppc"
else
which git > /dev/null 2>&1
if [ $? -eq 0 ] ; then
COMMIT=`git rev-parse --short HEAD`
else
COMMIT="no-git"
fi
fi
DT=`date`
HOST=`hostname`
VERSTR="${SEMVER}-${CPU}-${OS} (commit ${COMMIT}; ${USER}@${HOST} ${DT})"
echo "#ifndef FREEM_VERSION_H"
echo "#define FREEM_VERSION_H"
echo "#define FREEM_VERSION_ID \"${VERSTR}\""
echo "#define FREEM_VERSION_STR \"${VERSTR}\\201\""
echo "#endif"
FreeM journals go in this directory.
......@@ -37,8 +37,14 @@
#
#
AM_CFLAGS = -DHACK_NOXLATE -fsigned-char #-Wall -Wno-format-truncation -Wno-format-overflow -Wno-parentheses -Wno-char-subscripts -Wno-unused-but-set-variable -Wno-stringop-truncation
AM_CFLAGS = -fsigned-char #-Wall -Wno-format-truncation -Wno-format-overflow -Wno-parentheses -Wno-char-subscripts -Wno-unused-but-set-variable -Wno-stringop-truncation
AM_CPPFLAGS = -DHACK_NOXLATE -DSYSCONFDIR=\"${sysconfdir}\" -DPREFIX=\"${prefix}\" -DDATADIR=\"${datadir}\"
freem_headers = config.h elsymbiont.h errmsg.h events.h fmadm.h fma_globals.h fma_jobs.h \
fma_journals.h fma_locks.h fma_routines.h freem.h iftab.h iniconf.h \
init.h io_socket.h jnldefs.h journal.h libfill.h log.h mappings.h mdebug.h \
merge.h merr.h mpsdef0.h mpsdef.h mref.h mtok.h namespace.h sighnd.h ssvn_zrpi.h \
transact.h version.h
freem_common = iniconf.c sighnd.c init.c expr.c global.c mlib.c namespace.c operator.c \
service.c ssvn.c ssvn_character.c ssvn_device.c ssvn_display.c \
......@@ -46,17 +52,14 @@ freem_common = iniconf.c sighnd.c init.c expr.c global.c mlib.c namespace.c oper
ssvn_system.c ssvn_window.c ssvn_z.c ssvn_zos.c ssvn_zprocess.c \
ssvn_zfile.c ssvn_zfreem.c strings.c symtab.c views.c xecline.c \
transact.c iftab.c journal.c mappings.c mref.c events.c \
elsymbiont.c mdebug.c log.c io_socket.c merr.c mtok.c ssvn_zrpi.c
elsymbiont.c mdebug.c log.c io_socket.c merr.c mtok.c \
ssvn_zrpi.c $(freem_headers)
fmadm_common = fmadm.c fma_locks.c fma_journals.c fma_routines.c fma_globals.c fma_jobs.c
BUILT_SOURCES = version.h
bin_PROGRAMS = freem fmadm glocks gcompact gfix grestore fmadm
lib_LTLIBRARIES = libfreem.la
include_HEADERS = freem.h merr.h
libfreem_la_SOURCES = $(freem_common) frmgbl.c
......@@ -78,12 +81,4 @@ gcompact_SOURCES = gcompact.c $(freem_common) frmgbl.c
fmadm_SOURCES = $(fmadm_common) $(freem_common) frmgbl.c
mlib.c: version.h
mumps.c: version.h
expr.c: version.h
version.h: ../sem.ver
cd ${top_srcdir} && ${SHELL} gen_version.sh > src/version.h
......@@ -107,7 +107,7 @@ int main (int argc, char **argv)
strncpy (action, argv[1], STRLEN - 1);
strncpy (obj_str, argv[2], STRLEN - 1);
strncpy (fma_namespace, argv[3], STRLEN - 1);
strncpy (config_file, "/etc/freem.conf", 4096);
strncpy (config_file, SYSCONFDIR"/freem.conf", 4096);
if (strncmp (action, "list", STRLEN - 1) == 0) act = ACT_LIST;
else if (strncmp (action, "examine", STRLEN - 1) == 0) act = ACT_EXAMINE;
......
......@@ -111,7 +111,7 @@ int get_conf(char *section, char *key, char *value)
etcexists = TRUE;
dotexists = FALSE;
#else
strcpy (etcfile, "/etc/freem.conf");
strcpy (etcfile, SYSCONFDIR"/freem.conf");
etcexists = TRUE;
dotexists = FALSE;
#endif
......
......@@ -118,7 +118,7 @@ int main (int argc, char **argv, char **envp)
strcpy (stack0, argv[0]);
stcnv_c2m (stack0);
strncpy (config_file, "/etc/freem.conf", 100);
strncpy (config_file, SYSCONFDIR"/freem.conf", 100);
#if !defined(_SCO_DS) && !defined(__AMIGA) && !defined(_AIX)
......
#ifndef FREEM_VERSION_H
#define FREEM_VERSION_H
#define FREEM_VERSION_ID PACKAGE_VERSION
#define FREEM_VERSION_STR PACKAGE_VERSION
#endif
System globals go in this directory.
System Routines go in this directory with the .m extension.
USER globals go in this directory.
USER routines go in this directory with the .m extension.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment