Index: trunk/util/devhelpers/awk_on_formats.sh =================================================================== --- trunk/util/devhelpers/awk_on_formats.sh (revision 33808) +++ trunk/util/devhelpers/awk_on_formats.sh (revision 33809) @@ -17,6 +17,8 @@ BEGIN { osep = "
" types="board footprint netlist image misc" + pends = 0 + disabled = 0 } ($1 == "@@@") { @@ -28,10 +30,12 @@ sub("io_", "", fmt) sub("import_", "", fmt) sub("export_", "", fmt) + flush_pends() next } ($1 == "@@@@@@") { + flush_pends() mode = 2 next } @@ -68,18 +72,39 @@ FMTS[dir, type] = FMTS[dir, type] osep name } +# at the end of reading a plugin, write all pending data collected from +# the pup file if the plugin is not disabled +function flush_pends( n) +{ + if (!disabled) { + for(n = 0; n < pends; n++) + add(PENDING1[n], PENDING2[n]) + } + pends = 0 + disabled = 0 +} + (mode == 1) && ($1 == "$fmt-feature-r") { $1="" - add($0, "import") + PENDING1[pends] = $0 + PENDING2[pends] = "import" + pends++ next } (mode == 1) && ($1 == "$fmt-feature-w") { $1="" - add($0, "export") + PENDING1[pends] = $0 + PENDING2[pends] = "export" + pends++ next } +(mode == 1) && ($1 == "default") { + if ($2 == "disable-all") + disabled = 1 +} + (mode != 2) { next } '"$1"