From 5bdb7576c4bfd0ec032f30650308626daf9ad4b1 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Tue, 16 Aug 2016 16:47:51 -0400 Subject: Makefile: Don’t rebuild unnecessarily MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent ugtd from depending on the PHONY target ‘mdl’, thereby eliminating spurious rebuilds. --- Makefile | 10 ++++++---- 1 file 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 -- cgit v1.2.3