aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2020-08-21 17:50:00 -0700
committerGitHub <noreply@github.com>2020-08-21 17:50:00 -0700
commit876ee63ad67efd11b753d8de3c46e60d1b7df7b8 (patch)
tree8a5a0bbf4dfbc33f16224317f92b69530e04964b /Makefile
parent8d59eaae6d42e5dffa71846eb8296a8a5a461994 (diff)
downloadriscv-opcodes-876ee63ad67efd11b753d8de3c46e60d1b7df7b8.zip
riscv-opcodes-876ee63ad67efd11b753d8de3c46e60d1b7df7b8.tar.gz
riscv-opcodes-876ee63ad67efd11b753d8de3c46e60d1b7df7b8.tar.bz2
Add header to .h files. (#48)
The header explains where the file came from.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d322c44..294513a 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,12 @@ ALL_OPCODES := opcodes-pseudo $(ALL_REAL_OPCODES) opcodes-rvv-pseudo
install: $(ISASIM_H) $(PK_H) $(ENV_H) $(OPENOCD_H) inst.chisel instr-table.tex priv-instr-table.tex
$(ISASIM_H) $(PK_H) $(ENV_H) $(OPENOCD_H): $(ALL_OPCODES) parse_opcodes encoding.h
- cp encoding.h $@
+ echo "/*" > $@
+ echo " * This file is auto-generated by running 'make $@' in" >> $@
+ echo " * https://github.com/riscv/riscv-opcodes (`git log -1 --format="format:%h"`)" >> $@
+ echo " */" >> $@
+ echo >> $@
+ cat encoding.h >> $@
cat $(ALL_OPCODES) | python ./parse_opcodes -c >> $@
inst.chisel: $(ALL_OPCODES) parse_opcodes