I have this setup in my Makefile.
action1:
does something
action2: action1
does something else
I want to keep my configuration in case I want to use action1
as a dependency for action2
, but sometimes I'd like to ignore action1 when running make action2
(e.g. I'd like to run make action2
without having to include action1
). Can I setup some kind of flag to pass in to ignore the dependency when running target and how can I go about doing that?
make -o <name of dependency>
lets you ignore a dependency and all its implications. From the man page:
-o file, --old-file=file, --assume-old=file
Do not remake the file file even if it is older than
its dependencies, and do not remake anything on account
of changes in file. Essentially the file is treated as
very old and its rules are ignored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With