Skip to content

Commit

Permalink
Added docs and examples to release tarball (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
mridoni committed Nov 23, 2022
1 parent cd23889 commit b2a6f6b
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 7 deletions.
22 changes: 19 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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



4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<gix-install-dir>/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 `<gix-install-dir>/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
Expand Down Expand Up @@ -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.
As usual with SQLite, if the SQLIte file does not exist, it will be created. Currently no options are available for the SQLite driver.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<gix-install-dir>/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 `<gix-install-dir>/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.

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
35 changes: 35 additions & 0 deletions prepdist.sh
Original file line number Diff line number Diff line change
@@ -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


0 comments on commit b2a6f6b

Please sign in to comment.