Rorschach
Rorschach

Reputation: 32416

Makefile specify dependency to ignore automatic dependency rule

say I have the Makefile

p5: p5.py
    . ${SRCDIR}/$^

%.py: clean
    spark-submit ${SRCDIR}/$@ ${SPARK_OPTS}

How can I have p5 run without calling the default rule for *.py files?

Upvotes: 1

Views: 70

Answers (1)

Renaud Pacalet
Renaud Pacalet

Reputation: 28935

If the default rule your are mentioning is the %.py: rule, then you can simply add an empty rule for p5.py:

p5: p5.py
    . ${SRCDIR}/$^

p5.py:;

%.py: clean
    spark-submit ${SRCDIR}/$@ ${SPARK_OPTS}

Upvotes: 1

Related Questions