pysetup.mk: Add an explicit `gen' target, and make `all' depend on it.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 14 Oct 2019 10:37:41 +0000 (11:37 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 8 May 2020 11:30:13 +0000 (12:30 +0100)
I plan to add support for multiple `python' versions building in
parallel in the same working tree.  But generated files are shared
between `python' versions, and there will be a mess if things happen in
the wrong order.

pysetup.mk

index 0e7a218..09dd7b0 100644 (file)
@@ -15,8 +15,12 @@ distdir                      := $(shell $(PYTHON) setup.py -q distdir)
 ###--------------------------------------------------------------------------
 ### Useful targets implemented by the `setup.py' program.
 
+PYTARGETS              += gen
+CMD-gen                        ?= build_gen
+
 PYTARGETS              += all
 CMD-all                        ?= build
+all:: gen
 
 PYTARGETS              += clean
 OPTS-clean             ?= --all