From 96414d1b53ab2d51f89405980d4d7b32524f3983 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 16 Sep 2023 12:39:09 +0100 Subject: [PATCH] Introduce i alias for mv $@ Signed-off-by: Ian Jackson --- Makefile | 18 +++++++++--------- diziet-utils/reprap-objects.make | 14 ++++++++------ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index b76ba16..8e727ab 100644 --- a/Makefile +++ b/Makefile @@ -61,12 +61,12 @@ pandemic-counter%.stl: $(PANDEMICCOUNTER_DXFS) .PRECIOUS: pandemic-counter-l%.eps pandemic-counter-l%.eps: pandemic-counter-letters.fig fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp - @mv -f $@.tmp $@ + @$i .PRECIOUS: maglite-holder-torch-curve.eps maglite-holder-torch-curve.eps: maglite-holder-torch.fig fig2dev -D +1:70 -L eps <$< >$@.tmp - @mv -f $@.tmp $@ + @$i maglite-holder-torch-curve.dxf: maglite-holder-torch-curve.eps pstoedit -dt -flat 0.05 -f "dxf: -polyaslines -mm" $< $@ @@ -84,11 +84,11 @@ pandemic-quarantine%.stl: $(PANDEMICQUARANTINES_DXFS) .PRECIOUS: pandemic-quarantine-l%.eps pandemic-quarantine-l%.eps: pandemic-quarantine-numbers.fig fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp - @mv -f $@.tmp $@ + @$i FILAMENTSPOOL_NUMBERS=$(shell seq 300 100 1500) filamentspool-number-n%.eps: filamentspool-number.eps.pl - ./$< $* >$@.tmp && mv -f $@.tmp $@ + ./$< $* >$@.tmp && $i FILAMENTSPOOL_DXFS=$(foreach n,$(FILAMENTSPOOL_NUMBERS), \ filamentspool-number-n$n.dxf) @@ -103,17 +103,17 @@ SCREWRECESSTEST_DXFS=$(foreach s,$(SCREWRECESSTEST_SIZES), \ screw-recess-test-number-s$s.dxf) screw-recess-test-number-s%.fig: screw-recess-test-number.fig.pl - ./$< $* >$@.tmp && mv -f $@.tmp $@ + ./$< $* >$@.tmp && $i screw-recess-test-number-s%.eps: screw-recess-test-number-s%.fig fig2dev -L eps <$< >$@.tmp - @mv -f $@.tmp $@ + @$i screw-recess-test-numbers screw-recess-test.stl: $(SCREWRECESSTEST_DXFS) question-question.eps: question-question.fig fig2dev -L eps <$< >$@.tmp - @mv -f $@.tmp $@ + @$i sewing-table%.stl: sewing-table-rear-profile.dxf sewing-table%.stl: sewing-table-front-profile.dxf @@ -121,7 +121,7 @@ sewing-table%.stl: sewing-table-end-profile.dxf sewing-table-%-profile.eps: sewing-table-%-profile.fig fig2dev -L eps -D +40 <$< >$@.tmp - @mv -f $@.tmp $@ + @$i question-token.stl: question-question.dxf @@ -146,5 +146,5 @@ poster-tube-lid,CatchPostDistort-fa%.stl: \ distort-stl poster-tube-lid,CatchPreDistort.auto.stl ./distort-stl $@.tmp - mv -f $@.tmp $@ + $i diff --git a/diziet-utils/reprap-objects.make b/diziet-utils/reprap-objects.make index 9d9bf54..f212f97 100644 --- a/diziet-utils/reprap-objects.make +++ b/diziet-utils/reprap-objects.make @@ -40,6 +40,8 @@ stls: $(addsuffix .auto.stl, $(AUTO_TOPLEVELS)) %.auto.stls: $(MAKE) $(addsuffix .auto.stl, $(shell $(DUTILS)/toplevel-find $*)) +i=mv -f $@.tmp $@ + -include .*.d %.stl: %.scad $(AUTO_INCS) @@ -52,28 +54,28 @@ stls: $(addsuffix .auto.stl, $(AUTO_TOPLEVELS)) AUTOBASE=$(shell echo $(1) | perl -pe 's/,\w+\.auto$$//') %: %.cpp - cpp -nostdinc -P <$< >$@.tmp && mv -f $@.tmp $@ + cpp -nostdinc -P <$< >$@.tmp && $i funcs.scad: diziet-utils/funcs.scad.cpp - cpp -nostdinc -P $< >$@.tmp && mv -f $@.tmp $@ + cpp -nostdinc -P $< >$@.tmp && $i %.gcode: manual-gcode-generator %.m-g - $(CWD)/$^ >$@.tmp && mv -f $@.tmp $@ + $(CWD)/$^ >$@.tmp && $i %.dxf: %.eps pstoedit -dt -f "dxf: -polyaslines -mm" $< $@ %: %.pl - ./$< >$@.tmp && mv -f $@.tmp $@ + ./$< >$@.tmp && $i %: %.m4 - $(M4) -P >$@.tmp $< && mv -f $@.tmp $@ + $(M4) -P >$@.tmp $< && $i .PRECIOUS: %.auto.scad %.auto.scad: $(DUTILS)/toplevel-make Makefile $(DUTILS)/toplevel-find @echo ' write $@' $< $@ >$@.tmp - @mv -f $@.tmp $@ + @$i .PRECIOUS: %.stl %.gcode %.eps %.dxf -- 2.30.2