Module Name:    src
Committed By:   mrg
Date:           Tue Aug 22 09:57:18 UTC 2017

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

Log Message:
update these for GMP 6.1.2, and start to make it more automatic.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/lgpl3/gmp/Makefile.netbsd-gmp
cvs rdiff -u -r1.3 -r1.4 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/Makefile.netbsd-gmp
diff -u src/external/lgpl3/gmp/Makefile.netbsd-gmp:1.4 src/external/lgpl3/gmp/Makefile.netbsd-gmp:1.5
--- src/external/lgpl3/gmp/Makefile.netbsd-gmp:1.4	Tue Mar 18 18:20:36 2014
+++ src/external/lgpl3/gmp/Makefile.netbsd-gmp	Tue Aug 22 09:57:18 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.netbsd-gmp,v 1.4 2014/03/18 18:20:36 riastradh Exp $
+# $NetBSD: Makefile.netbsd-gmp,v 1.5 2017/08/22 09:57:18 mrg Exp $
 
 # hack makefile to help build gmp ./configure
 
@@ -15,5 +15,18 @@ ENV_ARGS=\
 			NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \
 			LIBS=-lintl
 
+.include "Makefile.arch"
+NEWCONFIGDIR?=	${NETBSDSRCDIR}
+ARCHDIR=	${NEWCONFIGDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH}
+
 all:
-	env ${ENV_ARGS} ${NETBSDSRCDIR}/external/lgpl3/gmp/dist/configure --host=${TARGET} --target=${TARGET}
+	mkdir -p build
+	cd build && env ${ENV_ARGS} ${NETBSDSRCDIR}/external/lgpl3/gmp/dist/configure --host=${TARGET} --target=${TARGET}
+
+copy-files:
+	cd build && cp gmp.h gmp-mparam.h config.h config.m4 ${ARCHDIR}
+	sed -i -e 's/define.*CONFIG_TOP_SRCDIR.*//' ${ARCHDIR}/config.m4
+	sed -i -e 's/__GMP_CC.*/__GMP_CC "gcc"/' ${ARCHDIR}/gmp.h
+	sed -i -e 's/GMP_MPARAM_H_SUGGEST[ 	]"\/.*dist\/mpn/GMP_MPARAM_H_SUGGEST ".\/mpn/' ${ARCHDIR}/config.h
+
+.include <bsd.obj.mk>

Index: src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk
diff -u src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.3 src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.4
--- src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.3	Sat Jul  2 14:03:20 2011
+++ src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk	Tue Aug 22 09:57:18 2017
@@ -7,25 +7,25 @@
 	sub(/mpn\//, "", $5)
 	sub(/.*external\/lgpl3\/gmp\/dist\//, "", $3)
 
-	srcname = $3
-	sub(/.*\//, "", srcname)
+	#srcname = $3
+	#sub(/mpn\//, "", srcname)
 
 	if (match($3, /\.c$/)) {
-		if ($5 == srcname) {
-			c_list[$5] = $3
-		} else {
+		#if ($5 == srcname) {
+		#	c_list[$5] = $3
+		#} else {
 			c_src_list[$5] = $3
-		}
+		#}
 	} else if (match($3, /\.(asm|s|S)$/)) {
 		asm_list[$5] = $3
 	}
 }
 
 END {
-	printf("SRCS+= \\\n");
-	for (c in c_list) {
-		printf("\t%s \\\n", c)
-	}
+	#printf("MPN_SRCS+= \\\n");
+	#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])

Reply via email to