summaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/generate.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/mk/generate.mk b/mk/generate.mk
index 9575c34..f5361c4 100644
--- a/mk/generate.mk
+++ b/mk/generate.mk
@@ -72,7 +72,7 @@ generated/oses.h: Makefile mk/generate.mk
generated/lowercase.h: libsyscalls.h mk/generate.mk
mkdir -p -- generated
- sed -n 's/^\s*LIBSYSCALLS_CAT_\([A-Z0-9_]\+\).*$$/\1/p' < libsyscalls.h \
+ sed -n 's/^$(s)*LIBSYSCALLS_CAT_\([A-Z0-9_]\{1,\}\).*$$/\1/p' < libsyscalls.h \
| grep -v '^\(SUPPORT_PENDING\|NOT_IMPLEMENTED\)$$' \
| while read uppercase; do \
printf '\43define LOWERCASE_%s %s\n' \
@@ -86,7 +86,7 @@ libsyscalls/short-enums.h: libsyscalls.h mk/generate.mk
'ifndef LIBSYSCALLS_H' \
' error Do not include this header file directly' \
'endif'
- sed -n 's/^.*\b\(enum_libsyscalls_[A-Za-z0-9_]\+\)\([^A-Za-z0-9_].*\|\)$$/\1/p' < libsyscalls.h \
+ sed -n 's/^\(.*[^A-Za-z0-9_]\)\{0,1\}\(enum_libsyscalls_[A-Za-z0-9_]\{1,\}\)\([^A-Za-z0-9_].*\|\)$$/\2/p' < libsyscalls.h \
| sort -u \
| xargs printf 'typedef unsigned short int %s;\n' \
>> $@
@@ -95,7 +95,7 @@ libsyscalls/short-enums.h: libsyscalls.h mk/generate.mk
generated/macros.h: common.h mk/generate.mk
set -e;\
for find in COUNT_ARG_PAIRS PARAMS_BUILD_TYPES; do \
- text="$$(sed -n 's/^\s*\x23\s*define\s\+'"$$find"'_1(/&/p' < common.h)"; \
+ text="$$(sed -n 's/^$(s)*$(h)$(s)*define$(s)\{1,\}'"$$find"'_1(/&/p' < common.h)"; \
i=1; while (( i <= $(NPARAMS) )); do \
j=$$(( i + 1 )); \
printf '%s\n' "$$text" | sed -e "s/_2/_$$j/g" -e "s/_1/_$$i/g"; \
@@ -124,7 +124,7 @@ generated/macros.h: common.h mk/generate.mk
fi; \
printf '\43define %s%s(X)%s\n' "$$a" "$$b" "$$c"; \
done; done; done; \
- done) | sed 's/_IN_OUT/_BI/' | sed 's/\(\s[A-Z]\+\)(/\1__(/' >> $@
+ done) | sed 's/_IN_OUT/_BI/' | sed 's/\($(s)[A-Z]\{1,\}\)(/\1__(/' >> $@
SELF_CHECK_COMMAND = test "$(NPARAMS)" -le 16