We enhance the build script (batch and bash), so it can generate
amalgamation distributions for both the UNIX and Windows platforms.
To generate a distribution for a specific version, first use make to
list all tags and check out the specified tag in the project root
directory:
$ make taglist
$ make co TAG=<tag>
Then go to the tools directory and run the script to generate tar.gz
for UNIX and generate zip for Windows:
$ cd .tag/<tag>/tools
$ ./build cleanall
$ ./build tar
$ ./build zip
Notice that this enhancement was added after the official release
v3.1.5.1c1bb23, so you need to specify a tag newer than v3.1.5.
resolves#43
Switching to FreeBSD getopt library can resolve two issues:
1. FreeBSD getopt always uses the 2-Clause BSD, which is compatible
to GPL. (Although NetBSD has switched to the 2-Clause BSD in
2008.)
2. FreeBSD getopt_long provides getopt_long_only, which is critical
for developers who want to follow the command-line syntax
convention, which uses a single '-' character for long options.
resolves: #54#56
This is a huge commit since the last one. Here are the major changes:
- Add original source files and the amalgamation generator utilities
- Add dynamic string utilities (arg_dstr) used to generator output
- Add hash table utilities (arg_hashtable) used to store sub-commands
- Add utilities (arg_cmd) used to implement the sub-command mechanism
- Use clang-format to unify the coding style
- Add new unit tests
- Fix warnings under strict compiler settings in VC and GCC
- Add ARG_REPLACE_GETOPT to choose the built-in or system getopt
- Add utilities to generate help messages
- Cleanup the mess after various pull requests