[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-task-tracker] [task #14501] Review #include declarations in code
From: |
Rik |
Subject: |
[Octave-task-tracker] [task #14501] Review #include declarations in code base |
Date: |
Thu, 11 May 2017 14:22:12 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 |
Follow-up Comment #3, task #14501 (project octave):
Unfortunately, it wasn't very automated.
Steps:
1) make clean
2) make -j1
2a) Use Ctrl+C to stop compilation after gnulib (first target in SUBDIRS)
has been built
3) Run make, but substitute include-what-you-use for the actual C++ compiler
make -k -j1 V=1 CXX="/usr/bin/iwyu -std=c++11 -Xiwyu --check_also='*.h'"
CPPFLAGS="-I/usr/lib/llvm-3.5/lib/clang/3.5.2/include" | &tee inc.log
4) Postprocess inc.log to extract the interesting bits. I used this Perl
script.
#!/usr/bin/perl -w -n
$do_print = /should add these lines:/ .. /^---$/;
print $_ if ($do_print);
5) Further postprocess the include list to remove the repeated elements. I
used this Perl script.
#!/usr/bin/perl -w -n
$in_config = /^\Qconfig.h should add these lines\E/ .. /^---$/;
$in_octconfig = /^\Qoctave-config.h should add these lines\E/ .. /^---$/;
$in_post = /^\Qoct-conf-post.h should add these lines\E/ .. /^---$/;
next if ($in_config || $in_octconfig || $in_post);
print $_;
As you can see, not that easy.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/task/?14501>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/