1.41 -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 -mcpu=cortex-a53 -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 -mcpu=cortex-a53 -M -MP source.c
				
source.o: source.c \
  /include/stdio.h

/include/stdio.h:
Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.