wmutils

X windows manipulation utilities
git clone git://z3bra.org/wmutils
Log | Files | Refs | LICENSE

commit e7584e8ecd18f7a322bd1799fd7f3f5dde045031
parent eef39204878016fdcc0959132e8c3627e45eaf14
Author: z3bra <willy@mailoo.org>
Date:   Tue Apr 28 19:49:57 2015

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:
 Makefile     | 12 ++++--------
 config.mk    |  3 +--
 man/Makefile | 14 +-------------
 3 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/Makefile b/Makefile @@ -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: @@ -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 diff --git a/config.mk b/config.mk @@ -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 diff --git a/man/Makefile b/man/Makefile @@ -1,6 +1,6 @@ include ../config.mk -SRC = \ +MAN = \ pfw.1 \ lsw.1 \ mapw.1 \ @@ -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/ @@ -36,6 +27,3 @@ uninstall: @for page in $(MAN); do \ rm -f $(DESTDIR)$(MANPREFIX)/man1/$$page; \ done - -clean : - rm -f $(MAN)