diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -104,15 +104,18 @@ syntax: $(SYNTAX_FILES) | |||
104 | 104 | ||
105 | # TODO: include/rlimit are false positives | 105 | # TODO: include/rlimit are false positives |
106 | contrib/syntax/lists/profile_commands_arg0.list: src/firejail/profile.c Makefile | 106 | contrib/syntax/lists/profile_commands_arg0.list: src/firejail/profile.c Makefile |
107 | @printf 'Generating %s from %s\n' $@ $< | ||
107 | @sed -En 's/.*strn?cmp\(ptr, "([^ "]*[^ ])".*/\1/p' $< | \ | 108 | @sed -En 's/.*strn?cmp\(ptr, "([^ "]*[^ ])".*/\1/p' $< | \ |
108 | grep -Ev '^(include|rlimit)$$' | sed 's/\./\\./' | LC_ALL=C sort -u >$@ | 109 | grep -Ev '^(include|rlimit)$$' | sed 's/\./\\./' | LC_ALL=C sort -u >$@ |
109 | 110 | ||
110 | # TODO: private-lib is special-cased in the code and doesn't match the regex | 111 | # TODO: private-lib is special-cased in the code and doesn't match the regex |
111 | contrib/syntax/lists/profile_commands_arg1.list: src/firejail/profile.c Makefile | 112 | contrib/syntax/lists/profile_commands_arg1.list: src/firejail/profile.c Makefile |
113 | @printf 'Generating %s from %s\n' $@ $< | ||
112 | @{ sed -En 's/.*strn?cmp\(ptr, "([^"]+) ".*/\1/p' $<; echo private-lib; } | \ | 114 | @{ sed -En 's/.*strn?cmp\(ptr, "([^"]+) ".*/\1/p' $<; echo private-lib; } | \ |
113 | LC_ALL=C sort -u >$@ | 115 | LC_ALL=C sort -u >$@ |
114 | 116 | ||
115 | contrib/syntax/lists/profile_conditionals.list: src/firejail/profile.c Makefile | 117 | contrib/syntax/lists/profile_conditionals.list: src/firejail/profile.c Makefile |
118 | @printf 'Generating %s from %s\n' $@ $< | ||
116 | @awk -- 'BEGIN {process=0;} /^Cond conditionals\[\] = \{$$/ {process=1;} \ | 119 | @awk -- 'BEGIN {process=0;} /^Cond conditionals\[\] = \{$$/ {process=1;} \ |
117 | /\t*\{"[^"]+".*/ \ | 120 | /\t*\{"[^"]+".*/ \ |
118 | { if (process) {print gensub(/^\t*\{"([^"]+)".*$$/, "\\1", 1);} } \ | 121 | { if (process) {print gensub(/^\t*\{"([^"]+)".*$$/, "\\1", 1);} } \ |
@@ -120,16 +123,20 @@ contrib/syntax/lists/profile_conditionals.list: src/firejail/profile.c Makefile | |||
120 | $< | LC_ALL=C sort -u >$@ | 123 | $< | LC_ALL=C sort -u >$@ |
121 | 124 | ||
122 | contrib/syntax/lists/profile_macros.list: src/firejail/macros.c Makefile | 125 | contrib/syntax/lists/profile_macros.list: src/firejail/macros.c Makefile |
126 | @printf 'Generating %s from %s\n' $@ $< | ||
123 | @sed -En 's/.*\$$\{([^}]+)\}.*/\1/p' $< | LC_ALL=C sort -u >$@ | 127 | @sed -En 's/.*\$$\{([^}]+)\}.*/\1/p' $< | LC_ALL=C sort -u >$@ |
124 | 128 | ||
125 | contrib/syntax/lists/syscall_groups.list: src/lib/syscall.c Makefile | 129 | contrib/syntax/lists/syscall_groups.list: src/lib/syscall.c Makefile |
130 | @printf 'Generating %s from %s\n' $@ $< | ||
126 | @sed -En 's/.*"@([^",]+).*/\1/p' $< | LC_ALL=C sort -u >$@ | 131 | @sed -En 's/.*"@([^",]+).*/\1/p' $< | LC_ALL=C sort -u >$@ |
127 | 132 | ||
128 | contrib/syntax/lists/syscalls.list: $(SYSCALL_HEADERS) Makefile | 133 | contrib/syntax/lists/syscalls.list: $(SYSCALL_HEADERS) Makefile |
134 | @printf 'Generating %s\n' $@ | ||
129 | @sed -n 's/{\s\+"\([^"]\+\)",.*},/\1/p' $(SYSCALL_HEADERS) | \ | 135 | @sed -n 's/{\s\+"\([^"]\+\)",.*},/\1/p' $(SYSCALL_HEADERS) | \ |
130 | LC_ALL=C sort -u >$@ | 136 | LC_ALL=C sort -u >$@ |
131 | 137 | ||
132 | contrib/syntax/lists/system_errnos.list: src/lib/errno.c Makefile | 138 | contrib/syntax/lists/system_errnos.list: src/lib/errno.c Makefile |
139 | @printf 'Generating %s from %s\n' $@ $< | ||
133 | @sed -En 's/.*"(E[^"]+).*/\1/p' $< | LC_ALL=C sort -u >$@ | 140 | @sed -En 's/.*"(E[^"]+).*/\1/p' $< | LC_ALL=C sort -u >$@ |
134 | 141 | ||
135 | pipe_fromlf = { tr '\n' '|' | sed 's/|$$//'; } | 142 | pipe_fromlf = { tr '\n' '|' | sed 's/|$$//'; } |