001-add-make-ENABLE_DOCS-configurable.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. +++ a/programs/Makefile 2022-08-15 15:45:31.000000000 -0700
  2. --- b/programs/Makefile 2022-11-28 16:34:21.315593784 -0800
  3. @@ -66,6 +66,7 @@
  4. MD2ROFF = ronn
  5. MD2ROFF_FLAGS = --roff --warnings --manual="User Commands" --organization="lz4 $(LZ4_VERSION)"
  6. +ENABLE_DOCS ?= 1
  7. default: lz4-release
  8. @@ -120,6 +121,7 @@
  9. lz4c32 : $(SRCFILES)
  10. $(CC) $(FLAGS) $^ -o $@$(EXT)
  11. +ifeq ($(ENABLE_DOCS),1)
  12. lz4.1: lz4.1.md $(LIBVER_SRC)
  13. cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | $(SED) -n '/^\.\\\".*/!p' > $@
  14. @@ -130,6 +132,7 @@
  15. preview-man: clean-man man
  16. man ./lz4.1
  17. +endif
  18. clean:
  19. ifeq ($(WINBASED),yes)
  20. @@ -172,16 +175,19 @@
  21. install: lz4
  22. @echo Installing binaries in $(DESTDIR)$(bindir)
  23. - $(INSTALL_DIR) $(DESTDIR)$(bindir)/ $(DESTDIR)$(man1dir)/
  24. + $(INSTALL_DIR) $(DESTDIR)$(bindir)/
  25. $(INSTALL_PROGRAM) lz4$(EXT) $(DESTDIR)$(bindir)/lz4$(EXT)
  26. $(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4c$(EXT)
  27. $(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4cat$(EXT)
  28. $(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/unlz4$(EXT)
  29. +ifeq ($(ENABLE_DOCS),1)
  30. @echo Installing man pages in $(DESTDIR)$(man1dir)
  31. + $(INSTALL_DIR) $(DESTDIR)$(man1dir)/
  32. $(INSTALL_DATA) lz4.1 $(DESTDIR)$(man1dir)/lz4.1
  33. $(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4c.1
  34. $(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4cat.1
  35. $(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/unlz4.1
  36. +endif
  37. @echo lz4 installation completed
  38. uninstall:
  39. @@ -189,10 +195,12 @@
  40. $(RM) $(DESTDIR)$(bindir)/unlz4$(EXT)
  41. $(RM) $(DESTDIR)$(bindir)/lz4$(EXT)
  42. $(RM) $(DESTDIR)$(bindir)/lz4c$(EXT)
  43. +ifeq ($(ENABLE_DOCS),1)
  44. $(RM) $(DESTDIR)$(man1dir)/lz4.1
  45. $(RM) $(DESTDIR)$(man1dir)/lz4c.1
  46. $(RM) $(DESTDIR)$(man1dir)/lz4cat.1
  47. $(RM) $(DESTDIR)$(man1dir)/unlz4.1
  48. +endif
  49. @echo lz4 programs successfully uninstalled
  50. endif