build-external-modules 315 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. # Build external-modules.c.
  3. target="$1"
  4. shift
  5. (
  6. cat <<!
  7. !
  8. for i in "s48_initialize_external" "$@"; do
  9. cat <<!
  10. extern void $i(void);
  11. !
  12. done
  13. cat <<!
  14. void s48_initialize_external_modules (void) {
  15. !
  16. for i in "s48_initialize_external" "$@"; do
  17. cat <<!
  18. $i();
  19. !
  20. done
  21. cat <<!
  22. }
  23. !
  24. ) >"$target"