define(`item', `$2x$1=ifelse(eval($2*$1<10), 1, ` ')eval($2*$1) ')dnl ⇥ define(`line', `ifelse(eval($3<=eval($1+2)), 1, item($2, $3)dnl `line($1, $2, incr($3))')')dnl define(`block', `ifelse(eval($2<=9), 1, line($1, $2, $1) `block($1, incr($2))')')dnl define(`main', `ifelse(eval($1<=9), 1, block($1, 1) `main(eval($1+3))')')dnl main(1)dnl dnl dnl m4 mt9x9.m4 dnl define(`item', `$2x$1=ifelse(eval($2*$1<10), 1, ` ')eval($2*$1) ')dnl ⇥ define(`line', `ifelse(eval($3<=eval($1+2)), 1, item($2, $3)dnl `line($1, $2, incr($3))')')dnl define(`block', `ifelse(eval($2<=9), 1, line($1, $2, $1) `block($1, incr($2))')')dnl define(`main', `ifelse(eval($1<=9), 1, block($1, 1) `main(eval($1+3))')')dnl main(1)dnl dnl #!/usr/bin/make -sf # ./mt9x9.mk || make -sf mt9x9.mk include gmsl $(foreach i, 1 4 7, \ $(foreach j, $(call sequence,1,9), \ $(eval str=) \ $(foreach k, $i $(call plus,$i,1) $(call plus,$i,2), \ $(eval n=$(call multiply,$k,$j)) \ $(eval str=${str} $kx$j=$(if $(call lt,$n,10), ,)$n) \ ) \ $(info ${str}) \ ) \ $(info ) \ ) all: #!/usr/bin/make -sf # ./mt9x9.mk || make -sf mt9x9.mk include gmsl $(foreach i, 1 4 7, \ $(foreach j, $(call sequence,1,9), \ $(eval str=) \ $(foreach k, $i $(call plus,$i,1) $(call plus,$i,2), \ $(eval n=$(call multiply,$k,$j)) \ $(eval str=${str} $kx$j=$(if $(call lt,$n,10), ,)$n) \ ) \ $(info ${str}) \ ) \ $(info ) \ ) all: Make M4