@@ -46,19 +46,22 @@ function doinclude()
46
46
file=$1
47
47
line=" ${@: 2} "
48
48
if [ -f $AMALGAMATE_INCLUDE_PATH /$file ]; then
49
- if [[ ! " ${found_includes[@]} " =~ " ${file} " ]]; then
49
+ # generic includes are included multiple times
50
+ if [[ " ${file} " == * ' generic/' * ' .h' ]]; then
51
+ dofile $AMALGAMATE_INCLUDE_PATH $file
52
+ # begin/end_implementation are also included multiple times
53
+ elif [[ " ${file} " == * ' /begin.h' ]]; then
54
+ dofile $AMALGAMATE_INCLUDE_PATH $file
55
+ elif [[ " ${file} " == * ' /end.h' ]]; then
56
+ dofile $AMALGAMATE_INCLUDE_PATH $file
57
+ elif [[ ! " ${found_includes[@]} " =~ " ${file} " ]]; then
50
58
found_includes+=(" $file " )
51
59
dofile $AMALGAMATE_INCLUDE_PATH $file
52
60
fi
53
61
elif [ -f $AMALGAMATE_SOURCE_PATH /$file ]; then
54
62
# generic includes are included multiple times
55
63
if [[ " ${file} " == * ' generic/' * ' .h' ]]; then
56
64
dofile $AMALGAMATE_SOURCE_PATH $file
57
- # begin/end_implementation are also included multiple times
58
- elif [[ " ${file} " == * ' begin_implementation.h' ]]; then
59
- dofile $AMALGAMATE_SOURCE_PATH $file
60
- elif [[ " ${file} " == * ' end_implementation.h' ]]; then
61
- dofile $AMALGAMATE_SOURCE_PATH $file
62
65
elif [[ ! " ${found_includes[@]} " =~ " ${file} " ]]; then
63
66
found_includes+=(" $file " )
64
67
dofile $AMALGAMATE_SOURCE_PATH $file
0 commit comments