From b2ac05ba7d98d6553772908c5b9edbc5f4a804f5 Mon Sep 17 00:00:00 2001
From: devttys0 <heffnercj@gmail.com>
Date: Fri, 18 Apr 2014 17:10:53 -0400
Subject: [PATCH] Moved configure execution out of Makefile

---
 configure      |  5 +++++
 configure.ac   |  5 +++++
 src/C/Makefile | 10 ++--------
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index cf3d04b..b51513f 100755
--- a/configure
+++ b/configure
@@ -3287,6 +3287,11 @@ else
 	INSTALL_OPTIONS="-D -m644"
 fi
 
+cd ./src/C/file-*/ && ./configure || exit 1
+cd -
+cd ./src/C/ssdeep-*/ && ./configure || exit 1
+cd -
+
 SONAME=$SONAME
 
 SOEXT=$SOEXT
diff --git a/configure.ac b/configure.ac
index 211d8b3..efc68ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,6 +20,11 @@ else
 	INSTALL_OPTIONS="-D -m644"
 fi
 
+cd ./src/C/file-*/ && ./configure || exit 1
+cd -
+cd ./src/C/ssdeep-*/ && ./configure || exit 1
+cd -
+
 AC_SUBST(SONAME, $SONAME)
 AC_SUBST(SOEXT, $SOEXT)
 AC_SUBST(INSTALL_OPTIONS, $INSTALL_OPTIONS)
diff --git a/src/C/Makefile b/src/C/Makefile
index 48631a9..00f2300 100644
--- a/src/C/Makefile
+++ b/src/C/Makefile
@@ -1,9 +1,9 @@
 FILE_VERSION="5.14"
 SSDEEP_VERSION="2.10"
 
-.PHONY: all install clean distclean uninstall file_src_configure file_make_prep ssdeep_src_configure ssdeep_make_prep
+.PHONY: all install clean distclean uninstall file_make_prep ssdeep_make_prep
 
-all: ssdeep_src_configure ssdeep_make_prep file_src_configure file_make_prep
+all: ssdeep_make_prep file_make_prep
 	make -C miniz
 	make -C compress
 	make -C ssdeep-$(SSDEEP_VERSION) libfuzzybinwalk.la
@@ -34,16 +34,10 @@ uninstall:
 	make -C ssdeep-$(SSDEEP_VERSION) uninstall-libLTLIBRARIES
 	make -C file-$(FILE_VERSION)/src uninstall-libLTLIBRARIES
 
-file_src_configure:
-	if [ ! -e ./file-$(FILE_VERSION)/Makefile ]; then cd ./file-$(FILE_VERSION) && ./configure; fi
-
 file_make_prep:
 	sed -e s/libmagic/libmagicbinwalk/g < ./file-$(FILE_VERSION)/src/Makefile >./file-$(FILE_VERSION)/src/mktmp
 	mv ./file-$(FILE_VERSION)/src/mktmp ./file-$(FILE_VERSION)/src/Makefile
 
-ssdeep_src_configure:
-	if [ ! -e ./file-ssdeep-2.10/Makefile ]; then cd ./ssdeep-2.10 && ./configure; fi
-
 ssdeep_make_prep:
 	sed -e s/libfuzzy/libfuzzybinwalk/g < ./ssdeep-$(SSDEEP_VERSION)/Makefile >./ssdeep-$(SSDEEP_VERSION)/mktmp
 	mv ./ssdeep-$(SSDEEP_VERSION)/mktmp ./ssdeep-$(SSDEEP_VERSION)/Makefile
--
libgit2 0.26.0