[Cryptech-Commits] [user/sra/libtfm] 01/03: Use a git submodule to hold upstream source instead of home-grown hack.

git at cryptech.is git at cryptech.is
Tue Jul 7 17:00:55 UTC 2015


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch master
in repository user/sra/libtfm.

commit eb05d765f4142aee3e17957daa35d9bd1cc2a1c0
Author: Rob Austein <sra at hactrn.net>
Date:   Tue Jul 7 12:44:12 2015 -0400

    Use a git submodule to hold upstream source instead of home-grown hack.
---
 .gitignore   |  1 -
 .gitmodules  |  3 +++
 GNUmakefile  | 17 +++++------------
 tomsfastmath |  1 +
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/.gitignore b/.gitignore
index e1858fb..50b7b11 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,3 @@
 TAGS
 libtfm.a
 tfm.h
-tomsfastmath
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..0c2306f
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "tomsfastmath"]
+	path = tomsfastmath
+	url = https://github.com/libtom/tomsfastmath.git
diff --git a/GNUmakefile b/GNUmakefile
index be66adb..c2f02dd 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,18 +1,11 @@
-# Download and build libtfm from source with the options we want.
-
-# Commit against which we've been testing.  Perhaps we should be using
-# a git subrepository instead of this hack?
-
-URL	:= https://github.com/libtom/tomsfastmath.git
-COMMIT	:= e0fe602802e376a971a84ba300ad0aab17165600
+# Use a git submodule to download and build libtfm with the options we want.
 
 # Maximum size of a bignum.  See tfm.pdf section 1.3.6 ("Precision
 # configuration") for details on how FP_MAX_SIZE works.
 
 BITS	:= 8192
 
-
-REPO	:= $(notdir $(basename ${URL}))
+REPO	:= tomsfastmath
 HDR	:= ${REPO}/src/headers/tfm.h
 LIB	:= ${REPO}/libtfm.a
 
@@ -29,11 +22,11 @@ clean:
 	cd ${REPO}; git clean -dxf
 
 distclean: clean
-	rm -rf ${REPO} TAGS
+	git submodule deinit
+	rm -f TAGS
 
 ${HDR}:
-	git clone --quiet --no-checkout ${URL}
-	cd ${REPO}; git checkout --quiet ${COMMIT}
+	git submodule update --init
 
 ${LIB}: ${HDR}
 ifeq "" "${SHA256SUM}"
diff --git a/tomsfastmath b/tomsfastmath
new file mode 160000
index 0000000..e0fe602
--- /dev/null
+++ b/tomsfastmath
@@ -0,0 +1 @@
+Subproject commit e0fe602802e376a971a84ba300ad0aab17165600



More information about the Commits mailing list