Commit Graph

9 Commits

Author SHA1 Message Date
Daniel Verkamp
1573df0f27 genconfig.py: use print() for Python 3 compat
Change-Id: I25a6374a4485829c0509b7e820f345c74bb1fda7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/363488
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-02 19:46:47 -04:00
Yuliya Navrotskaya
2a0d341f98 Fix for pre-2.7 Python versions which require positional argument specifiers (#149) 2017-04-25 17:22:35 -07:00
Ben Walker
9dd998cdc0 Add a configure script to generate the CONFIG file
Add a configure script in the root of the repository
that looks and feels like one that would be generated
by autotools. This script simply generates a CONFIG
file for you, which used to be done by hand.

Now to build SPDK you can do the following:

./configure --with-dpdk=path
make

Change-Id: I44ebb91f0cb1468b86da4c0033ac1406595d4967
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-03 13:30:12 -07:00
Daniel Verkamp
f348a09b50 scripts/genconfig.py: fix format specs for older Python
Python versions older than 2.7 require numbered format specifiers.

Change-Id: I74dd204836c202a79c31c08f0096c31fcb325385
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-13 10:36:10 -07:00
Daniel Verkamp
49369134cf genconfig: add special case for DPDK_DIR shorthand
Change-Id: Iaf7195316c757b22cb601318c38762b3fd6f7c0e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-01 12:41:51 -07:00
Daniel Verkamp
0ee75c5fc4 genconfig: pick up defaults from the environment
This matches the behavior of Make and ensures that we rebuild correctly
when the configuration is only modified in the environment.

Change-Id: Iaf63c488b7c817d6c74a89da2d1de8e4c01be045
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-01 12:41:51 -07:00
Daniel Verkamp
1e9c049638 genconfig: simplify argument parsing
Split the arguments into var=val once at startup and put them in a dict.

Change-Id: Ic6b337e010a185448c1dab20659575081f03a645
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-01 12:41:51 -07:00
Daniel Verkamp
806eb493ca genconfig: undef bool options so #ifdef works
Instead of always defining config values, only #define options that are
enabled, so that #ifdef/#ifndef can be used.  Generate #undef lines for
the disabled variables so the names are still visible in config.h.

Change-Id: Iaf56597ea6ae57b384387cc8a292d63960b611e4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-24 10:42:18 -07:00
Daniel Verkamp
92a02f580c build: generate config.h and implicitly include it
All source files will now depend on config.h, which is generated based
on the defaults in CONFIG and the command line arguments passed to make.

This ensures that any configuration changes, including on the command
line, cause a full rebuild.

Change-Id: I6b6fa3290941200dbcf32297c66df8dc5ee18e94
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-08 10:26:50 -07:00