diff options
author | Dinesh Dwivedi <dinesh.d@samsung.com> | 2015-03-31 17:40:30 +0200 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-03-31 18:03:56 +0200 |
commit | 70df9f48bae3a55ab9bd0e9ca555f6cfb8b2da4c (patch) | |
tree | 4a7690dbd610cf9316b668f6ac7cf676a9e50dce /src/bin/edje/epp/cpplib.c | |
parent | 22fafce84d015368ac4838d7fd129f76218df9da (diff) |
edje: add option to dump gnu style include dependencies in edje_cc.
Summary:
We were facing one problem in tizen sdk's build system as it does not trigger build for edc file
if only sub-edc files are changed. During analysis, we found that there is no option in edje_cc
for dumping include dependencies which other compiler (clang/ gcc etc) does have. We can do other
hack to solve this problem but it will be great if edje_cc can emit gnu style include dependency
target.
This patch will add support to generate gnu format include dependency file while compiling edc file.
similar to what gcc generates with option '-MMD -MF=<dep_file> -MT<dep_file>'
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Preprocessor-Options.html
Test Plan: no failure in existing test
Reviewers: raster, cedric
Reviewed By: cedric
Projects: #efl
Differential Revision: https://phab.enlightenment.org/D2263
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to '')
-rw-r--r-- | src/bin/edje/epp/cpplib.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/bin/edje/epp/cpplib.c b/src/bin/edje/epp/cpplib.c index af6dbfb582..22a4c7aacf 100644 --- a/src/bin/edje/epp/cpplib.c +++ b/src/bin/edje/epp/cpplib.c | |||
@@ -6502,10 +6502,10 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) | |||
6502 | /* The style of the choices here is a bit mixed. | 6502 | /* The style of the choices here is a bit mixed. |
6503 | * The chosen scheme is a hybrid of keeping all options in one string | 6503 | * The chosen scheme is a hybrid of keeping all options in one string |
6504 | * and specifying each option in a separate argument: | 6504 | * and specifying each option in a separate argument: |
6505 | * -M|-MM|-MD file|-MMD file [-MG]. An alternative is: | 6505 | * -M|-MM|-MT file|-MD file|-MMD file [-MG]. An alternative is: |
6506 | * -M|-MM|-MD file|-MMD file|-MG|-MMG; or more concisely: | 6506 | * -M|-MM|-MT file|-MD file|-MMD file|-MG|-MMG; or more concisely: |
6507 | * -M[M][G][D file]. This is awkward to handle in specs, and is not | 6507 | * -M[M][G][D file][T file]. This is awkward to handle in specs, and is |
6508 | * as extensible. */ | 6508 | * not as extensible. */ |
6509 | /* ??? -MG must be specified in addition to one of -M or -MM. | 6509 | /* ??? -MG must be specified in addition to one of -M or -MM. |
6510 | * This can be relaxed in the future without breaking anything. | 6510 | * This can be relaxed in the future without breaking anything. |
6511 | * The converse isn't true. */ | 6511 | * The converse isn't true. */ |
@@ -6532,6 +6532,15 @@ cpp_handle_options(cpp_reader * pfile, int argc, char **argv) | |||
6532 | argv[i]); | 6532 | argv[i]); |
6533 | opts->deps_file = argv[++i]; | 6533 | opts->deps_file = argv[++i]; |
6534 | } | 6534 | } |
6535 | /* For MT option, use file named by next arg as Target-name to write | ||
6536 | * with the dependency information. */ | ||
6537 | else if (!strcmp(argv[i], "-MT")) | ||
6538 | { | ||
6539 | if (i + 1 == argc) | ||
6540 | cpp_fatal("Filename missing after %s option", | ||
6541 | argv[i]); | ||
6542 | opts->deps_target = argv[++i]; | ||
6543 | } | ||
6535 | else | 6544 | else |
6536 | { | 6545 | { |
6537 | /* For -M and -MM, write deps on standard output | 6546 | /* For -M and -MM, write deps on standard output |