Update the various Makefiles to use override able constants.
This patch adds support for running cppcheck from the Makefile. It also standardizes the order of some of the targets. It renames vpip_format.c to vpip_format.cc and fixes the size of the array tables to make room for the trailing NULL. Found when using a C++ compiler.
This patch updates all the Makefile.in files and configure.in as follows: Do not use the -Wall warning flag when using the SunPro compiler. The SunPro compiler uses -xMD instead of -MD. There are still more fixes needed before Icarus will compile on OpenSolaris.
Try to put all the version stamps into common version_base.h and version_stamp.h header files. All the source programs then get their version from these header files. Also handle the version stamps in the man pages by using the version_*.h header file contents to edit the version strings in the man page title bar markers.
Use the time stamp file technique recommended by the autoconf manual to prevent unneccesary rebuilds because of an unchanged config.h. Uses the automake trick of generating the stamp files in the _AC_AM_CONFIG_HEADER_HOOK macro instead of littering the source directory with stamp-h.in files. Add an extra ./config.status run after ./config.status --recheck because with --recheck it doesn't actually try to remake the generated files (and thus doesn't make the timestamp files). Thus without the extra run, each stamp-*-h target would need to independently run ./config.status to make sure it wasn't changed by the configuration change. An orthogonal fix of how config.status is called in subdirectories. When in a subdirectory and config.status is called with ../config.status and $(srcdir) is a relative path, config.status gets confused. Fixed by replacing '../config.status --file=Makefile.in' with 'cd ..; ./config.status --file=<dir>/Makefile.in'
Rather then spread VERSION= defines throughout all the makefiles, put the base version in version_base.in. Use that to generate a version.h that includes the base version as well as the detailed version.
This patch cleans up the Makefile.in files. We only need to delete config.log in the lower directories. We reference the *.in files at $(srcdir)/ We need to make distclean for the tgt-(fpga,pal,verilog) directories. This is to cleanup the Makefile. Add some missing "rm -r f dep"
This patch fixes the crash in MinGW make distclean. The problem was that vpi/ and driver-vpi/ were being called twice and the MinGW make was failing on the second call since the Makefile was already removed. Add a dependency on config.h and _pli_types.h in the make all target. It is likely that only _pli_types.h was needed, but this makes it clear that they need to be rebuilt if the .in files change. The lower directories that depend on the top level config.status now have a target to rebuild the local Makefile file it the corresponding Makefile.in changes.
This configure option causes the installed commands to have a suffix string that makes them distinct from other versions that also have a suffix string. This allows for multiple installed versions of Icarus Verilog. Also, move installed C/C++ header files into a subdirectory of their own under the target include directory, to make clearer the purpose and source of those files.
When the -V flag is passed to the iverilog command, we can easily print the version information for the driver itself, but it is also valuable to probe all the components that would have been used for a real compile. So the driver executes the preprocessor and the ivl core to have them print version information. The ivl core program also tries to load the target code generator and get version information to print. For this to work, create a new optional entry point "target_query" that takes a query key string as an argument and returns a const string as the result. Use this with the key "version" to get version information out of the target.
The MinGW system() implementation appears to return the straight return value instead of the waitpid() like result that more normal systems return. Because of this just return the system() result without processing for MinGW compilations. Older version of the MinGW runtime (pre 3.14) just used the underlying vsnprintf(). Which has some problems. The 3.14 version has some nice improvements, but it has a sever bug when processing "%*.*f", -1, -1, <some_real_value>. Because of this we need to use the underlying version without the enhancements for now. snprintf prints %p differently than the other printf routines so use _snprintf to get consistent results. Only build the PDF files if both man and ps2pdf exist. MinGW does not know about the z modifier for %d, %u, etc. Add some missing Makefile check targets.
This patch adds a check target to the Makefile.in files in the tgt-null, tgt-stub and vpi directories.