File: syscall_deps.sh

package info (click to toggle)
vuos 0.9.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,616 kB
  • sloc: ansic: 22,155; python: 284; makefile: 28; sh: 4
file content (9 lines) | stat: -rwxr-xr-x 369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
#!/bin/sh

# compute and print on stdout all the (nested_ dependencies of "#include<sys/syscall.h>"

echo "#include<sys/syscall.h>" | gcc -M -E - | \
	sed ':a; N; s/\n/ /; ta' | sed 's/^-: *//;s/ *$//;s/\\//g;s/  */;/g'

# sed magics: first sed=join all the lines
# second sed: delete leading -: and trailing spaces, delete all \ and change any sequence of spaces to ;