2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-12-12 03:41:24 +01:00
Commit Graph

701 Commits

Author SHA1 Message Date
Federico Pellegrin
429c4c88d9 protoc: simplify the java generation also solving problems with .proto input files generated during build 2019-01-20 10:41:51 +00:00
Thomas Nagy
2f3d5e5163
Prevent protoc errors on "waf list" 2019-01-19 09:40:11 +01:00
fedepell
f876a7b18c protoc: fix filename generation for .java 2019-01-17 14:45:40 +01:00
Thomas Nagy
4bd0c72809
Rework the previous changes 2019-01-05 16:16:48 +01:00
Mickaël Schoentgen
412a9b819e Fix all DeprecationWarning: invalid escape sequence
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-01-05 12:02:42 +01:00
ita1024
e68dc88857 Merge branch 'cython' into 'master'
Cython enhancements

See merge request ita1024/waf!2196
2018-12-29 10:11:19 +00:00
Harald Klimach
3dbf2ee7f8 Support for the Fortran Compiler of the NEC SX-Aurora TSUBASA system. 2018-12-21 20:18:12 +01:00
fedepell
70f1522fa1 protoc: handle extra taskgen and out of project include directories 2018-12-21 06:16:08 +01:00
ita1024
b755748c4c Merge branch 'features/gccdeps' into 'master'
Use correct variable in gccdeps config

See merge request ita1024/waf!2203
2018-12-19 17:56:00 +00:00
ita1024
fe873242bc Merge branch 'protoc-eh-1' into 'master'
protoc: fix included protoc search on nested wscripts

See merge request ita1024/waf!2202
2018-12-19 17:44:23 +00:00
Daniel Welty
4b905773ea Use correct variable in gccdeps config
The global value gccdeps was appended to CFLAGS and CXXFLAGS instead of
the actual flags tested against the compiler.  This ignored
modifications to the GCCDEPS_FLAGS environment variable and complicated
adding support for additional compilers at the project level.
2018-12-19 11:14:43 -06:00
fedepell
ba1947b113 protoc: fix included protoc search on nested wscripts
previously code was erroneously using tg.bld.path instead of tg.path
so for nested wscript calls the wrong directory was used in search.

