diff --git a/Makefile.am b/Makefile.am index 180f0fc..ceccaff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to generate Makefile.in ACLOCAL_AMFLAGS = -I m4 SUBDIRS = libcpputils libgixpp gixpp runtime/libgixsql -EXTRA_DIST = copy/SQLCA.cpy misc/gixsql-wrapper +EXTRA_DIST = copy/SQLCA.cpy misc/gixsql-wrapper README doc examples extra_files.mk CLEANFILES = *~ if ENABLE_MYSQL @@ -24,6 +24,22 @@ if ENABLE_SQLITE SUBDIRS += runtime/libgixsql-sqlite endif -pkgconfigdir = $(prefix)/share/gix/copy -pkgconfig_DATA = copy/SQLCA.cpy +copydir = $(prefix)/share/gixsql/copy +copy_DATA = copy/SQLCA.cpy + +include extra_files.mk + +docdir = $(prefix)/share/gixsql/doc +dist_doc_DATA = $(DOC_FILES) + +examplesdir = $(prefix)/share/gixsql/examples +dist_examples_DATA = $(EXAMPLES_FILES) +#dist_examples_DATA = examples/TSQL001A.cbl + +#dist-hook: +# mkdir $(distdir)/doc && mkdir $(distdir)/examples +# cp $(srcdir)/gixsql-tests-nunit/data/*.cbl $(srcdir)/gixsql-tests-nunit/data/*.cpy $(srcdir)/gixsql-tests-nunit/data/*.sql $(distdir)/examples +# cp $(srcdir)/README $(distdir)/doc + + diff --git a/README b/README index ac77538..82eba5d 100644 --- a/README +++ b/README @@ -290,7 +290,7 @@ Options: --no-rec-code arg custom code for "no record" condition(=nnn) ``` -When you want to build and link from the console, remember also to add the `/share/gix/copy` directory to the COPY path list (it contains SQLCA) and to include **libgixsql** (and the appropriate path, depending on your architecture) to the compiler's command line. +When you want to build and link from the console, remember also to add the `/share/gixsql/copy` directory to the COPY path list (it contains SQLCA) and to include **libgixsql** (and the appropriate path, depending on your architecture) to the compiler's command line. ### Basic command line example @@ -571,4 +571,4 @@ The Oracle driver currently supports connecting only with a service name (e.g. ` The connection string for SQLIte databases directly encodes the filename, e.g.: - `sqlite:///home/user/mydb.db` - `sqlite://c:/Users/myuser/mydb.db` -As usual with SQLite, if the SQLIte file does not exist, it will be created. Currently no options are available for the SQLite driver. \ No newline at end of file +As usual with SQLite, if the SQLIte file does not exist, it will be created. Currently no options are available for the SQLite driver. diff --git a/README.md b/README.md index 8fcd353..2b353ae 100644 --- a/README.md +++ b/README.md @@ -306,7 +306,7 @@ Options: --no-rec-code arg custom code for "no record" condition(=nnn) ``` -When you want to build and link from the console, remember also to add the `/share/gix/copy` directory to the COPY path list (it contains SQLCA) and to include **libgixsql** (and the appropriate path, depending on your architecture) to the compiler's command line. +When you want to build and link from the console, remember also to add the `/share/gixsql/copy` directory to the COPY path list (it contains SQLCA) and to include **libgixsql** (and the appropriate path, depending on your architecture) to the compiler's command line. As an alternative you may call **gixsql** which is a wrapper around the gixsql binary. diff --git a/configure.ac b/configure.ac index 9424eab..f4b38bf 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([gixsql], [1.0.19dev1], [m.ridoni@gmail.com]) +AC_INIT([gixsql], [1.0.19dev1], [m.ridoni@mediumgray.info]) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.9.6 -Wall -Werror dist-bzip2 subdir-objects]) diff --git a/prepdist.sh b/prepdist.sh new file mode 100755 index 0000000..0bf68cb --- /dev/null +++ b/prepdist.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +mkdir -p $SCRIPT_DIR/doc +mkdir -p $SCRIPT_DIR/examples + +cp README $SCRIPT_DIR/doc +cp $SCRIPT_DIR/gixsql-tests-nunit/data/*.cbl $SCRIPT_DIR/examples +cp $SCRIPT_DIR/gixsql-tests-nunit/data/*.cpy $SCRIPT_DIR/examples +cp $SCRIPT_DIR/gixsql-tests-nunit/data/*.sql $SCRIPT_DIR/examples + +cat << EOF > $SCRIPT_DIR/examples/README +Example files for GixSQL +(c) 2022 Marco Ridoni +License: GPL/LGPL 3.0 +========================== + +These example programs and SQL scripts are part of the GixSQL test suite +that is available for distribution at https://github.com/mridoni/gixsql +EOF + +rm -f $SCRIPT_DIR/extra_files.mk && touch $SCRIPT_DIR/extra_files.mk + +echo "DOC_FILES = doc/README" >> $SCRIPT_DIR/extra_files.mk +echo "" >> $SCRIPT_DIR/extra_files.mk +echo "EXAMPLES_FILES = \\" >> $SCRIPT_DIR/extra_files.mk + +for f in $SCRIPT_DIR/examples/* ; do + echo -e "\texamples/$(basename $f) \\" >> $SCRIPT_DIR/extra_files.mk +done + +echo -e "\texamples/README" >> $SCRIPT_DIR/extra_files.mk + +