chiark / gitweb /
Introduce o alias for capturing stdout to $@
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Sep 2023 11:40:48 +0000 (12:40 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Sep 2023 11:40:48 +0000 (12:40 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
reprap-objects.make

index f212f9740ba03ff8454596d33c6d53dddc03e801..d47a23cfc735040cc73b40466e0298f4f11d99fa 100644 (file)
@@ -41,6 +41,7 @@ stls:         $(addsuffix .auto.stl, $(AUTO_TOPLEVELS))
        $(MAKE) $(addsuffix .auto.stl, $(shell $(DUTILS)/toplevel-find $*))
 
 i=mv -f $@.tmp $@
+o= >$@.tmp && $i
 
 -include .*.d
 
@@ -54,19 +55,19 @@ i=mv -f $@.tmp $@
 AUTOBASE=$(shell echo $(1) | perl -pe 's/,\w+\.auto$$//')
 
 %:             %.cpp
-               cpp -nostdinc -P <$< >$@.tmp && $i
+               cpp -nostdinc -P <$< $o
 
 funcs.scad:    diziet-utils/funcs.scad.cpp
-               cpp -nostdinc -P $< >$@.tmp && $i
+               cpp -nostdinc -P $< $o
 
 %.gcode:       manual-gcode-generator %.m-g
-               $(CWD)/$^ >$@.tmp && $i
+               $(CWD)/$^ $o
 
 %.dxf:         %.eps
                pstoedit -dt -f "dxf: -polyaslines -mm" $< $@
 
 %:             %.pl
-               ./$< >$@.tmp && $i
+               ./$< $o
 
 %:             %.m4
                $(M4) -P >$@.tmp $< && $i