Commit Graph

136 Commits

Author SHA1 Message Date
Jose Fonseca
ace5138548 scons: Fix force_scons parsing.
- Use parsed options instead of using ARGUMENTS directly.
- Handle the case of mingw cross compilation.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2003
2019-10-26 08:23:48 +01:00
Dylan Baker
61ed9891c7 scons: Also print a deprecation warning on windows
This warning is different. Meson support for windows is less mature than
for other platforms, and the goal here is to alert people that
eventually we plan to drop scons and move to meson, and that they should
try out meson and report issues.

Reviewed-by: Eric Anholt <eric@anholt.net>
2019-10-24 18:33:50 +00:00
Dylan Baker
54053bc8d0 scons: Print a deprecation warning about using scons on not windows
At this point meson should be able to handle all of the non-windows
platforms just fine; we'd like to be able to stop maintaining scons for
those platforms sooner than later.

Reviewed-by: Eric Anholt <eric@anholt.net>
2019-10-24 18:33:50 +00:00
Dylan Baker
79e73887e7 scons: Use print_function ins SConstruct
This ensures that we get python3's print() function behavior even in
python2, instead of python2's print statement behavior. We'll be using
this in the next patch.

Reviewed-by: Eric Anholt <eric@anholt.net>
2019-10-24 18:33:50 +00:00
Adam Jackson
5b5c5bf833 docs: Update bug report URLs for the gitlab migration
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-09-19 16:37:36 +00:00
Dylan Baker
64e4638130 scons: Require python 2.7
less than 2.7 is not supported.

v2: - Remove check for python >= 2.0, since we've already enforced 2.7

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2018-08-16 13:52:56 -07:00
Juan A. Suarez Romero
810c9a4eba scons: require scons 2.4 or greater
There is a bug with scons 2.3, used in Travis, where it fails to detect
some C functions.

Reviewed-by: Andres Gomez <agomez@igalia.com>
2018-08-01 20:33:00 +02:00
Eric Engestrom
e361047568 scons: use python3-compatible lists
These changes were generated using python's `2to3` tool.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-09-25 12:05:44 +01:00
Eric Engestrom
7d48219b3a scons: use python3-compatible print()
These changes were generated using python's `2to3` tool.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102852
Reported-by: Alex Granni <liviuprodea@yahoo.com>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-09-25 11:57:12 +01:00
Giuseppe Bilotta
8c00fe3970 scons: whitespace cleanup
This text transformation was done automatically via the following shell
command:

