Home > arm-linux-gnueabi-cpp > arm-linux-gnueabi-cpp -M

arm-linux-gnueabi-cpp(1) -M
The C Preprocessor
-M  Instead of outputting the result of preprocessing, output a rule suitable for make describing the
    dependencies of the main source file.  The preprocessor outputs one make rule containing the object
    file name for that source file, a colon, and the names of all the included files, including those
    coming from -include or -imacros command line options.

Related

cpp [-Dmacro[=defn]...] [-Umacro] [-Idir...] [-iquotedir...] [-Wwarn...] [-M|-MM] [-MG] [-MF filename] [-MP] [-MQ target...] [-MT target...] [-P] [-fno-working-directory] [-x language] [-std=standard] infile outfile
Many options have multi-letter names; therefore multiple single-letter options may not be grouped: -dM is very different from -d -M.
Passing -M to the driver implies -E, and suppresses warnings with an implicit -w.
-MM Like -M but do not mention header files that are found in system header directories, nor header files that are included, directly or indirectly, from such a header.
-MF file When used with -M or -MM, specifies a file to write the dependencies to. If no -MF switch is given the preprocessor sends the rules to the same place it would have sent preprocessed output.
-MG In conjunction with an option such as -M requesting dependency generation, -MG assumes missing header files are generated files and adds them to the dependency list without raising an error. The dependency filename is taken directly from the "#include" directive without prepending any path. -MG also suppresses preprocessed output, as a missing header file renders this useless.
-MD -MD is equivalent to -M -MF file, except that -E is not implied. The driver determines file based on whether an -o option is given. If it is, the driver uses its argument but with a suffix of .d, otherwise it takes the name of the input file, removes any directory components and suffix, and applies a .d suffix.
Note that you can also specify places to search using options such as -I, and control dependency output with options like -M. These take precedence over environment variables, which in turn take precedence over the configuration of GCC.
SUNPRO_DEPENDENCIES This variable is the same as DEPENDENCIES_OUTPUT (see above), except that system header files are not ignored, so it implies -M rather than -MM. However, the dependence on the main input file is omitted.

Tips or Questions?


Powered by ExplainShell