From: Todd C. Miller Date: Sat, 12 Jan 2002 18:15:34 +0000 (+0000) Subject: Sync install targets with Makefile.in and substitute in man sections. X-Git-Tag: SUDO_1_6_4~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6be68c6735e07bed67f3ba24e14eb26714a4ba4;p=sudo Sync install targets with Makefile.in and substitute in man sections. --- diff --git a/Makefile.binary b/Makefile.binary index 3c9f8f0f8..492d02ed8 100644 --- a/Makefile.binary +++ b/Makefile.binary @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 1998-2001 Todd C. Miller +# Copyright (c) 1996, 1998-2002 Todd C. Miller # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -58,12 +58,11 @@ visudodir = $(sbindir) sudoersdir = $(sysconfdir) # Directory in which to install the man page -# set mansect5 to 4 on sysV machines. -mantype = man -mansect8 = 8 -mansect5 = 5 -mandir8 = $(mandir)/$(mantype)$(mansect8) -mandir5 = $(mandir)/$(mantype)$(mansect5) +mantype = @MANTYPE@ +mansectsu = @mansectsu@ +mansectform = @mansectform@ +mandirsu = $(mandir)/$(mantype)$(mansectsu) +mandirform = $(mandir)/$(mantype)$(mansectform) # User and group ids the installed files should be "owned" by install_uid = 0 @@ -84,27 +83,26 @@ all: $(PROGS) install: install-dirs install-binaries install-sudoers install-man install-dirs: - $(srcdir)/mkinstalldirs $(sudodir) $(visudodir) $(sudoersdir) $(mandir8) $(mandir5) + $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)/$(sudodir) \ + $(DESTDIR)/$(visudodir) $(DESTDIR)/$(sudoersdir) \ + $(DESTDIR)/$(mandirsu) $(DESTDIR)/$(mandirform) install-binaries: $(PROGS) - $(INSTALL) -o $(install_uid) -g $(install_gid) -m 4111 -s sudo $(sudodir)/sudo - $(INSTALL) -o $(install_uid) -g $(install_gid) -m 0111 -s visudo $(visudodir)/visudo + $(INSTALL) -O $(install_uid) -G $(install_gid) -M 4111 sudo $(DESTDIR)/$(sudodir)/sudo + $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0111 visudo $(DESTDIR)/$(visudodir)/visudo install-sudoers: - @ if [ -f $(sudoersdir)/sudoers ]; then \ - echo "Setting user/group and mode on existing $(sudoersdir)/sudoers file."; \ - chown $(sudoers_uid) $(sudoersdir)/sudoers; \ - chgrp $(sudoers_gid) $(sudoersdir)/sudoers; \ - chmod $(sudoers_mode) $(sudoersdir)/sudoers; \ - else \ - $(INSTALL) -o $(sudoers_uid) -g $(sudoers_gid) -m $(sudoers_mode) \ - $(srcdir)/sudoers $(sudoersdir)/sudoers; \ - fi + test -f $(DESTDIR)/$(sudoersdir)/sudoers || \ + $(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -M $(sudoers_mode) \ + $(srcdir)/sudoers $(DESTDIR)/$(sudoersdir)/sudoers install-man: - $(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 $(srcdir)/sudo.$(mantype) $(mandir8)/sudo.$(mansect8) - $(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 $(srcdir)/visudo.$(mantype) $(mandir8)/visudo.$(mansect8) - $(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 $(srcdir)/sudoers.$(mantype) $(mandir5)/sudoers.$(mansect5) + $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $(srcdir)/sudo.$(mantype) $(DESTDIR)/$(mandirsu)/sudo.$(mansectsu) + $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $(srcdir)/visudo.$(mantype) $(DESTDIR)/$(mandirsu)/visudo.$(mansectsu) + $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $(srcdir)/sudoers.$(mantype) $(DESTDIR)/$(mandirform)/sudoers.$(mansectform) + +check: + @echo nothing to check clean: @echo nothing to clean