From 43fe67e5cbb60e035fffc44cf9566765f8d07fc7 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Thu, 11 Jan 2024 14:41:05 -0800 Subject: Make man page compression optional --- config.def.lua | 3 +++ ninja.lua | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config.def.lua b/config.def.lua index 4007ca11..f3ce56a0 100644 --- a/config.def.lua +++ b/config.def.lua @@ -7,6 +7,9 @@ return { -- install prefix prefix='', + -- compress man pages + gzman=true, + -- package/file selection fs={ -- Each entry contains a list of packages, a list of patterns to diff --git a/ninja.lua b/ninja.lua index ed73a955..7481be4d 100644 --- a/ninja.lua +++ b/ninja.lua @@ -498,8 +498,11 @@ function man(srcs, section) if ext then base = base:sub(1, -(#ext + 2)) end ext = section end - build('gzip', out, src) - file('share/man/man'..ext..'/'..base..'.'..ext, '644', out) + if config.gzman ~= false then + build('gzip', out, src) + src = out + end + file('share/man/man'..ext..'/'..base..'.'..ext, '644', src) end end -- cgit v1.2.3