GENFILES += passes/techmap/stdcells.inc
passes/techmap/stdcells.inc: techlibs/common/stdcells.v
- echo "// autogenerated from $<" > $@.new
- od -v -td1 -w1 $< | awk 'BEGIN { print "static char stdcells_code[] = {"; } $$2 != "" { print $$2 ","; } \
- END { print 0 "};"; }' | fmt >> $@.new
- mv $@.new $@
+ echo "// autogenerated from $<\n" > $@.new
+ echo "static char stdcells_code[] = {" >> $@.new
+ for c in `od -v -td1 -An $<` ; do echo " $$c," >> $@.new ; done
+ echo " 0 };" >> $@.new
+ fmt $@.new > $@
+ rm -f $@.new
passes/techmap/techmap.o: passes/techmap/stdcells.inc