File: unx2atar.sed

package info (click to toggle)
glhack 1.2-8.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,744 kB
  • sloc: ansic: 208,571; cpp: 13,139; yacc: 2,005; makefile: 1,152; lex: 377; sh: 121; awk: 89; sed: 11
file content (23 lines) | stat: -rw-r--r-- 799 bytes parent folder | download | duplicates (30)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
: loop
/\\$/N
/\\$/b loop
# for each line, append any continuation lines before trying to classify it
/^	/ {
# if it starts with a tab, it's meant for the shell, and we should think
#  about reversing the slashes
s;cd ../util;cd ..\\util;
s;cd ../src;cd ..\\src;
/librarian/ s;dat/options;dat\\options;
/$(MAKE)/b
/$(CC)/b
s;/;\\;g
}
# unfortunately, we do not want to reverse *all* the slashes, as even the
#  Atari make and gcc like forward ones, and it's messy to avoid the ones in
#  sed addresses
# so, flip the first one in e.g.
# 	@( cd ../util ; $(MAKE) ../include/onames.h )
# flip the librarian-related ones in dat/options
# ignore other lines related to make and gcc
# and flip any slashes left over, which include a number of UNIX-only things
#  that we didn't need to do but don't hurt