summaryrefslogtreecommitdiffstats
path: root/misc-utils/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'misc-utils/Makefile')
-rw-r--r--misc-utils/Makefile40
1 files changed, 28 insertions, 12 deletions
diff --git a/misc-utils/Makefile b/misc-utils/Makefile
index e8e517fea..f69f0c1ef 100644
--- a/misc-utils/Makefile
+++ b/misc-utils/Makefile
@@ -1,45 +1,56 @@
# Makefile -- Makefile for util-linux Linux utilities
# Created: Sat Dec 26 20:09:40 1992
-# Revised: Thu Feb 16 10:00:24 1995 by faith@cs.unc.edu
+# Revised: Fri Oct 6 20:27:07 1995 by r.faith@ieee.org
# Copyright 1992, 1993, 1994, 1995 Rickard E. Faith (faith@cs.unc.edu)
+# May be distirbuted under the GPL
#
include ../MCONFIG
# Where to put man pages?
-MAN1= cal.1 clear.1 dnsdomainname.1 domainname.1 dsplit.1 \
- hostid.1 hostname.1 kill.1 logger.1 look.1 mcookie.1 \
- md5sum.1 namei.1 reset.1 script.1 setterm.1 tsort.1 \
+MAN1= cal.1 chkdupexe.1 ddate.1 dnsdomainname.1 domainname.1 \
+ dsplit.1 hostid.1 hostname.1 kill.1 logger.1 look.1 mcookie.1 \
+ namei.1 reset.1 script.1 setterm.1 tsort.1 \
whereis.1 write.1
+ifeq "$(HAVE_CLEAR)" "no"
+MAN1:=$(MAN1) clear.1
+endif
+
# Where to put binaries?
# See the "install" rule for the links. . .
BIN= domainname hostname kill
-USRBIN= cal clear dsplit hostid logger look mcookie md5sum namei \
- reset script setterm tsort whereis write
+USRBIN= cal chkdupexe ddate dsplit hostid logger look mcookie \
+ namei reset script setterm tsort whereis write
+
+ifeq "$(HAVE_CLEAR)" "no"
+USRBIN:=$(USRBIN) clear
+endif
# Programs requiring special compilation
NEEDS_TERMCAP= setterm
-SCRIPTS= clear reset
all: $(BIN) $(USRBIN) $(USRBIN.NONSHADOW) $(USRGAMES) getoptprog
-%.o: %.c
- $(CC) -c $(CFLAGS) $< -o $@
-
$(NEEDS_TERMCAP):
$(CC) $(LDFLAGS) $^ -o $@ -ltermcap
-$(SCRIPTS):
+%: %.sh
cp $@.sh $@
+ chmod 755 $@
+
+%: %.pl
+ cp $@.pl $@
+ chmod 755 $@
# Rules for everything else
cal: cal.o $(BSD)/getopt.o $(BSD)/err.o
+chkdupexe: chkdupexe.pl
clear: clear.sh
domainname: domainname.o
dsplit: dsplit.o
@@ -48,7 +59,8 @@ hostid: hostid.o
hostname: hostname.o
kill: kill.o procs.o
logger: logger.o $(BSD)/getopt.o
-md5sum: md5.o
+mcookie: mcookie.o md5.o
+md5sum: md5sum.o md5.o
md5.o: md5.h
namei: namei.o
reset: reset.sh
@@ -65,6 +77,10 @@ install: all
$(INSTALLDIR) $(MAN1DIR) $(MAN8DIR)
$(INSTALLMAN) $(MAN1) $(MAN1DIR)
$(INSTALLMAN) getoptprog.1 $(MAN1DIR)/getopt.1
+ifeq "$(USE_TTY_GROUP)" "yes"
+ chgrp tty $(USRBINDIR)/write
+ chmod g+s $(USRBINDIR)/write
+endif
.PHONY: clean
clean: