Module Name:    src
Committed By:   mrg
Date:           Wed Jun 29 05:18:33 UTC 2011

Modified Files:
        src/external/lgpl3/gmp: build-gmp-Makefile.inc.awk

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


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk
diff -u src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.1 src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.2
--- src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.1	Fri Jun 24 03:50:23 2011
+++ src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk	Wed Jun 29 05:18:32 2011
@@ -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])

Reply via email to