-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathupdate-makefile.sno
More file actions
49 lines (32 loc) · 856 Bytes
/
update-makefile.sno
File metadata and controls
49 lines (32 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
* Argument processing
argv = ARRAY('0:9')
i = 0
first_arg = HOST(3)
argv[i] = HOST(2, first_arg - 1)
get_args
arg = HOST(2, first_arg + i) :F(args_done)
i = i + 1
argv[i] = arg :(get_args)
args_done
argc = i + 1
EQ(argc,1) :S(args_ok)
TERMINAL = 'Usage: ' argv[0] :(END)
args_ok
* Useful strings and patterns
lc_aldig = 'abcdefghijklmnopqrstuvwxyz0123456789'
eqsign = ARBNO(' ') '='
next_line
line = INPUT :F(all_done)
line ' $(top_builddir)/support/libmain.la' :S(insert_lib)
* Lines to omit
* Ordinary lines we print out
OUTPUT = line :(next_line)
* Update -lm line
insert_lib
line POS(0) ARB . start ('$(top_builddir)/support/libmain.la'
+ ARB) . end RPOS(0)
OUTPUT = start '@DUMMY_CRT0@ \'
OUTPUT = DUPL(' ', SIZE(start)) end :(next_line)
* All lines transferred
all_done
END