Skip to content

Commit

Permalink
Commit #141
Browse files Browse the repository at this point in the history
  • Loading branch information
madmurphy committed Feb 5, 2020
1 parent a6963ae commit f730084
Show file tree
Hide file tree
Showing 216 changed files with 10,206 additions and 2,750 deletions.
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ indent_size = 2
indent_style = tab
indent_size = 4

[src/confini.c]
[{src/confini.c,dev/marked-sources/confini-marked.c}]
charset = utf-8
indent_style = tab
indent_size = 4

[src/confini.h]
[{src/confini.h,dev/marked-sources/confini-marked.h}]
charset = utf-8
indent_style = space
indent_size = 4

33 changes: 32 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@ Change Log {#changelog}
=======================


## 1.13.0 -- 2020-02-05

Changes:

* Support for C++ has been improved
* Standard header `stdbool.h` has been added to the library's public header for
handling C++ compatibility
* Module-definition file `src/libconfini.def` has been added to the package
tree for improving compatibility with **Microsoft Windows**
* Code page and UTF-8 strings in `src/winres.rc` have been adjusted
* Code review
* A `--without-io-api` option has been added to the `configure` script for
compiling the library without the C Standard I/O API
* **GNU Autotests** have been implemented (via `make check`, `make finishcheck`
and `make installcheck` -- launch `make help` for more information about
these targets)
* The package tree has been re-organized -- all the files needed for developing
the library and the documentation are now in the `dev` subdirectory
* Code review in the `configure` script (options `--disable-maintainer-mode`,
`--enable-author-mode` and `--enable-htmldoc` have been created; the `xargs`
utility has been removed from the requirements for building the package) and
in the **GNU Make** environment (`Makefile.am`: the following targets have
been created: `make all-sources`, `make baremetal-csources`, `make expired`,
`make official-csources`, `make official-sources`, `make official-symbols`
and `make snapshot`, furthermore † `make author-clean` has been renamed to
`make bootstrap-clean`)
* Added GCC option `-Wl,-out-implib,libconfini.lib` to the `mgwmake.bat` script
* Documentation
* Examples


## 1.12.0 -- 2019-11-29

Changes:
Expand Down Expand Up @@ -58,7 +89,7 @@ Changes:
source-release` and `make authors-copy` targets for better reproducing the
content of the package as released by its authors; created † `make
binary-image`, `make binary-release` and † `make install-manifest` targets
for aiding staged installations; created a `make author-clean` target for
for aiding staged installations; created a `make author-clean` target for
cleaning the source directory with the same degree of fury of `./bootstrap
--clean`; created a `make help` target for printing the list of commonly used
targets; replaced † `autogen.sh --multiversion` with `./configure
Expand Down
116 changes: 70 additions & 46 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ instead (it will produce larger binaries)
For a minimum installation without development files (i.e. static libraries,
headers, documentation, examples, etc.) use `./configure --disable-devel`. If
you only want to leave out man pages and examples, use `./configure
--disable-man --disable-examples`.
--disable-doc --disable-examples`.

If you need to customize the target directories, or otherwise adjust the build
setting, use
Expand All @@ -32,8 +32,8 @@ targets by launching `make help`.

If the `configure` script is missing from your package you need to create it by
running the `bootstrap` script. Use the `--noconfigure` parameter to prevent
`bootstrap` from running automatically `configure` immediately after having
generated it. To list different options use `./bootstrap --help`.
`bootstrap` from running automatically the `configure` script immediately after
having generated it. To list different options use `./bootstrap --help`.

If both the `configure` and `bootstrap` scripts are missing from your package
you can initialize the build environment by launching the following commands
Expand All @@ -55,83 +55,86 @@ Microsoft Windows
-----------------

If you are using Microsoft Windows, a batch script for compiling **libconfini**
under MinGW without Autotools is available (`mgwmake.bat`). If you want instead
under MinGW without GNU Make is available (`mgwmake.bat`). If you want instead
to compile the library manually, you can run:

windres.exe --codepage=65001 -i winres.rc -o winres.o
gcc.exe -std=c99 -g -O3 -Wall -shared -static-libgcc -Wl,--no-undefined \
-o libconfini.dll confini.c winres.o
strip.exe libconfini.dll
cd src
windres.exe -i winres.rc -o winres.o
gcc.exe -std=c99 -g -O3 -Wall -shared -static-libgcc -Wl,--no-undefined \
-Wl,-out-implib,libconfini.lib -o libconfini.dll winres.o confini.c
strip.exe libconfini.dll
del confini.o winres.o

If you want to compile only the library without the resource file, you can run:
If you want to generate also the `.def` file, use:

gcc.exe -std=c99 -g -O3 -Wall -shared -static-libgcc -Wl,--no-undefined \
-o libconfini.dll confini.c
strip.exe libconfini.dll
cd src
windres.exe -i winres.rc -o winres.o
gcc -c -o confini.o confini.c
dlltool.exe -z libconfini.def -D libconfini --export-all-symbols confini.o
gcc.exe -std=c99 -g -O3 -Wall -shared -static-libgcc -Wl,--no-undefined \
-Wl,-out-implib,libconfini.lib -o libconfini.dll confini.o winres.o
strip.exe libconfini.dll
del confini.o winres.o

If you want to build (and install) **libconfini** via Autotools under Microsoft
Windows, several options are available, such as MinGW + MSYS, MSYS2, GnuWin32
and Cygwin (for which [an unofficial port][1] of **libconfini** exists).
If you want to build (and install) **libconfini** via Make/Autotools under
Microsoft Windows several options are available, such as MinGW + MSYS, MSYS2,
GnuWin32 and Cygwin (for which [an unofficial port][1] of **libconfini**
exists).

To compile the library with Microsoft Visual Studio use the following commands:

cd src
rc.exe winres.rc
cl.exe /c /O2 confini.c
link /DLL /DEF:libconfini.def /OUT:libconfini.dll winres.res confini.obj

To compile it as a static library with Microsoft Visual Studio use:

cd src
rc.exe winres.rc
cl.exe /c /O2 confini.c
lib.exe /OUT:libconfini.lib winres.res confini.obj

Often a compiled DLL [is available][2] among the assets of each release of this
package on GitHub.


Bare Metal
Bare metal
----------

This library has nearly everything implemented from scratch, with the only
The library has nearly everything implemented from scratch, with the only
notable exception of the I/O functions `load_ini_file()` and `load_ini_path()`,
which rely on C standard libraries. On some platforms, however, only a rather
exotic I/O API is available, while for some other platforms the C Standard
Library is simply too heavy or just not implementable.

In these situations it will be needed to get rid of every tie with the C
Standard Library and compile **libconfini** as "bare metal". For further
information about how to proceed, please read the paragraph **Compiling for
extreme platforms** in the **Library Functions Manual**.


Distributing the source code
----------------------------

If you aim to re-distribute the source code of **libconfini** you should first
make sure that the `configure` script is present, for giving the possibility to
compile the package without having Autotools installed. If the `configure`
script is present and you have already launched it, use `make distclean` to
reset the configuration that this has created, or use `make source-release` to
build a fresh archive and ignore the current configuration.


Distributing the compiled package
---------------------------------

Use `make binary-release` to create a binary package of **libconfini**.

**Note:** If you only want to obtain the list of the files that are going to be
installed, use `make manifest` instead.
Standard Library and compile **libconfini** as "bare metal". The `configure`
script has a `--without-io-api` option that allows to create a special fork of
the original library able to function in any environment. For information about
how to proceed, please see `dev/hackings/baremetal/README.md`.


Complex installations
---------------------

This library has been designed to be able to coexist with other major releases
This package has been designed to be able to coexist with other major releases
of itself. However, when two versions share the same major number but have
different minor or revision numbers, only the most recent package must be
installed.

For two or more different major releases to be able to coexist, the major
number of each version must be appended to the package name it refers to, with
the possible exception of only one package (usually version 1.X.X). This can be
done easily by passing the `--with-other-versions` option to the `configure`
script:
the possible exception of only one package (usually version 1.X.X or the most
recent release, depending on the approach of your distro). This can be done
easily by passing the `--with-other-versions` option to the `configure` script:

./configure --with-other-versions

This will ensure **libconfini** X.Y.Z to be installed as **libconfiniX** X.Y.Z.

By convention you need to append the major version number to the name of the
package only for major version numbers greater than one.
By convention you will need to append the major version number to the name of
the package only for major version numbers greater than one.

If you want to install a modified version of **libconfini** without generating
conflicts with an original version already present in the system, or you simply
Expand All @@ -154,6 +157,27 @@ instead of the more standard `confini-X.h`.
For any issue, drop a message at https://github.com/madmurphy/libconfini/issues.


Distributing the source code
----------------------------

If you aim to re-distribute the source code of **libconfini** you should first
make sure that the `configure` script is present, for granting the possibility
of compiling the package without having Autotools installed. If the `configure`
script is present and you have already launched it, use `make distclean` to
reset the configuration that this has created, or use `make source-release` to
build a fresh archive that ignores the current configuration.


Distributing the compiled package
---------------------------------

Use `make binary-release` to create a binary package of **libconfini** for a
particular platform.

**Note:** If you only want to obtain the list of the files that are going to be
installed on a particular platform, use `make manifest` instead.


[1]: https://github.com/fd00/yacp/tree/master/libconfini
[2]: https://github.com/madmurphy/libconfini/releases

Loading

0 comments on commit f730084

Please sign in to comment.