1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
prefix = $(DESTDIR)@prefix@
mandir = ${prefix}/share/man
sysconfdir = $(DESTDIR)/etc
INSTALL=install
CFLAGS=-Wl,-z,now -O2 -Wall -Wstrict-prototypes -Werror -g \
-DDCHROOT_VERSION="\"@DCHROOT_VERSION@\""
all: dchroot
docs: dchroot.1
dchroot : dchroot.c
$(CC) $(CFLAGS) $@.c -o $@
install: all
$(INSTALL) -d $(prefix)/bin
$(INSTALL) --mode=4755 dchroot $(prefix)/bin
$(INSTALL) -d $(sysconfdir)
$(INSTALL) --mode=0644 dchroot.conf $(sysconfdir)
$(INSTALL) -d $(prefix)/share/man/man1
$(INSTALL) dchroot.1 $(prefix)/share/man/man1
clean:
$(RM) dchroot.1 dchroot *~ *.o
dchroot.1: dchroot dchroot.inc
help2man --manual="User Commands" \
--name="Execute a command under a different root filesystem." \
--section=1 \
--source=Debian \
--output=dchroot.1 \
--include=dchroot.inc \
--no-info \
-h "-h" \
-v "-V" \
./dchroot
distclean: clean
$(RM) config.log config.cache config.status Makefile
|