summaryrefslogtreecommitdiff
path: root/mk.sh
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-02-23 13:57:39 -0500
committerJakob Kaivo <jkk@ung.org>2019-02-23 13:57:39 -0500
commit084abe46ae4f16ff62591de823b2fc55ca785efd (patch)
treed2bf112f676af157fd30f974e51ff4c9642207e6 /mk.sh
parenta16fb277f9a794ceee6755e5d41458fa1ac38989 (diff)
properly handle possibly undefined macros
Diffstat (limited to 'mk.sh')
-rw-r--r--mk.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk.sh b/mk.sh
index 0d13ee07..eb1b6334 100644
--- a/mk.sh
+++ b/mk.sh
@@ -66,7 +66,9 @@ get_declaration () {
;;
MACRO)
- grep -E '^(#(if|def|undef|el|end)| )' $1
+ if ! (grep -q '#undef' $1 && grep -q 'MAY-BE-UNDEF' $1); then
+ grep -E '^(#(if|def|undef|el|end)| )' $1
+ fi
;;
TYPE|TYPE_LONG|RECORD|FNTYPE)