Commit Graph

16 Commits

Author SHA1 Message Date
Artur Paszkiewicz
339fb7cd15 genconfig.py: allow numbers in config option names
To make it possible to add CONFIG_RAID5.

Change-Id: I1712bde5bae552811343fb1865f1224d3adb1c7e
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/854
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-20 14:40:19 +00:00
James Bergsten
0c93fc7330 scripts:Fix Python errors in checking scripts
Python3 (3.6.7) gives W605 errors in regular expressions, causing the
SPDK style checks to fail on the Python scripts doing the style checking.

This fix allows these Python scripts to run without errors.

This is a known issue - see https://github.com/PyCQA/pycodestyle/issues/814

Change-Id: I71cdff5d6c89e19b200c989f3d9da35bb4f7189d
Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443955
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-12 18:37:09 +00:00
Pawel Wodkowski
ddd38a5e9d configure: remove CONFIG.local symlink
nvme-cli is updated to use mk/config.mk so we can now remove
CONFIG.local symlink.

Change-Id: I7d39c2559e43198b9e0bc4519edaa1cb3180de07
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/428373
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-19 14:26:14 +00:00
Jim Harris
840b922551 genconfig.py: only use CONFIG.local
Everything we need is in CONFIG.local - so just use that
file.  This allows us to remove the for loop as well.

CONFIG.local is currently a symlink to mk/config.mk - that
will be changed in the patch that removes the symlink.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia7f84eac85d322f2873f089ab62c99a69c4d9ef9

Reviewed-on: https://review.gerrithub.io/429947
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-10-19 14:26:14 +00:00
Pawel Wodkowski
b96f97cf29 scripts: use python3 in all scripts
This it to prepare for RPM package. Also lower number of dependencies
needed by SPDK tools.

Update changelog to deprecate Python 2 and explicit interpeter invoking
in scripts.

Change-Id: I2497cca721cbcbadc1c99c675f8b8b7f682d5efa
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/425233
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-14 22:24:30 +00:00
Jim Harris
ff6299f831 build: remove DPDK_DIR
This is an artifact from before SPDK had a configure
script or a DPDK submodule.  Make configure the
only supported way for specifying the location of the
DPDK installation to use with SPDK.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5c197c46220928bb18b97c8807755967d76ea42c

Reviewed-on: https://review.gerrithub.io/424893
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-09-07 16:01:28 +00:00
Jim Harris
75cb574660 build: sort dictionary in genconfig.py before printing
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8a698531b261c303babac3c5c1594919430c0bac

Reviewed-on: https://review.gerrithub.io/398855
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-08 12:05:54 -05:00
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