summaryrefslogtreecommitdiffstatshomepage
path: root/py/makeqstrdefs.py
Commit message (Collapse)AuthorAge
* py/makeqstrdefs.py: Use python 2.6 syntax for set creation.Chris Packham2016-09-09
| | | | | | | | | | | | | | py/makeqstrdefs.py declares that it works with python 2.6 however the syntax used to initialise of a set with values was only added in python 2.7. This leads to build failures when the host system doesn't have python 2.7 or newer. Instead of using the new syntax pass a list of initial values through set() to achieve the same result. This should work for python versions from at least 2.6 onwards. Helped-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Chris Packham <judge.packham@gmail.com>
* py/makeqstrdefs.py: Remove restriction that source path can't be absolute.Paul Sokolovsky2016-06-16
| | | | | | That's arbitrary restriction, in case of embedding, a source file path may be absolute. For the purpose of filtering out system includes, checking for ".c" suffix is enough.
* py/makeqstrdefs.py: Windows compatibility.stijn2016-04-25
| | | | | | | | | | - msvc preprocessor output contains full paths with backslashes so the ':' and '\' characters needs to be erased from the paths as well - use a regex for extraction of filenames from preprocessor output so it can handle both gcc and msvc preprocessor output, and spaces in paths (also thanks to a PR from @travnicekivo for part of that regex) - os.rename will fail on windows if the destination file already exists, so simply attempt to delete that file first
* py/makeqstrdefs.py: Remove unused function/variable/import.stijn2016-04-25
|
* py: Divide "split" and "cat" phases of qstr extraction for better efficiency.Paul Sokolovsky2016-04-19
| | | | | | | | | E.g. for stmhal, accumulated preprocessed output may grow large due to bloated vendor headers, and then reprocessing tens of megabytes on each build make take couple of seconds on fast hardware (=> potentially dozens of seconds on slow hardware). So instead, split once after each change, and only cat repetitively (guaranteed to be fast, as there're thousands of lines involved at most).
* py/makeqstrdefs.py: Process only CPP line-numbering info.Paul Sokolovsky2016-04-19
| | | | Not stuff like "#pragma", etc.
* py: Rework QSTR extraction to work in simple and obvious way.Paul Sokolovsky2016-04-19
| | | | | | | | | | | | When there're C files to be (re)compiled, they're all passed first to preprocessor. QSTR references are extracted from preprocessed output and split per original C file. Then all available qstr files (including those generated previously) are catenated together. Only if the resulting content has changed, the output file is written (causing almost global rebuild to pick up potentially renumbered qstr's). Otherwise, it's not updated to not cause spurious rebuilds. Related make rules are split to minimize amount of commands executed in the interim case (when some C files were updated, but no qstrs were changed).
* py/makeqstrdefs: Add script to automate extraction of qstr from sources.Pavel Moravec2016-04-16
This script will search for patterns of the form Q(...) and generate a list of them. The original code by Pavel Moravec has been significantly simplified to remove the part that searched for C preprocessor directives (eg #if). This is because all source is now run through CPP before being fed into this script.