1

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?

2
  • Remove the p5.py dependency?
    – user657267
    Commented Apr 1, 2018 at 5:28
  • then it wouldnt be dependent on p5.py which it is ....
    – Rorschach
    Commented Apr 1, 2018 at 9:39

1 Answer 1

1

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}

Not the answer you're looking for? Browse other questions tagged or ask your own question.