$ find -name SCons\* -exec sed -i s/\\s\\+$// '{}' \;

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-25 12:23:12 -06:00
Jose Fonseca
50ddf03ada scons: Add a "check" target to run all unit tests.
Except:
- u_cache_test -- too long
- translate_test -- unreliable (it's probably testing corner cases that
  translate module doesn't care about.)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2016-04-14 07:19:04 +01:00
José Fonseca
979692a52a scons: Don't use bundled C99 headers for VS 2013.
Use the ones provided by the compiler instead.

NOTE: External trees should be updated to not include '#include/c99'
directory directly, but rather rely on scons/gallium.py to do the right
thing.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-05-02 22:04:46 +01:00
José Fonseca
2de70fe23f mapi/glapi: Use ElementTree instead of libxml2.
It is quite hard to meet the dependency of the libxml2 python bindings
outside Linux, and in particularly on MacOSX; whereas ElementTree is
part of Python's standard library.  ElementTree is more limited than
libxml2: no DTD verification, defaults from DTD, or XInclude support,
but none of these limitations is serious enough to justify using
libxml2.

In fact, it was easier to refactor the code to use ElementTree than to
try to get libxml2 python bindings.

In the process, gl_item_factory class was refactored so that there is
one method for each kind of object to be created, as it simplifies
things substantially.

I confirmed that precisely the same output is generated for GL/GLX/GLES.

v2: Remove m4/ax_python_module.m4 as suggested by Matt Turner.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-26 13:51:32 +00:00
Emil Velikov
488b3ed6f4 build: unify mesa version by using a VERSION file
Rather than having to keep track of all the build systems and their respecitve
definition of the mesa version, use a single top file VERSION. Every build
system is responsible for reading/parsing the file and using it

v2:
* remove useless bulletpoint from the documentation, suggested by Matt
* "Androing is Linux. Use '/' in stead of '\'", spotted by Chad V
* use cleaner code to get the version in scons, suggested by Chad V

v3:
* ensure leading and trailing whitespace characters are stripped while parsing
* android: handle GNU shell commands approapriately

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-07-29 13:39:29 -07:00
Kenneth Graunke
a8c8c5f8d2 mesa: Bump version to 9.3.0-devel.
This should have been done when making the 9.2 branch, but was missed.
2013-07-25 13:34:53 -07:00
Andreas Boll
c0f7ccc136 build: Unify PACKAGE_VERSION on autotools, scons and Android
This patch unifies mesa's PACKAGE_VERSION on autotools, scons and
Android build systems.

Current behaviour is:
 - Autotools uses 9.2.0 as PACKAGE_VERSION
 - Scons and Android use 9.2-devel as PACKAGE_VERSION

With this patch all three build systems use 9.2.0-devel as
PACKAGE_VERSION.

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-06-06 19:07:14 +02:00
José Fonseca
cff70dcfb2 scons: Define PACKAGE_VERSION/BUGREPORT globally.
Fixes the scons build.
2013-03-13 13:13:37 +00:00
José Fonseca
b115662607 scons: Disable saving options automatically.
It makes things too random, as settings for temporary trials get stored
permannently, and it make difficult to build several platforms from the
same tree.

So disable it, again.
2011-07-01 19:04:57 +01:00
José Fonseca
10562fbc5c scons: List all targets. 2011-06-17 20:13:16 +01:00
José Fonseca
ef4bf40db0 scons: Remember the options set on the command line.
Save them in config.py
2011-06-17 20:13:16 +01:00
José Fonseca
8173471fc2 scons: Move all env setup to scons/gallium.py 2011-06-17 16:41:05 +01:00
José Fonseca
4175010749 scons: make embedding orthogonal to the platform
To enable embedding in platforms other than linux.
2011-06-17 14:50:37 +01:00
José Fonseca
9f9d6481de scons: Avoid depending on scons 2.0 in general. 2011-02-16 18:02:01 +00:00
José Fonseca
6826d58bbf scons: Need c99 also when cross compiling. 2011-02-11 20:09:26 +00:00
José Fonseca
982609f4cf scons: builtin_glsl_function on windows needs bundled getopt. 2011-02-11 20:09:26 +00:00
José Fonseca
ae760279f1 scons: Try to support building 64bit binaries on 32bit windows. 2011-02-11 20:09:26 +00:00
Chia-I Wu
bb770af3a5 scons: Add support for GLES.
GLES can be enabled by running scons with

  $ scons gles=yes

When gles=yes is given, the build is changed in three ways.  First,
libmesa.a will be built with FEATURE_ES1 and FEATURE_ES2.  This makes
DRI drivers and libEGL support and advertise GLES support.  Second, GLES
libraries will be created.  They are libGLESv1_CM, libGLESv2, and
libglapi.  Last, libGL or opengl32 will link to libglapi.  This change
is required as _glapi_* will be declared as __declspec(dllimport) in
libmesa.a on windows.  libmesa.a expects those symbols to be defined in
another DLL.  Due to this change to GL, GLES support is marked
experimental.

Note that GLES requires libxml2-python to generate some of its sources.
2011-01-22 11:59:05 +08:00
José Fonseca
e1bc68b014 scons: Fix cross-compilation.
Hairy stuff. Don't know how to do it better though.
2011-01-13 20:53:42 +00:00
José Fonseca
792caebced scons: Move MSVS_VERSION option to common module. 2010-12-01 12:23:12 +00:00
José Fonseca
601498ae73 scons: Revamp how to specify targets to build.
Use scons target and dependency system instead of ad-hoc options.

Now is simply a matter of naming what to build. For example:

  scons libgl-xlib

  scons libgl-gdi

  scons graw-progs

  scons llvmpipe

and so on. And there is also the possibility of scepcified subdirs, e.g.

  scons src/gallium/drivers

If nothing is specified then everything will be build.

There might be some rough corners over the next days. Please bare with me.
2010-11-01 13:30:22 +00:00
José Fonseca
67450f0644 scons: New build= option, with support for checked builds.
Where checked build is compiler optimizations plus debugging checks --
ideal for testing CPU bound loads and running test automation loads.
2010-09-29 14:17:26 +01:00
Brian Paul
14056e052b scons: added galahad to driver list 2010-09-03 16:25:44 -06:00
José Fonseca
90437330e2 graw: Undo late loading of graw drivers.
Keith prefers a clean separation between graw applications and
implementations, where apps do not link libgallium.a but instead
get all functionality they need via graw interface.

Although this is not incompatible with late loading of graw drivers, it
it would make it very hard to maintain, as wrappers for every utility
symbol exposed in graw would have to be written or generated somehow.
2010-08-26 11:37:42 +01:00
José Fonseca
43d94dba5f graw: Remove graw-null.
Pointless now that the graw tests can be built independently of any graw
implementation.
2010-08-26 06:47:24 +01:00
José Fonseca
3a3cdb909d scons: Build the new glsl2 code. 2010-08-13 13:55:34 +01:00
Jakob Bornecrantz
40d4b414d9 glhd: Build with scons 2010-06-28 22:27:06 +02:00
Keith Whitwell
00fe54a879 graw: update graw_null after interface changes and build graw tests again 2010-06-07 16:43:49 +01:00
Joakim Sindholt
fb08e03ae1 gallium: always build drivers/sw 2010-06-05 17:19:46 +02:00
Chia-I Wu
1e6c10f4be egl: Use SConscript for Windows build.
Fix several portability issues and add SConscript for Windows build.
2010-05-31 13:27:41 +08:00
Jakob Bornecrantz
aeee52691c r600g: Integrate into build
Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
2010-05-27 23:24:12 +02:00
Brian Paul
7c226d0ab8 mesa: disable building the removed demos with scons 2010-05-21 14:12:16 -06:00
Keith Whitwell
39087f636a scons: add 'targets' variable, for specifying ... targets
Ideally scons should be able to work backwards from the list of
targets to figure out which drivers, state trackers and other
convenience libraries need to be built.
2010-05-14 12:19:57 +01:00
Jakob Bornecrantz
2ebe0277d4 scons: Add -fvisibility=hidden to CFLAGS for gcc builds 2010-05-12 22:49:32 +01:00
Jakob Bornecrantz
9f7f711020 rbug: No need to have rbug as a input 2010-05-12 21:12:31 +01:00
Jakob Bornecrantz
2c3fb4ecce rbug: Break out of trace 2010-05-12 20:15:23 +01:00
Vinson Lee
5fd97573e3 scons: Include headers from the local include directory first.
Certain headers, such as GL/glew.h, are in both the Mesa include and the
default installed include directories. On recent distros the needed
symbols can be found in both places. On older distros the installed
headers could be lacking symbols, so for a header that exists in both
places, the local one should be found first.
2010-04-26 01:08:34 -07:00
Vinson Lee
bd93670bfd nvfx: Add to SCons build. 2010-04-24 16:22:47 -07:00
Vinson Lee
ac942f5aa2 nv50: Add to SCons build. 2010-04-24 14:38:48 -07:00
Vinson Lee
e3eed8bf21 nouveau: Add to SCons build. 2010-04-24 01:15:00 -07:00
José Fonseca
47a89e9255 scons: Always build softpipe and llvmpipe (when llvm available).
These are our reference software rasterizers. They can build everywhere
and are a precious debugging tool.

Making them always present immensily simplifies the scons logic.

If people want to avoid building it is still possible to pass
direcotries and target names to scons to narrow the build.
2010-04-11 17:17:35 +09:00