1.31 -MP

Emits dummy dependency rules.

These rules work around make errors that are generated if you remove header files without a corresponding update to the makefile.

Note

The -MP option only has an effect when used in conjunction with the -M, -MD, -MM, or -MMD options.

Examples

This example sends dependency rules to standard output, without compiling the source.
source.c includes a header file:
#include <stdio.h>

int main(void){
	puts("Hello world\n");
	return 0;
}
This first example is compiled without the -MP option, and results in a dependency rule for source.o:
armclang --target=aarch64-arm-none-eabi -M source.c
				
source.o: source.c \
  /include/stdio.h
This second example is compiled with the -MP option, and results in a dependency rule for source.o and a dummy rule for the header file:
armclang --target=aarch64-arm-none-eabi -M -MP source.c
				
source.o: source.c \
  /include/stdio.h

/include/stdio.h:
Non-ConfidentialPDF file icon PDF versionARM DUI0774E
Copyright © 2014-2016 ARM. All rights reserved.