etc/protocols - sync with NetBSD-8
[minix.git] / external / lgpl3 / gmp / build-gmp-Makefile.inc.awk
blobd749115b7e7e26c320ae3faa8155f8bc32170869
1 #! /usr/bin/awk -f
3 /^config.status: linking/ {
4 # $3 = src
5 # $5 = dst
7 sub(/mpn\//, "", $5)
8 sub(/.*external\/lgpl3\/gmp\/dist\//, "", $3)
10 srcname = $3
11 sub(/.*\//, "", srcname)
13 if (match($3, /\.c$/)) {
14 if ($5 == srcname) {
15 c_list[$5] = $3
16 } else {
17 c_src_list[$5] = $3
19 } else if (match($3, /\.(asm|s|S)$/)) {
20 asm_list[$5] = $3
24 END {
25 printf("SRCS+= \\\n");
26 for (c in c_list) {
27 printf("\t%s \\\n", c)
29 printf("\nC_SRCS_LIST= \\\n");
30 for (c in c_src_list) {
31 printf("\t%s\t\t%s \\\n", c, c_src_list[c])
33 printf("\nASM_SRCS_LIST= \\\n");
34 for (asm in asm_list) {
35 printf("\t%s\t\t%s \\\n", asm, asm_list[asm])