Write a script [url removed, login to view] in the ~ / tema4 / headers / which find absolute path of each file header included in a source file included C. If the header file is a symlink to be found by file path pointed to. The paths will be printed to stdout, one path per line. The script will receive path to a source file and can receive parameters (any) form -ipath having the same meaning as for gcc -i option to specify where the search for additional ways headers. (See man gcc / -I). After -i can follow a path absoulute or relative. Such data paths precedence over the default paths for headers in the system (it will look into them first). In terms of the routes passed by him, he has the first priority of the call path.
Default paths where you can find the usovm headers are in this order:
For example, whether a file named both existing test.h director / and directory b / and included the source file test.c.
$ ./[url removed, login to view] -Ia/ -Ib/ test.c
$ ./[url removed, login to view] -Ib/ test.c -I/path/to/dir/a/
The power of this task will be as follows:
[5p] The correct operation for simple file with headers that can only exist in the default paths or include sites form #include "header.h" (only the current directory). The script will be:
$ ./[url removed, login to view] <C_file>
[7p] The correct operation when -Ipath pass arguments of the form. The headers will not be included in subdirectories, that will not be in the file C lines form #include <dir / header.h> .Exemple of runs available:
$ ./[url removed, login to view] <C_file> -I.
$ ./[url removed, login to view] -I. <C_file>
$ ./[url removed, login to view] <C_file> -I. -Imydir/
$ ./[url removed, login to view] -I. <C_file> -Imydir -Iyourdir/
[8p] Operation correct and complete script with arguments -Ipath shape and form included with headers #include <dir / header.h>
it has few tasks to do one of the tasks where this which i told, for more information you can contact me