You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB

  1. commit f96d9f9d2e3ba39352035e6ac26463243484d404
  2. Author: Sebastian Kemper <sebastian_ml@gmx.net>
  3. Date: Sun Jan 13 19:25:52 2019 +0100
  4. Setup .pc file to allow use for cross-compiling
  5. The Makefile is currently creating the pkg-config file using static lib
  6. and include dir statements. Change that so that projects that
  7. cross-compile hiredis can use pkg-config to setup other programs
  8. depending on it.
  9. Note: these projects (like OpenWrt) call pkg-config with arguments to
  10. overwrite some variables in the .pc file, namely:
  11. --define-variable=prefix=<...>
  12. --define-variable=exec_prefix=<...>
  13. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
  14. diff --git a/Makefile b/Makefile
  15. index 07b8a83..14d21de 100644
  16. --- a/Makefile
  17. +++ b/Makefile
  18. @@ -166,8 +166,8 @@ $(PKGCONFNAME): hiredis.h
  19. @echo "Generating $@ for pkgconfig..."
  20. @echo prefix=$(PREFIX) > $@
  21. @echo exec_prefix=\$${prefix} >> $@
  22. - @echo libdir=$(PREFIX)/$(LIBRARY_PATH) >> $@
  23. - @echo includedir=$(PREFIX)/$(INCLUDE_PATH) >> $@
  24. + @echo libdir=\$${exec_prefix}/$(LIBRARY_PATH) >> $@
  25. + @echo includedir=\$${prefix}/$(INCLUDE_PATH) >> $@
  26. @echo >> $@
  27. @echo Name: hiredis >> $@
  28. @echo Description: Minimalistic C client library for Redis. >> $@