added also better error handling with error message if an included
directory does not exist
2018-12-19 15:45:48 +01:00
Thomas Nagy
82679503eb
docs 2018-12-19 11:30:45 +01:00
Romain Le Godais
b3d974a0b9 cython: use a set for mods instead of a list.
There can be multiple imports of the same module in a single file, so
avoid evaluating them multiple times.
2018-11-24 12:59:35 +01:00
Romain Le Godais
af74bbcbee cython: Enhance import regexp.
* avoid matching commented imports
* support `from foo.bar import baz` syntax.
2018-11-18 10:39:17 +01:00
Thomas Nagy
314bd31e6a
Find more Swig dependencies - Issue 2206 2018-11-06 00:20:31 +01:00
mmooij
02c20b8e85 Check if sources/include are Nonde3 type 2018-08-21 17:52:09 +02:00
Daniel Bartel
ef90934434 spawn a subprocess for cpplint to avoid threading issue 2018-08-10 23:49:52 +02:00
Matt Selsky
a10822f688 Fix typos 2018-07-28 19:47:10 -04:00
Matt Selsky
12b9f9aed1 Update GitHub URLs for GitLab equivalents 2018-07-08 14:53:13 -04:00
Jonathan Bendes
4b6ea4c7e8 Made options optional for cython waftool 2018-06-27 07:22:10 +02:00
fedepell
80aba755c1 doxygen: make error management if doxygen configuration file not found a bit more user friendly 2018-06-06 23:39:32 +02:00
fedepell
8b4d979dad doxygen: task_gen has no attribute generator, correct reference and make error message a bit more readable 2018-06-06 23:39:32 +02:00
Federico Pellegrin
2a18ea239a eclipse: make all generated file utf-8 encoded (#2166)
Eclipse generates them by default in utf-8 (or will resave them
as such the moment they are touched) so this is more conformant
to eclipse format.
2018-05-11 16:13:06 +02:00
fedepell
974e4d0d0b eclipse: give a better name to waf variable indicating the waf executable path 2018-05-11 13:45:09 +02:00
Federico Pellegrin
48a4f6a765 eclipse: generate an external builder when no CDT is used in the project (#2164)
When CDT is not included in the project (ie. we just have Python and/or Java) the current implementation would not create automatically a call to waf
for the build stage. This patch adds in such cases an external builder that automates the call to waf without the need to manually configure one.
2018-05-11 12:16:04 +02:00
fedepell
30b883a32d eclipse: add generation of external jar dependencies for java projects to eclipse file 2018-05-09 22:37:58 +02:00
fedepell
64a582ecc2 eclipse: add support for generated files management for java and python
added support to search and add into source path also generated source
files for both java and python. this is useful when using generated code
(ie. protoc and pyqt5) so browsing in eclipse works correclty adding also
paths where generated code is done.

extended example in playground demostrating generated code
2018-04-22 00:40:28 +02:00
fedepell
4682f543ce eclipse: handle case where python install_from is a Node object 2018-04-17 07:20:20 +02:00
fedepell
891f3e809d eclipse: correct feature name to javac not java
it was actually working anyway if the features were passed as a string (as in the playground example) but not if passed as a list
2018-04-16 18:45:43 +02:00
Thomas Nagy
bef6f1b4bf
Cleanup #2146 2018-04-07 10:35:07 +02:00
Eric Newberry
fab94287f8 detect arch-specific library path for Boost on dpkg-based systems 2018-04-07 10:34:09 +02:00
Daniel Vollmer
a4b0b675cf swig: c(xx) task inherits weight from swig itself
If any weights (i.e. `weight` or `tree_weight`) are set on a swig task
then those weights are passed on to the task created to compile the
wrapper generated by swig.
2018-03-29 13:24:54 +02:00
Thomas Nagy
90c80ea1ae
Apply priorities on dynamically-generated tasks #2137 2018-03-27 20:32:53 +02:00
Thomas Nagy
592136739b
Improve priority support in swig.py 2018-03-26 21:03:26 +02:00
Thomas Nagy
259b5468b8
Workaround for Swig priorities #2137 2018-03-26 20:52:11 +02:00
Thomas Nagy
2c640d8803
The cxx_hook override in slow_qt4 is missing a return bloack 2018-03-25 18:39:52 +02:00
fedepell
bb458769ee protoc: add .proto dependencies also in include path otherwise protoc will fail if dependency is in another directory 2018-03-22 23:13:40 +01:00
Thomas Nagy
8404aa4d5c
Cosmetic changes on the gdbus/dbus tools 2018-03-21 23:56:48 +01:00
Thomas Nagy
b806fe31d9
Moved gdbus to the playground area 2018-03-21 23:53:18 +01:00
Thomas Nagy
facdc0b173
Python 3.7 fixes #2126 2018-03-12 20:42:55 +01:00
Fangrui Song
5e4b86b81d Use "arguments" instead of "command" for compile_commands.json 2018-03-11 21:54:35 +01:00
fedepell
adbee3f23a protoc: protoc (ver 2 and 3) strips underscores when generating .java file names. consider this in node name generation otherwise the generated java file will not be found 2018-03-09 17:39:55 +01:00
Alexander Afanasyev
9e2da12800 Correction of boost module detection of Boost.Log
The previous logic in #1709 made an incorrect assumption that the
filename of shared/static library indicates that it was build as
multi-threaded or single threaded. This assumption does not hold in many
Linux distributions.

In addition to that. Boost.Thread and Boost.Log require -pthread (or
some other) flags in order to properly link.
2018-03-09 08:49:42 +01:00
Alexander Afanasyev
4c79d0dda4 Fix strangle issue with precompiled headers and shared libraries
When shared library compiled with precompiled headers enabled, this
change prevents precompiled headers to activate on dependent targets.
Otherwise, there is an issue with -fPIC flag propagation.
2018-03-09 08:48:24 +01:00
Andrew Keller
d525e2ccac xcode6: fix py3 support 2018-03-08 09:38:59 +01:00
fedepell
e9eca13d92 protoc: fix generation of include directories when having nested wscripts 2018-03-06 09:14:10 +01:00
fedepell
a02c6d8727 protoc: handle case of proto files in deep directories when output is generated with paths 2018-03-02 19:33:38 +01:00
Thomas Nagy
ae907a859e
Provide an example of storage using extended filesystem attributes 2018-02-17 22:35:52 +01:00
fedepell
0c07d0d7fb eclipse: don't rely on Context.g_module.out as it may not be defined if default used, used bldnode instead 2018-01-19 00:40:00 +01:00
fedepell
daa0c135e1 eclipse.py: support also if passed srcdir is a Node or a list of directories (which are valid inputs for javaw.py) 2018-01-19 00:40:00 +01:00
Thomas Nagy
d21446ff71
Update docs for 2018 2018-01-01 20:53:49 +01:00
Thomas Nagy
d35cd0cf12 Improve the Erlang module #2095 2017-12-20 00:13:47 +01:00
Przemyslaw Rzepecki
69157c7b68 Udated Erlang support.
This adds a scaner method to track Erlang heders dependencies.
Support for EUnit tests
Support for EDocs
Support for ERL, ERLC, ERLC_FLAGS environment settings.
2017-12-19 22:03:41 +01:00
danbar
fdf22b24c8 fix whitespaces 2017-12-19 16:27:15 +01:00
danbar
3dc4357ada use interface function of cpplint module 2017-12-19 16:27:15 +01:00
Thomas Nagy
ca6fe005ef
Cosmetic changes 2017-12-13 22:09:12 +01:00
Przemyslaw Rzepecki
c06a19b9d2 Added task target to output of parallel_debug.
Without the task name/target it is not obvious which steps in the build take
the most time.

Tested the SVG output with Firefox 52.
2017-12-13 22:06:22 +01:00
Calle Rosenquist
384e8d85ba buildcopy: Create destination directories as needed. 2017-11-30 19:09:56 +01:00
Matt Selsky
c98f8ba2ab Typos 2017-11-28 20:22:10 +01:00
Calle Rosenquist
f336f0bf62 pytest: Improved documentation, removed assumption on Python only
dep-nodes and locality of link task outputs always in build.
2017-11-20 22:04:35 +01:00
DragoonX6
b1efcfa6ab Change DEST_OS to use underscores in order to find a correct gcc_modifier_ function. 2017-10-23 14:03:47 +02:00
Thomas Nagy
e6bd4c6609
Add --dnotooltip to parallel_debug for tooltip-free images 2017-10-23 13:55:04 +02:00
Thomas Nagy
ec356383e2
object.__getattr__ -> object.__getattribute__ 2017-10-20 20:05:06 +02:00
fedepell
ffe88abe80 javatest: extra to integrate java unit testing into standard waf_unit_test environment 2017-10-19 08:28:53 +02:00
Matt Selsky
06f0390992 Typos 2017-10-19 08:27:57 +02:00
Thomas Nagy
0be92e74ac
Cosmetic changes for #2055 2017-10-18 21:06:12 +02:00
Roland Puntaier
34e6fd922a Use DEST_OS in cfg_cross_gnu (#2055)
* use DEST_OS in cfg_cross_gnu
* add an example
* rename cfg_cross_gnu to cross_gnu
* add configure()
* xcheck_envar -> xcheck_var
* xcheck_var to look in environ only if not already set
2017-10-18 20:54:12 +02:00
Thomas Nagy
210874d297
Fix #2053 2017-10-04 20:41:21 +02:00
Federico Pellegrin
a02b71a163 protoc: add java support for protobuffers (#2049)
* protoc: added java support

Modified protoc to support also .proto -> .java generation. the .java file
name generated is not obvious as in C++/Python but follows a couple of rules
that were implemented.

As cxx/python and javaw Tools are quite different the implementation is not
as clean as for cxx/python but is hopefully fine (ie. protoc still uses
sources for input files while javac uses src_dir).

In javaw a small detail was added: a new attribute was added (gencode) that
instructs javac to look for source files also in the build directory. This
are realistically generated code (and .proto -> .java is an example) and
are therefore in the build. Default is false keeping all the previous
behaviour.

* protoc for java enhanchments (protoc version, regex, docs)

In configure stage get protoc version as java naming changes depending on the
version. Implement the version differences between version < 2 and > 2

Improve regex for option catching and implement a mix of them in playground
to verify it.

Add some documentation on how java filenames and paths are generated.

* protoc: build dir with generated code is automatically added, so no need to explicitly use gencode in javac
2017-09-26 19:17:40 +02:00
Alan Ray
1e994e50fb Teach use_config to more gracefully fail during options() call #2043 2017-09-23 09:22:35 +02:00
Calle Rosenquist
89c755e714 pytest: Also add in-source library dependencies to libpath. buildcopy: Renamed to_nodes to to_src_nodes to avoid any confusion. 2017-09-23 09:22:16 +02:00
Thomas Nagy
c113442738
Prevent xcode6 from overwriting features lists #2038 2017-09-23 09:21:41 +02:00
Thomas Nagy
e64467892c
Warn against loading gccdeps/msvcdeps options 2017-09-23 09:21:14 +02:00
Thomas Nagy
18955dd91d
Attempt to make the syms tool a little more backward-compatible #2032 2017-09-20 00:06:50 +02:00
Thomas Nagy
4e387de1ce
Follow-up on #2028 2017-09-15 21:00:15 +02:00
Federico Pellegrin
4df813941e protoc: extend extra to support also Python language (#2028)
* protoc: extend extra to support also Python language
* protoc: fix ext_out, unite c++/python generation, fix protoc_includes name
2017-09-15 21:00:08 +02:00
Thomas Nagy
82df9d14fd
Remove an unused variable in buildcopy 2017-09-04 21:18:41 +02:00
Calle Rosenquist
82fd4054a7 pytest: Added better support for normal and pyext library dependencies.
This also includes the `buildcopy` feature that allows construction of complete Python packages in the build dir.
2017-09-04 21:08:10 +02:00
Thomas Nagy
5b935a1e6a
Optimize fast_partial.is_stale 2017-08-26 11:13:04 +02:00
Thomas Nagy
57087471c1
Remove Utils.ex_stack - use traceback.format_exc() 2017-08-19 11:54:58 +02:00
Thomas Nagy
bfe1512a55
Exclude waf-2 folders in waf-2.0 2017-08-19 10:11:36 +02:00
Roman C. Podolski
d2f48b5d89 Fix protoc #2009
Fix bug described in #2009 and extend example in playground to include
described scenario.
2017-08-17 19:56:07 +02:00
Thomas Nagy
c3fee6620c
Update protoc #2009 2017-08-16 19:45:03 +02:00
Thomas Nagy
03a3c604c4
Provide an example of build context sharding 2017-08-13 23:09:35 +02:00
Thomas Nagy
43d6363177 Re-enable the timestamp cache previously removed 2017-08-09 00:27:13 +02:00
Thomas Nagy
e22390ee44
Obtain store timestamps in a dedicated structure 2017-08-08 22:21:54 +02:00
Thomas Nagy
a28f9475f3 Fixup 2017-08-08 01:01:48 +02:00
Thomas Nagy
dcc09cb0df
Obtain the exact wscript file path 2017-08-07 08:28:03 +02:00
Thomas Nagy
6ed9a9231f
Split fast_partial data storage from the main pickle file 2017-08-06 11:48:25 +02:00
Joshua Watt
174f66c523 syms: Improve symbol processing
The export symbol regular expression processing is updated to make
several improvements:
  * The export expression (export_symbols_regex) now applies to both
    functions and global variables
  * A named capture group is used to match symbols. This allows the
    export expression to contain capture groups without disrupting the
    expression matching
2017-08-05 23:17:54 +02:00
Thomas Nagy
6d96b245cc
Invalidate the cache if a file is missing in fast_partial 2017-08-02 20:05:00 +02:00
Thomas Nagy
7003858752
Detect configuration changes 2017-08-02 01:23:32 +02:00
Thomas Nagy
5468e0031b
Typo process_uselib_vars -> propagate_uselib_vars #2005 2017-08-02 00:42:42 +02:00
Simon
fe1bb1b58a Fixed a crash when building a subset of xcode6 targets
E.g. when running 'waf xcode6 --targets=some-target'

  File "/waf/waflib/Scripting.py", line 167, in waf_entry_point
    run_commands()
  File "/waf/waflib/Scripting.py", line 268, in run_commands
    ctx = run_command(cmd_name)
  File "/waf/waflib/Scripting.py", line 252, in run_command
    ctx.execute()
  File "/waf/waflib/extras/xcode6.py", line 679, in execute
    self.post_group()
  File "/waf/waflib/Build.py", line 767, in post_group
    if self.current_group < self._min_grp:
AttributeError: 'xcode' object has no attribute '_min_grp'
2017-08-02 00:24:11 +02:00
Simon
73c276c11b Make xcode6 tool consider standard waf build flags
Build flags like 'cflags', 'cxxflags' passed to xcode6 builds
are now considered by the xcode6 tool. For example, running command 'waf xcode6'
with the following wscript:

cnf.env.CXXFLAGS = ['-std=c++11']
...
bld.program(..., cxxflags='-O3')

now sets the OTHER_CPLUSCPLUSFLAGS in Xcode to '-O3 -std=c++11'
2017-08-02 00:24:07 +02:00
Thomas Nagy
8289af2b98
Do not skip object-only targets 2017-08-02 00:22:33 +02:00
Thomas Nagy
8da1662894
Example of optimizations for partial builds 2017-07-30 20:11:29 +02:00
Roman C. Podolski
c6fb060710 Protoc: Fix bug in src-path
The tool was using an relative path for the includes, but an absolute
for the src-files. Protoc cannot distinguish between relative and
absolute paths and is not able to find sources when relative and
absolute paths are combined.

Tested with protoc 2.6.1, python 3.5.1
2017-07-23 13:25:05 +02:00
Sean Fisk
2c4ff3e28b Docs: Avoid Qt re-builds by sorting set of includes
Because Python's set type is unordered, storing include paths in it
can produce unnecessary re-builds by generating different compiler
command lines between successive builds. Avoid this by using the
sorted() function on the includes.

The documentation for Python ≥ 2.7 guarantees that sorted() is stable,
while for Python 2.5–2.6 it uses the same algorithm as list.sort(),
which is stable [1].

[1]: https://stackoverflow.com/a/1915418
2017-07-06 07:47:48 +02:00