scan_makefile_in.awk 410 B

1234567891011121314151617181920212223242526272829303132
  1. BEGIN {
  2. mode=0
  3. sources=""
  4. }
  5. mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ {
  6. if (match($0, "[^=]*$")) {
  7. sources=substr($0, RSTART, RLENGTH-1)
  8. }
  9. mode=1
  10. next
  11. }
  12. mode == 0 && /^LTLIBRARY_SOURCES.*/ {
  13. if (match($0, "[^=]*$")) {
  14. sources=substr($0, RSTART, RLENGTH)
  15. }
  16. }
  17. mode == 1 && /.*\\$/ {
  18. sources=sources substr($0, 0, length - 1)
  19. next
  20. }
  21. mode == 1 {
  22. sources=sources $0
  23. mode=0
  24. }
  25. END {
  26. print sources
  27. }