I’m reviewing the tutorial “Advanced Auto-Dependency Generation” and found a script with this:
%.P : %.c
....; [ -s $@ ] || rm -f $@
What does that part of the target do? I know I’ve seen this syntax:
[...]||... before in bash scripts, but I can’t recall how it works exactly…
Thanks in advance!!
If the preceding command fails (i.e.
[), the following command is executed (rm). Failure is a non-zero return code.