Skip to content

Commit 8b39d78

Browse files
update make-makefile.sh to ignore virtual targets
1 parent 9c08aee commit 8b39d78

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

make-makefile.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ found_target=0
7979
current_target=""
8080
in_compiler=0
8181
in_linker=0
82-
in_extensions=0
82+
ignore_nest_count=0
8383
compiler_command_line=()
8484
linker_command_line=()
8585
output_executable_name=""
@@ -88,10 +88,12 @@ object_output_dir=""
8888
files=()
8989
for((i=0;i<${#a[@]};i++)); do
9090
line="${a[i]}"
91-
if [[ "$line" =~ '</Extensions>' ]]; then
92-
in_extensions=0
93-
elif [[ "$line" =~ '<Extensions>' ]] || ((in_extensions)); then
94-
in_extensions=1
91+
if [[ "$line" =~ '</Extensions>' || "$line" =~ '</VirtualTargets>' ]]; then
92+
ignore_nest_count=$((ignore_nest_count - 1))
93+
elif [[ "$line" =~ '<Extensions>' || "$line" =~ '<VirtualTargets>' ]]; then
94+
ignore_nest_count=$((ignore_nest_count + 1))
95+
elif ((ignore_nest_count)); then
96+
:
9597
elif [[ "$line" =~ '</Target>' ]]; then
9698
current_target=""
9799
elif [[ "$line" =~ '<Target title="'(.*)'">' ]]; then

0 commit comments

Comments
 (0)