Rename manpages to match the proper section

Install manpages to the right place, ensure their permissions
is set correctly.
This commit is contained in:
sin 2013-10-17 11:41:48 +01:00
parent c0c5620074
commit 8c2bbb8fb3
7 changed files with 17 additions and 3 deletions

View File

@ -44,9 +44,19 @@ SRC = \
uptime.c \
watch.c
MAN1 = \
chvt.1 \
clear.1 \
df.1 \
eject.1
MAN8 = \
halt.8 \
lsmod.8 \
lsusb.8
OBJ = $(SRC:.c=.o) $(LIB)
BIN = $(SRC:.c=)
MAN = $(SRC:.c=.1)
all: options binlib
@ -83,8 +93,12 @@ install: all
@cd $(DESTDIR)$(PREFIX)/bin && chmod 755 $(BIN)
@echo installing manual pages to $(DESTDIR)$(MANPREFIX)/man1
@mkdir -p $(DESTDIR)$(MANPREFIX)/man1
@for m in $(MAN); do sed "s/VERSION/$(VERSION)/g" < "$$m" > $(DESTDIR)$(MANPREFIX)/man1/"$$m"; done
@cd $(DESTDIR)$(MANPREFIX)/man1 && chmod 644 $(MAN)
@for m in $(MAN1); do sed "s/VERSION/$(VERSION)/g" < "$$m" > $(DESTDIR)$(MANPREFIX)/man1/"$$m"; done
@echo installing manual pages to $(DESTDIR)$(MANPREFIX)/man8
@mkdir -p $(DESTDIR)$(MANPREFIX)/man8
@for m in $(MAN8); do sed "s/VERSION/$(VERSION)/g" < "$$m" > $(DESTDIR)$(MANPREFIX)/man8/"$$m"; done
@chmod 644 $(DESTDIR)$(MANPREFIX)/man1/$(MAN1)
@chmod 644 $(DESTDIR)$(MANPREFIX)/man8/$(MAN8)
uninstall:
@echo removing executables from $(DESTDIR)$(PREFIX)/bin

0
clear.1 Executable file → Normal file
View File

0
df.1 Executable file → Normal file
View File

0
eject.1 Executable file → Normal file
View File

0
halt.1 → halt.8 Executable file → Normal file
View File

0
lsmod.1 → lsmod.8 Executable file → Normal file
View File

0
lsusb.1 → lsusb.8 Executable file → Normal file
View File