diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -106,13 +106,13 @@ syntax: $(SYNTAX_FILES) | |||
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 | @printf 'Generating %s from %s\n' $@ $< |
108 | @sed -En 's/.*strn?cmp\(ptr, "([^ "]*[^ ])".*/\1/p' $< | \ | 108 | @sed -En 's/.*strn?cmp\(ptr, "([^ "]*[^ ])".*/\1/p' $< | \ |
109 | grep -Ev '^(include|rlimit)$$' | sed 's/\./\\./' | LC_ALL=C sort -u >$@ | 109 | grep -Ev '^(include|rlimit)$$' | LC_ALL=C sort -u >$@ |
110 | 110 | ||
111 | # 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 |
112 | 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' $@ $< | 113 | @printf 'Generating %s from %s\n' $@ $< |
114 | @{ sed -En 's/.*strn?cmp\(ptr, "([^"]+) ".*/\1/p' $<; echo private-lib; } | \ | 114 | @{ sed -En 's/.*strn?cmp\(ptr, "([^"]+) ".*/\1/p' $<; \ |
115 | LC_ALL=C sort -u >$@ | 115 | echo private-lib; } | LC_ALL=C sort -u >$@ |
116 | 116 | ||
117 | 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' $@ $< | 118 | @printf 'Generating %s from %s\n' $@ $< |
@@ -139,17 +139,17 @@ contrib/syntax/lists/system_errnos.list: src/lib/errno.c Makefile | |||
139 | @printf 'Generating %s from %s\n' $@ $< | 139 | @printf 'Generating %s from %s\n' $@ $< |
140 | @sed -En 's/.*"(E[^"]+).*/\1/p' $< | LC_ALL=C sort -u >$@ | 140 | @sed -En 's/.*"(E[^"]+).*/\1/p' $< | LC_ALL=C sort -u >$@ |
141 | 141 | ||
142 | pipe_fromlf = { tr '\n' '|' | sed 's/|$$//'; } | 142 | regex_fromlf = { tr '\n' '|' | sed -e 's/|$$//' -e 's/\./\\\\./g'; } |
143 | space_fromlf = { tr '\n' ' ' | sed 's/ $$//'; } | 143 | space_fromlf = { tr '\n' ' ' | sed -e 's/ $$//'; } |
144 | edit_syntax_file = sed \ | 144 | edit_syntax_file = sed \ |
145 | -e "s/@make_input@/$$(basename $@). Generated from $$(basename $<) by make./" \ | 145 | -e "s/@make_input@/$$(basename $@). Generated from $$(basename $<) by make./" \ |
146 | -e "s/@FJ_PROFILE_COMMANDS_ARG0@/$$($(pipe_fromlf) <contrib/syntax/lists/profile_commands_arg0.list)/" \ | 146 | -e "s/@FJ_PROFILE_COMMANDS_ARG0@/$$($(regex_fromlf) <contrib/syntax/lists/profile_commands_arg0.list)/" \ |
147 | -e "s/@FJ_PROFILE_COMMANDS_ARG1@/$$($(pipe_fromlf) <contrib/syntax/lists/profile_commands_arg1.list)/" \ | 147 | -e "s/@FJ_PROFILE_COMMANDS_ARG1@/$$($(regex_fromlf) <contrib/syntax/lists/profile_commands_arg1.list)/" \ |
148 | -e "s/@FJ_PROFILE_CONDITIONALS@/$$($(pipe_fromlf) <contrib/syntax/lists/profile_conditionals.list)/" \ | 148 | -e "s/@FJ_PROFILE_CONDITIONALS@/$$($(regex_fromlf) <contrib/syntax/lists/profile_conditionals.list)/" \ |
149 | -e "s/@FJ_PROFILE_MACROS@/$$($(pipe_fromlf) <contrib/syntax/lists/profile_macros.list)/" \ | 149 | -e "s/@FJ_PROFILE_MACROS@/$$($(regex_fromlf) <contrib/syntax/lists/profile_macros.list)/" \ |
150 | -e "s/@FJ_SYSCALLS@/$$($(space_fromlf) <contrib/syntax/lists/syscalls.list)/" \ | 150 | -e "s/@FJ_SYSCALLS@/$$($(space_fromlf) <contrib/syntax/lists/syscalls.list)/" \ |
151 | -e "s/@FJ_SYSCALL_GROUPS@/$$($(pipe_fromlf) <contrib/syntax/lists/syscall_groups.list)/" \ | 151 | -e "s/@FJ_SYSCALL_GROUPS@/$$($(regex_fromlf) <contrib/syntax/lists/syscall_groups.list)/" \ |
152 | -e "s/@FJ_SYSTEM_ERRNOS@/$$($(pipe_fromlf) <contrib/syntax/lists/system_errnos.list)/" | 152 | -e "s/@FJ_SYSTEM_ERRNOS@/$$($(regex_fromlf) <contrib/syntax/lists/system_errnos.list)/" |
153 | 153 | ||
154 | contrib/syntax/files/example: contrib/syntax/files/example.in $(SYNTAX_LISTS) Makefile | 154 | contrib/syntax/files/example: contrib/syntax/files/example.in $(SYNTAX_LISTS) Makefile |
155 | @printf 'Generating %s from %s\n' $@ $< | 155 | @printf 'Generating %s from %s\n' $@ $< |