Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Collapse all /foo/../ sequences in paths
- s/(\/[^./]+){1}(\/\.\.){1}//g
- # Collapse all /foo/bar/../../ sequences in paths
- s/(\/[^./]+){2}(\/\.\.){2}//g
- # Collapse all /foo/../ sequences in paths again
- s/(\/[^./]+){1}(\/\.\.){1}//g
- # Collect line following line like 'foo.o <ignore>: \'
- /^\S+.o(\s+[^:]+)*:\s+\\$/N
- # Extract object source file from line like 'foo.o <ignore>: \nfoo.c'
- s/^\S+.o(\s+[^:]+)*:\s+\\\n\s*(\S+).*/\2/p
- # Extract object source file from line like 'foo.o <ignore>: foo.c'
- s/^\S+.o(\s+[^:]+)*:\s+(\S+).*/\2/p
- # Extract dependency file from line like 'foo.h:'
- s/^\s*([^/]\S+):\s*$/\1/p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement