Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add build/install logic for prun manpages
  • Loading branch information
donald committed Aug 12, 2021
1 parent e0336eb commit d841b64
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
setuid/setuid
prun/*.1
16 changes: 11 additions & 5 deletions Makefile
Expand Up @@ -64,13 +64,18 @@ INSTALL=install -v
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644

all:
@echo 'Nothing to be done. Ready for "make install"'
manpages += prun/prun.1 prun/pman.1 prun/ptype.1

install:
all: $(manpages)

clean:
@rm $(manpages)

install: all
@prefix="$(prefix)" usr_prefix="$(usr_prefix)" usrlocal_prefix="$(usrlocal_prefix)" \
root_exec_prefix="$(root_exec_prefix)" root_bindir="$(root_bindir)" root_sbindir="$(root_sbindir)" \
usr_exec_prefix="$(usr_exec_prefix)" usr_bindir="$(usr_bindir)" usr_sbindir="$(usr_sbindir)" \
usr_mandir="$(usr_mandir)" \
usrlocal_exec_prefix="$(usrlocal_exec_prefix)" usrlocal_bindir="$(usrlocal_bindir)" usrlocal_sbindir="$(usrlocal_sbindir)" \
sysconfdir="$(sysconfdir)" systemdunitdir="$(systemdunitdir)" \
udev_rulesdir="$(udev_rulesdir)" udev_helperdir="$(udev_helperdir)" \
Expand All @@ -79,6 +84,7 @@ install:
DESTDIR="$(DESTDIR)" \
./install.sh

.PHONY: all install

.PHONY: all install clean

%.1: %.md
pandoc --standalone --to man $< -o $@
4 changes: 4 additions & 0 deletions install.sh
Expand Up @@ -21,6 +21,7 @@ fi
: ${usr_exec_prefix:=$usr_prefix}
: ${usr_bindir:=$usr_exec_prefix/bin}
: ${usr_sbindir:=$usr_exec_prefix/sbin}
: ${usr_mandir:=$usr_exec_prefix/man}

: ${usrlocal_exec_prefix:=$usrlocal_prefix}
: ${usrlocal_bindir:=$usrlocal_exec_prefix/bin}
Expand Down Expand Up @@ -223,6 +224,9 @@ install_data mxshadow/mxshadow.conf "$DESTDIR$sysconfdir/m
install_data mxshadow/mxshadow.service "$DESTDIR$systemdunitdir/mxshadow.service"
install_data misc_etc_files/nsswitch.conf "$DESTDIR$sysconfdir/nsswitch.conf"
install_exec vmcontrol/vmcontrol.pl "$DESTDIR$usr_bindir/vmcontrol.pl"
install_data prun/prun.1 "$DESTDIR$usr_mandir/man1/prun.1"
install_data prun/ptype.1 "$DESTDIR$usr_mandir/man1/ptype.1"
install_data prun/pman.1 "$DESTDIR$usr_mandir/man1/pman.1"

postinstall
exit

0 comments on commit d841b64

Please sign in to comment.