parent
6a7595a7b5
commit
ab37f07b59
@ -1,43 +0,0 @@
|
||||
From 4355ab3c8fa7ad98b8a21267f84ebbaf47e2d2f8 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Wiedenroth <wiedi@frubar.net>
|
||||
Date: Fri, 23 Jan 2015 19:01:19 +0100
|
||||
Subject: [PATCH] Fix Makefile install problems
|
||||
|
||||
Adds DESTDIR support
|
||||
Fixes INSTALL_PKGCONF_PATH
|
||||
Properly copies {read,shs}.h now during make install
|
||||
|
||||
Closes #297
|
||||
---
|
||||
Makefile | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index d683aec..c2cee1a 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -18,9 +18,9 @@ PREFIX?=/usr/local
|
||||
INCLUDE_PATH?=include/hiredis
|
||||
LIBRARY_PATH?=lib
|
||||
PKGCONF_PATH?=pkgconfig
|
||||
-INSTALL_INCLUDE_PATH= $(PREFIX)/$(INCLUDE_PATH)
|
||||
-INSTALL_LIBRARY_PATH= $(PREFIX)/$(LIBRARY_PATH)
|
||||
-INSTALL_PKGCONF_PATH= $(LIBRARY_PATH)/$(PKGCONF_PATH)
|
||||
+INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH)
|
||||
+INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
|
||||
+INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH)
|
||||
|
||||
# redis-server configuration used for testing
|
||||
REDIS_PORT=56379
|
||||
@@ -162,7 +162,7 @@ $(PKGCONFNAME): $(PKGCONF_SRCNAME)
|
||||
|
||||
install: $(DYLIBNAME) $(STLIBNAME)
|
||||
mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
|
||||
- $(INSTALL) hiredis.h async.h adapters $(INSTALL_INCLUDE_PATH)
|
||||
+ $(INSTALL) hiredis.h async.h read.h sds.h adapters $(INSTALL_INCLUDE_PATH)
|
||||
$(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
|
||||
cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME)
|
||||
cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MAJOR_NAME) $(DYLIBNAME)
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,70 +0,0 @@
|
||||
From 7b8ecb1d476fe6fc559fb897510052a547edb468 Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Meng <i@cicku.me>
|
||||
Date: Fri, 30 Jan 2015 17:36:38 +0800
|
||||
Subject: [PATCH] Fix make install again
|
||||
|
||||
For real, the commit 4355ab3c8fa7ad98b8a21267f84ebbaf47e2d2f8 messed up with RPM. I can't build 0.12.1 for Fedora.
|
||||
|
||||
I don't know why upstream accepted such fatal commit. And pkg-config file doesn't work as well.
|
||||
|
||||
Also dollar sign was not escaped. And the generated file was not good as some variables insiede pkgconfig is empty.
|
||||
|
||||
Anyway, I've corrected these.
|
||||
---
|
||||
Makefile | 30 +++++++++++++++---------------
|
||||
1 file changed, 15 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 805c2c5..19e4857 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -18,8 +18,8 @@ PREFIX?=/usr/local
|
||||
INCLUDE_PATH?=include/hiredis
|
||||
LIBRARY_PATH?=lib
|
||||
PKGCONF_PATH?=pkgconfig
|
||||
-INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH)
|
||||
-INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
|
||||
+INSTALL_INCLUDE_PATH= $(PREFIX)/$(INCLUDE_PATH)
|
||||
+INSTALL_LIBRARY_PATH= $(PREFIX)/$(LIBRARY_PATH)
|
||||
INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH)
|
||||
|
||||
# redis-server configuration used for testing
|
||||
@@ -150,25 +150,25 @@ INSTALL?= cp -a
|
||||
$(PKGCONFNAME): hiredis.h
|
||||
@echo "Generating $@ for pkgconfig..."
|
||||
@echo prefix=$(PREFIX) > $@
|
||||
- @echo exec_prefix=$${prefix} >> $@
|
||||
+ @echo exec_prefix=\$${prefix} >> $@
|
||||
@echo libdir=$(INSTALL_LIBRARY_PATH) >> $@
|
||||
@echo includedir=$(INSTALL_INCLUDE_PATH) >> $@
|
||||
@echo >> $@
|
||||
@echo Name: hiredis >> $@
|
||||
@echo Description: Minimalistic C client library for Redis. >> $@
|
||||
@echo Version: $(HIREDIS_MAJOR).$(HIREDIS_MINOR).$(HIREDIS_PATCH) >> $@
|
||||
- @echo Libs: -L$${libdir} -lhiredis >> $@
|
||||
- @echo Cflags: -I$${includedir} -D_FILE_OFFSET_BITS=64 >> $@
|
||||
-
|
||||
-install: $(DYLIBNAME) $(STLIBNAME)
|
||||
- mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
|
||||
- $(INSTALL) hiredis.h async.h read.h sds.h adapters $(INSTALL_INCLUDE_PATH)
|
||||
- $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
|
||||
- cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME)
|
||||
- cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MAJOR_NAME) $(DYLIBNAME)
|
||||
- $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
|
||||
- mkdir -p $(INSTALL_PKGCONF_PATH)
|
||||
- $(INSTALL) $(PKGCONFNAME) $(INSTALL_PKGCONF_PATH)
|
||||
+ @echo Libs: -L\$${libdir} -lhiredis >> $@
|
||||
+ @echo Cflags: -I\$${includedir} -D_FILE_OFFSET_BITS=64 >> $@
|
||||
+
|
||||
+install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME)
|
||||
+ mkdir -p $(DESTDIR)$(INSTALL_INCLUDE_PATH) $(DESTDIR)$(INSTALL_LIBRARY_PATH)
|
||||
+ $(INSTALL) hiredis.h async.h read.h sds.h adapters $(DESTDIR)$(INSTALL_INCLUDE_PATH)
|
||||
+ $(INSTALL) $(DYLIBNAME) $(DESTDIR)$(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
|
||||
+ cd $(DESTDIR)$(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME)
|
||||
+ cd $(DESTDIR)$(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MAJOR_NAME) $(DYLIBNAME)
|
||||
+ $(INSTALL) $(STLIBNAME) $(DESTDIR)$(INSTALL_LIBRARY_PATH)
|
||||
+ mkdir -p $(DESTDIR)$(INSTALL_PKGCONF_PATH)
|
||||
+ $(INSTALL) $(PKGCONFNAME) $(DESTDIR)$(INSTALL_PKGCONF_PATH)
|
||||
|
||||
32bit:
|
||||
@echo ""
|
Loading…
Reference in new issue