Move the duplicated effort of looping over all structs and enums out of the code generators and into the code that invokes the code generator. Thus instead of invoking the code generator once to generate code for all structs and enums, we now invoke it once for every struct and enum.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5367 4a71c877-e1ca-e34f-864e-861f7616d084
A slight modification to the code generators removes their need for needing to know how many elements (enums or structs) it needs to generate code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5366 4a71c877-e1ca-e34f-864e-861f7616d084
Add a new code generator for the database mini-meta-language. It creates SQL SELECT statements that use INNER JOINs to join all fields across the inheritance hierarchy in a single result row.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5365 4a71c877-e1ca-e34f-864e-861f7616d084
Don't add an AUTOINCREMENT clause to the PRIMARY KEY, ID column if it we're not working on the abstract base class.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5364 4a71c877-e1ca-e34f-864e-861f7616d084
Give the code generators the opportunity to print something at the start and the end of the file. E.g. header guards for C files, and some notice about the file being automatically generated for all types.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5363 4a71c877-e1ca-e34f-864e-861f7616d084
In addition we now also parse the "unique" keyword in set and enum lines and thus process it there as well.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5360 4a71c877-e1ca-e34f-864e-861f7616d084
Instead we now have a two phase process:
* First parse and build an abstract syntax tree (AST)
* Secondly loop over the generated AST to produce useable code for the target language.
NOTE: Currently only the C struct definition generator is rewritten to this new architecture.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5359 4a71c877-e1ca-e34f-864e-861f7616d084
This code generator is still in a prototyping phase. It'll probably get rewritten entirely.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5358 4a71c877-e1ca-e34f-864e-861f7616d084
Exception is when generating the .wz files, where we need the path to the build directory and building a reverse relative path to $(srcdir) will be messy.
Also silence submake.mk a great deal.
Bug #11883 should be fixed now for the most part.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5325 4a71c877-e1ca-e34f-864e-861f7616d084
Their use is currently flawed, since it will not work in directories with spaces in them... (
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5319 4a71c877-e1ca-e34f-864e-861f7616d084
- Use PACKAGE, PACKAGE_VERSION, remove VERSION
- Allow out-of-source-dir builds (mkdir build && cd build && make -f ../Makefile.raw)
- Move config.mk from $(top_srcdir)/makerules/config.mk to $(top_builddir)/config.mk
When keeping current behaviour (srcdir=builddir), this means: Move it from makerules into the main directory
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5308 4a71c877-e1ca-e34f-864e-861f7616d084
Does MS provide some kind of templating system? Like autotools generate Makefiles from Makefile.am.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3950 4a71c877-e1ca-e34f-864e-861f7616d084
* Add it to the MSVC Workspace/Solution
* Set svn:eol-style on the MSVC project & solution files to CRLF
Patch #832 by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2752 4a71c877-e1ca-e34f-864e-861f7616d084
* Use SetEnvironmentVariableA instead of SetEnvironmentVariable which is a macro
Issue pointed out by Buginator
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2748 4a71c877-e1ca-e34f-864e-861f7616d084
* Parse the "/autorevision.conf" file as last
* Add template class assign_once<T> which wraps a T object so that it can only be assigned to once (all following assignments will simply be NO-OPS)
* Make all RevisionInformation members an assign_once<T> object instead of a T object
* Make sure src/version.c can compile when there is little revision information available
* Add autorevision.conf which will provide a sane default for wc_uri ("trunk")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2731 4a71c877-e1ca-e34f-864e-861f7616d084
* Set raw makefiles up to use AutoRevision to generate src/autorevision.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2722 4a71c877-e1ca-e34f-864e-861f7616d084
* This class extracts revision info from a "var=value" style text file (can be used in tarballs)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2721 4a71c877-e1ca-e34f-864e-861f7616d084
* Add a new subclass of RevisionExtractor: RevSVNVersionQuery
* This subclass will use "svnversion" to additionally detect mixed revisions, modifications and switched paths in working copies
* Add the "low revision", modification and switch state to the output
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2720 4a71c877-e1ca-e34f-864e-861f7616d084
* This class uses the "Chain of Responsibility" pattern to delegate a task the current subclass cannot perform to a successor in the chain
* Make QuerySVN() and ParseFile() part of subclasses derived from RevisionExtractor
* Also make these functions function properly in the chain of responsibility
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2716 4a71c877-e1ca-e34f-864e-861f7616d084
* Allow the #definition of SVN_AUTOREVISION_STATIC before #include AutoRevision's output file
* When #defined to "static" it will mark all variables created in AutoRevision as static
* Additionally detect the "base-uri" of a working copy (e.g. "trunk", "branches/2.0", etc.) and dump it in the output header file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2624 4a71c877-e1ca-e34f-864e-861f7616d084
* Make the automake build-system use Autorevision to produce src/autorevision.h
* Add it to the clean-local target as well!
* Ignore src/autorevision.h (in "svn status")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2579 4a71c877-e1ca-e34f-864e-861f7616d084
* Make function WriteOutput const-correct
* Mark global variables static
* Add commandline option "+cstr" which results in Autorevision adding a C-style string into the produced header file
* When no revision information could be extracted from a working copy give an error message
* Add some comments
* Move some variables into a more local scope
* Don't use member function .close() on iostreams just before leaving scope (the destructor will take care of that!)
* Don't write the header file in binary mode
* Fix handling of do_translate
* Now DO dump revision date as well
* Add double-quotes around strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2578 4a71c877-e1ca-e34f-864e-861f7616d084
* Use C++ iostreams for output as well as input (which was already being used)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2577 4a71c877-e1ca-e34f-864e-861f7616d084