add header to autogenerated file on its origin

This commit is contained in:
Johann Glaser 2013-03-17 22:02:46 +01:00 committed by Clifford Wolf
parent cd8008bda0
commit 3b8ebd694d
1 changed files with 3 additions and 1 deletions

View File

@ -3,8 +3,10 @@ GENFILES += passes/techmap/stdcells.inc
OBJS += passes/techmap/techmap.o
passes/techmap/stdcells.inc: techlibs/stdcells.v
echo -n "// autogenerated from $< on " > $@.new
LANG=C date >> $@.new
od -v -td1 -w1 $< | awk 'BEGIN { print "static char stdcells_code[] = {"; } $$2 != "" { print $$2 ","; } \
END { print 0 "};"; }' | fmt > $@.new
END { print 0 "};"; }' | fmt >> $@.new
mv $@.new $@
passes/techmap/techmap.o: passes/techmap/stdcells.inc