summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <benjamin@barenblat.name>2016-08-16 16:47:51 -0400
committerGravatar Benjamin Barenblat <benjamin@barenblat.name>2016-08-16 16:47:51 -0400
commit5bdb7576c4bfd0ec032f30650308626daf9ad4b1 (patch)
treec1d2744b73f6b87ae95d91acdbce63ccbe2584df
parenta5e0977ba856e49384475f9e054054edbc0fabe0 (diff)
Makefile: Don’t rebuild unnecessarily
Prevent ugtd from depending on the PHONY target ‘mdl’, thereby eliminating spurious rebuilds.
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f916930..36bd738 100644
--- a/Makefile
+++ b/Makefile
@@ -12,15 +12,17 @@
# License for the specific language governing permissions and limitations under
# the License.
-ugtd: ugtd.urp mdl main.urs main.ur
+MDL = mdl/lib.urp mdl/mdl.ur
+
+ugtd: ugtd.urp $(MDL) main.urs main.ur
urweb -ccompiler build_scripts/clang -output $@ ugtd
.PHONY: mdl
-mdl: mdl/lib.urp mdl/mdl.ur
-mdl/lib.urp mdl/mdl.ur: mdl/classes
+mdl: $(MDL)
+$(MDL): mdl/classes
build_scripts/generate_mdl <$<
.PHONY: clean
clean:
- $(RM) mdl/lib.urp mdl/mdl.ur
+ $(RM) $(MDL)
$(RM) ugtd