Index: work/doc/distalign/Makefile =================================================================== --- work/doc/distalign/Makefile (revision 17975) +++ work/doc/distalign/Makefile (revision 17976) @@ -3,11 +3,12 @@ # i.e., Align(X Lefts First Gridless) # # NOTE gridless used where permitted as grid alignment yields better visualized placement.. -# NOTE POSIX compliance tested using "export SHELL = /bin/dash" -# 2018/06/30 +# NOTE POSIX compliance tested with ".POSIX" keyword (below) and +# by invoking with "make "SHELL = /bin/dash" +# 2018/07/02 # -.PHONY: clean -.ONESHELL: +.POSIX: +.SILENT: PREREQS := \ alignpix/Align[X,Centers,Average,Gridless].png \ @@ -69,44 +70,40 @@ align-examples.html : $(PREREQS) @printf "\n%s\n" "Building HTML file" - @ALIGNHTML=align-examples.html - printf "%s\n" 'DistAlign Examples

DistAlign Examples

' > $$ALIGNHTML - fqty=$$(ls -1 alignpix/*.png | wc -l) - tfqty=$$fqty - count=1 - # loop once per file - for i in `ls -1 alignpix/*.png` - do - # isolate filename and basename - fname=$$i - bname=`basename -s .png $$i` - # create HTML table entries - if [ "$$tfqty" -eq "$$fqty" ]; then - printf "%s\n" "" >> $${ALIGNHTML} - fi - printf "%s\n" "" >> $${ALIGNHTML} - if [ "$$(expr $$count % 3)" -eq "0" ]; then - printf "%s\n" "" >> $${ALIGNHTML} - fi - count=$$(($$count+1)) - tfqty=$$(($$tfqty-1)) - done - if [ $$(expr $$count % 3) -ne 0 ]; then - printf "%s\n" "" >> $${ALIGNHTML} - fi - printf "%s\n" "
Click Image to Enlarge
\"$$bname\"
$$bname
\n\n" >> $${ALIGNHTML} + @ALIGNHTML=align-examples.html ;\ + printf "%s\n" 'DistAlign Examples

DistAlign Examples

' > $$ALIGNHTML ;\ + fqty=$$(ls -1 alignpix/*.png | wc -l) ;\ + tfqty=$$fqty ;\ + count=1 ;\ + for i in `ls -1 alignpix/*.png` ;\ + do\ + fname=$$i ;\ + bname=`basename -s .png $$i` ;\ + if [ "$$tfqty" -eq "$$fqty" ]; then\ + printf "%s\n" "" >> $${ALIGNHTML} ;\ + fi ;\ + printf "%s\n" "" >> $${ALIGNHTML} ;\ + if [ "$$(expr $$count % 3)" -eq "0" ]; then \ + printf "%s\n" "" >> $${ALIGNHTML} ;\ + fi ;\ + count=$$(($$count+1)) ;\ + tfqty=$$(($$tfqty-1)) ;\ + done ;\ + if [ $$(expr $$count % 3) -ne 0 ]; then \ + printf "%s\n" "" >> $${ALIGNHTML} ;\ + fi ;\ + printf "%s\n" "
Click Image to Enlarge
\"$$bname\"
$$bname
\n\n" >> $${ALIGNHTML} ; $(PREREQS) : - @printf "%s\n" "Building Image Files" - @TMPLHT=temp.lht ; - for name in $(PREREQS) ; do - fname=`printf "%s" $$name | tr "[]" "()"` - bname=`basename -s .png $$fname` - sed s/ALIGN-TEST/$$(basename $$fname .png)/ align.lht > $$TMPLHT - printf "%s\n" "LoadFrom(layout,$$TMPLHT) Cursor(Warp,50,-50,board) Select(All) "$$bname" Export(png, --outfile, '$$name', --photo-mode, --dpi, 300) Quit" | pcb-rnd -c rc/quiet=1 --gui batch - @printf "%s" "." # Something happening feedback for user - done - @rm -f $$TMPLHT + printf "%s\n" "Building Image Files" + for name in $(PREREQS) ; do \ + fname=`printf "%s" $$name | tr "[]" "()"` ;\ + bname=`basename -s .png $$fname` ;\ + sed s/ALIGN-TEST/$$bname/ align.lht > temp.lht ;\ + printf "%s\n" "LoadFrom(layout,temp.lht) Cursor(Warp,50,-50,board) Select(All) "$$bname" Export(png, --outfile, '$$name', --photo-mode, --dpi, 300) Quit" | pcb-rnd -c rc/quiet=1 --gui batch ;\ + printf "%s" "." # Something happening feedback for user ;\ + done ;\ + rm -f $$TMPLHT ; clean: @TMPLHT=temp.lht ;