moduleg++gnu-make

What does :| mean in g++ generated .d file


I encountered the following line in a g++ generated .d file

"/home/test/file27.gcm":| /home/test/file27.o

What does ':|' means compared to ':'

I could not find any mention of it in gnu make manual


Solution

  • In g++ generated .d files, : | denotes an order-only dependency in GNU Make, meaning the dependency after | must exist but won't trigger a rebuild if modified. This is commonly used for directories or indirect prerequisites that don't affect the target's content but are required for the build process.