Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/lgpl3/gmp add support for C files that are linked t...



details:   https://anonhg.NetBSD.org/src/rev/e20a4ecdbcf9
branches:  trunk
changeset: 766640:e20a4ecdbcf9
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Jun 29 05:18:32 2011 +0000

description:
add support for C files that are linked to different names for building.

diffstat:

 external/lgpl3/gmp/build-gmp-Makefile.inc.awk |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r 40de7e3f9668 -r e20a4ecdbcf9 external/lgpl3/gmp/build-gmp-Makefile.inc.awk
--- a/external/lgpl3/gmp/build-gmp-Makefile.inc.awk     Wed Jun 29 05:06:03 2011 +0000
+++ b/external/lgpl3/gmp/build-gmp-Makefile.inc.awk     Wed Jun 29 05:18:32 2011 +0000
@@ -5,8 +5,17 @@
        # $5 = dst
 
        sub(/mpn\//, "", $5)
+       sub(/.*external\/lgpl3\/gmp\/dist\//, "", $3)
+
+       srcname = $3
+       sub(/.*\//, "", srcname)
+
        if (match($3, /\.c$/)) {
-               c_list[$5] = $3
+               if ($5 == srcname) {
+                       c_list[$5] = $3
+               } else {
+                       c_src_list[$5] = $3
+               }
        } else if (match($3, /\.asm$/)) {
                asm_list[$5] = $3
        }
@@ -14,11 +23,13 @@
 
 END {
        printf("SRCS+= \\\n");
-       # XXX check that the basenames are the same?
-       # XXX yeah - logops_n.c and popham.c may need this
        for (c in c_list) {
                printf("\t%s \\\n", c)
        }
+       printf("\nC_SRCS_LIST= \\\n");
+       for (c in c_src_list) {
+               printf("\t%s\t\t%s \\\n", c, c_src_list[c])
+       }
        printf("\nASM_SRCS_LIST= \\\n");
        for (asm in asm_list) {
                printf("\t%s\t\t%s \\\n", asm, asm_list[asm])



Home | Main Index | Thread Index | Old Index