tChanged the way manpages are handled - wmutils - X windows manipulation utilities
(HTM) git clone git://z3bra.org/wmutils
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit e7584e8ecd18f7a322bd1799fd7f3f5dde045031
(DIR) parent eef39204878016fdcc0959132e8c3627e45eaf14
(HTM) Author: z3bra <willy@mailoo.org>
Date: Tue, 28 Apr 2015 19:49:57 +0200
Changed the way manpages are handled
It's not the makefile's job to zip the manpages. It should be the
package manager's job.
This result in a simpler makefile, which is great.
Diffstat:
M Makefile | 12 ++++--------
M config.mk | 3 +--
M man/Makefile | 14 +-------------
3 files changed, 6 insertions(+), 23 deletions(-)
---
(DIR) diff --git a/Makefile b/Makefile
t@@ -19,18 +19,15 @@ SRC = \
OBJ = $(SRC:.c=.o)
BIN = $(SRC:.c=)
-MAN = $(SRC:.c=.1.gz)
+MAN = $(SRC:.c=.1)
.POSIX:
.SUFFIXES: .1 .1.gz
-all: binutils manpages
+all: binutils
binutils: $(BIN)
-manpages:
- cd man; $(MAKE) $(MFLAGS)
-
$(OBJ): $(HDR) util.o
.o:
t@@ -44,15 +41,14 @@ $(OBJ): $(HDR) util.o
install: $(BIN)
mkdir -p $(DESTDIR)$(PREFIX)/bin/
cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin/
- cd man; $(MAKE) $(MFLAGS) install
+ cd man; $(MAKE) install
uninstall:
@echo "uninstalling binaries"
@for util in $(BIN); do \
rm -f $(DESTDIR)$(PREFIX)/bin/$$util; \
done
- cd man; $(MAKE) $(MFLAGS) uninstall
+ cd man; $(MAKE) uninstall
clean :
rm -f $(OBJ) $(BIN) util.o
- cd man; $(MAKE) $(MFLAGS) clean
(DIR) diff --git a/config.mk b/config.mk
t@@ -1,9 +1,8 @@
PREFIX:=/usr
-MANPREFIX:=$(PREFIX)/share/man
+MANPREFIX:=$(PREFIX)/man
CC := cc
LD := $(CC)
-GZ := gzip
CFLAGS += -std=c99 -pedantic -Wall -Os
LDFLAGS += -lxcb
(DIR) diff --git a/man/Makefile b/man/Makefile
t@@ -1,6 +1,6 @@
include ../config.mk
-SRC = \
+MAN = \
pfw.1 \
lsw.1 \
mapw.1 \
t@@ -16,16 +16,7 @@ SRC = \
wname.1 \
wmp.1
-MAN = $(SRC:.1=.1.gz)
-
.POSIX:
-.SUFFIXES: .1 .1.gz
-
-all: $(MAN)
-
-.1.1.gz:
- @echo "GZ $<"
- @$(GZ) -c $< > $@
install: $(MAN)
mkdir -p $(DESTDIR)$(MANPREFIX)/man1/
t@@ -36,6 +27,3 @@ uninstall:
@for page in $(MAN); do \
rm -f $(DESTDIR)$(MANPREFIX)/man1/$$page; \
done
-
-clean :
- rm -f $(MAN)