summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebian/rules8
-rw-r--r--src/Makefile2
2 files changed, 6 insertions, 4 deletions
diff --git a/debian/rules b/debian/rules
index 53a7e3e..6b5213a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,8 +4,10 @@
package=ivy-c
-VERSION=`sed -n 's/.*(\([^)]*\)).*/\1/p' debian/changelog | head -1 | sed -n 's/\([0-9]*\)\..*/\1/p'`
-MAJOR_MINOR=`sed -n 's/.*(\([^)]*\)).*/\1/p' debian/changelog | head -1 | sed -n 's/[0-9]*\.\([0-9\.]*\).*/\1/p'`
+SED_COMMAND_VERSION='s/.*(\([^)]*\)).*/\1/p'
+VERSION := $(shell sed -n $(SED_COMMAND_VERSION) debian/changelog | head -1 | sed -n 's/\([0-9]*\)\..*/\1/p')
+SED_COMMAND_MAJOR_MINOR='s/.*(\([^)]*\)).*/\1/p'
+MAJOR_MINOR := $(shell sed -n $(SED_COMMAND_MAJOR_MINOR) debian/changelog | head -1 | sed -n 's/[0-9]*\.\([0-9\.]*\).*/\1/p')
build:
$(checkdir)
@@ -33,7 +35,7 @@ binary-arch: checkroot build
install -d debian/tmp
cd debian/tmp && install -d `cat ../dirs`
- cd src && make install DESTDIR=`pwd`/../debian/tmp VERSION=$(VERSION) MAJOR=$(MAJOR) MINOR=$MINOR
+ cd src && make install DESTDIR=`pwd`/../debian/tmp VERSION=$(VERSION) MAJOR_MINOR=$(MAJOR_MINOR)
debstd
-rmdir debian/tmp/usr/include
diff --git a/src/Makefile b/src/Makefile
index a1d464b..40d7b7c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -24,7 +24,7 @@ all: static-libs commands shared-libs
static-libs: libivy.a libgivy.a libxtivy.a
-shared-libs: libivy.so.$(VERSION).$(MAJOR_MINOR) libgivy.so.$(VERSION).$(MAJOR_MINOR libxtivy.so.$(VERSION).$(MAJOR_MINOR)
+shared-libs: libivy.so.$(VERSION).$(MAJOR_MINOR) libgivy.so.$(VERSION).$(MAJOR_MINOR) libxtivy.so.$(VERSION).$(MAJOR_MINOR)
commands: testivy testxtivy