]> git.sur5r.net Git - i3/i3/blobdiff - src/i3.mk
generate-command-parser: make input/output configurable
[i3/i3] / src / i3.mk
index a0985120aa8a063e7988dac3dd005bda8b4bf556..94a988ffeb8209ad885a7ee7e2791e404be501b7 100644 (file)
--- a/src/i3.mk
+++ b/src/i3.mk
@@ -21,13 +21,13 @@ endif
 
 i3_OBJECTS := $(i3_SOURCES_GENERATED:.c=.o) $(i3_SOURCES:.c=.o)
 
-# The basename/readlink calls are for canonicalizing the path: Instead
+# The basename/pwd calls are for canonicalizing the path: Instead
 # of src/main.c, we will see something like ../i3-4.2/src/main.c in
 # debugger backtraces, making it clearer which code belongs to i3 and
 # which code doesn’t.
 # We only do this for src/ since all the other subdirectories contain i3 in
 # their name already.
-canonical_path := ../$(shell basename $(shell readlink -f .))
+canonical_path := ../$(shell basename $(shell pwd -P))
 
 include/all.h.pch: $(i3_HEADERS)
        echo "[i3] PCH all.h"
@@ -55,7 +55,7 @@ src/commands_parser.o: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser
 
 i3-command-parser.stamp: generate-command-parser.pl parser-specs/commands.spec
        echo "[i3] Generating command parser"
-       (cd include; ../generate-command-parser.pl)
+       (cd include; ../generate-command-parser.pl --input=../parser-specs/commands.spec --prefix=commands)
        touch $@
 
 i3: libi3.a $(i3_OBJECTS)
@@ -82,4 +82,4 @@ install-i3: i3
 
 clean-i3:
        echo "[i3] Clean"
-       rm -f $(i3_OBJECTS) $(i3_SOURCES_GENERATED) $(i3_HEADERS_CMDPARSER) include/loglevels.h loglevels.tmp include/all.h.pch i3-command-parser.stamp i3 src/*.gcno src/cfgparse.{output,dot} src/cmdparse.*
+       rm -f $(i3_OBJECTS) $(i3_SOURCES_GENERATED) $(i3_HEADERS_CMDPARSER) include/loglevels.h loglevels.tmp include/all.h.pch i3-command-parser.stamp i3 src/*.gcno src/cfgparse.{output,dot,tab.h,y.o} src/cmdparse.*