Commit graph

11 commits

Author SHA1 Message Date
Bruce Richardson 2abaf2eba2 mk: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for Makefiles
with only an Intel copyright on them.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-04 22:41:39 +01:00
Olivier Matz feb9f680cd mk: optimize directory dependencies
Before this patch, the management of dependencies between directories
had several issues:

- the generation of .depdirs, done at configuration is slow: it can take
  more than one minute on some slow targets (usually ~10s on a standard
  PC without -j).

- for instance, it is possible to express a dependency like:
  - app/foo depends on lib/librte_foo
  - and lib/librte_foo depends on app/bar
  But this won't work because the directories are traversed with a
  depth-first algorithm, so we have to choose between doing 'app' before
  or after 'lib'.

- the script depdirs-rule.sh is too complex.

- we cannot use "make -d" for debug, because the output of make is used for
  the generation of .depdirs.

This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.

After this commit, "make config" is almost immediate.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Robin Jarry <robin.jarry@6wind.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-03-27 23:28:43 +02:00
Ferruh Yigit 64592d97c1 mk: do not build tests by default
Don't build tests with default "make" command.

Require explicit command to build tests because not everybody interested
in running unit tests.

Following changes done in make rules:
"make test-build"  <--- Added
"make test"        <--- Updated functionality (build + run basic tests)

Now "make test" builds all tests and runs unit test (test).

Thanks to dependency resolving, it is possible to call "make test"
directly after config, "make test" will compile dependent components
(lib and drivers, but not apps).

And a new "make test-build" make rule added which will build
tests but not run unit test. "make test-build" has same dependency
resolving features with "make test"

To include "test" folder into makesystem, existing ROOTDIRS- variable
is used instead of hardcoding folder name into makefiles, current usage
of ROOTDIRS* variables are:

ROOTDIRS-y <-- root level folders prepared and compiled by default
ROOTDIRS-  <-- root level folders prepared but not compiled by default

The preparation is required for dependency resolving and cleaning.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-02-28 16:04:18 +01:00
Ferruh Yigit 8fdb4a9b1e mk: parallelize make config
make config dependency resolving was always running serial,
parallelize it for better performance.

$ time make T=x86_64-native-linuxapp-gcc config
real    0m12.633s

$ time make -j8 T=x86_64-native-linuxapp-gcc config
real    0m1.826s

When config creation done under a single make target, using a for loop,
make has no control on the action, and it needs to run as implemented in
the rule. But if for loop converted into multiple targets, make can
detect independent targets and run them parallel based on -j parameter.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-01-30 19:13:35 +01:00
Bruce Richardson 3031749c2d remove trailing whitespaces
This commit removes trailing whitespace from lines in files. Almost all
files are affected, as the BSD license copyright header had trailing
whitespace on 4 lines in it [hence the number of files reporting 8 lines
changed in the diffstat].

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
[Thomas: remove spaces before tabs in libs]
[Thomas: remove more trailing spaces in non-C files]
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-06-11 00:29:34 +02:00
Thomas Monjalon 4b38b32eb7 mk: fix dependencies when modifying config
If .config file is changed and .depdirs was built before,
it must be updated.
It is now done silently (-s) in checkconfig rule.
Now .depdirs is not redone if .config is older.

It has been tested by enabling PMD_PCAP after a default build.
KVARGS dependency should appear in .depdirs.

There is also a typo fix for PHONY rule.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2014-03-26 23:10:41 +01:00
Bruce Richardson e9d48c0072 update Intel copyright years to 2014
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2014-02-25 21:29:14 +01:00
Intel 1c1d4d7a92 doc: whitespace changes in licenses
Signed-off-by: Intel
2013-10-09 14:51:55 +02:00
Intel b6df9fc871 update copyright date to 2013
Signed-off-by: Intel
2013-07-25 16:07:52 +02:00
Intel dada9ef6ed remove version in all files
Signed-off-by: Intel
2013-07-05 11:59:50 +02:00
Intel af75078fec first public release
version 1.2.3

Signed-off-by: Intel
2013-03-11 17:19:20 +01:00