aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <thomas.voss@humanwave.nl> 2024-02-14 12:38:18 +0100
committerThomas Voss <thomas.voss@humanwave.nl> 2024-02-14 12:38:18 +0100
commit2c3617ed353fab026896ce6f709d778f7929381e (patch)
tree74ef8f867b380d991e5b32e095292fa009a5c142
parentee3eb5ac6c89d10b4a564dedae50216b196bad9c (diff)
Rename lookup.h to autogen-lookup.h
-rw-r--r--.gitignore1
-rw-r--r--make.c6
-rw-r--r--src/c8asm/parser.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 6f857f3..7b376fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
# Autogenerated
.cache/
+autogen-*
compile_commands.json
# Configs
diff --git a/make.c b/make.c
index f547737..f25fe37 100644
--- a/make.c
+++ b/make.c
@@ -104,8 +104,8 @@ main(int argc, char **argv)
} else if (streq(*argv, "clean")) {
cmd_t c = {0};
cmdadd(&c, "find", ".", "-type", "f", "(", "-name", "*.[ao]", "-or",
- "-name", "c8asm", "-or", "-path", "./src/c8asm/lookup.h", ")",
- "-delete");
+ "-name", "c8asm", "-or", "-path", "./src/c8asm/autogen-lookup.h",
+ ")", "-delete");
CMDPRC(c);
} else {
warnx("invalid subcommand -- '%s'", *argv);
@@ -239,7 +239,7 @@ build_c8asm(void)
if (FLAGSET('f')
|| foutdated("src/c8asm/lookup.h", "src/c8asm/instr.gperf"))
{
- c.dst = "src/c8asm/lookup.h";
+ c.dst = "src/c8asm/autogen-lookup.h";
cmdadd(&c, "gperf", "src/c8asm/instr.gperf", "--output-file", c.dst);
CMDPRC2(c);
}
diff --git a/src/c8asm/parser.c b/src/c8asm/parser.c
index 86f4ca5..e0f3660 100644
--- a/src/c8asm/parser.c
+++ b/src/c8asm/parser.c
@@ -52,7 +52,7 @@ static void parseop_add(void), parseop_and(void), parseop_bcd(void),
parseop_shl(void), parseop_shr(void), parseop_sknp(void), parseop_skp(void),
parseop_sne(void), parseop_stor(void), parseop_sub(void),
parseop_subn(void), parseop_sys(void), parseop_xor(void);
-#include "lookup.h"
+#include "autogen-lookup.h"
static size_t i;
static struct ast ast;