summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-12-13 11:49:16 +0000
committerbde <bde@FreeBSD.org>1996-12-13 11:49:16 +0000
commit70b4f8641ffc5741e665c1e5377f766559196b4a (patch)
treebe2977ba5841fce1f659d28bb18c8e30134ec209
parentf17b038732f5b0aa0ffef4f3364127a65adda505 (diff)
downloadFreeBSD-src-70b4f8641ffc5741e665c1e5377f766559196b4a.zip
FreeBSD-src-70b4f8641ffc5741e665c1e5377f766559196b4a.tar.gz
Restored installation of /etc/magic. It's now a symlink instead of a
file (like /etc/termcap). /usr/src/etc/Makefile depends on there being an etc-magic install rule here, and who-knows-what depends on `magic' being in /etc. Fixed some style bugs - don't use -c for installing files in the obj directory...
-rw-r--r--usr.bin/file/Makefile19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/file/Makefile b/usr.bin/file/Makefile
index d1ff65d..9199103 100644
--- a/usr.bin/file/Makefile
+++ b/usr.bin/file/Makefile
@@ -1,6 +1,6 @@
# Makefile for file(1) cmd.
# Copyright (c) Ian F. Darwin 86/09/01 - see LEGAL.NOTICE.
-# @(#)$Id: Makefile,v 1.5 1996/08/17 22:27:08 wosch Exp $
+# @(#)$Id: Makefile,v 1.6 1996/12/11 14:09:10 joerg Exp $
#
# This software is not subject to any license of the American Telephone
# and Telegraph Company or of the Regents of the University of California.
@@ -23,13 +23,13 @@
# 4. This notice may not be removed or altered.
#
# Hacked and dismembered for bmake (Geoff Rehmet).
-MAGIC= /usr/share/misc/magic
+
+MAGICDIR= /usr/share/misc
MAGICOWN= bin
MAGICGRP= bin
MAGICMODE= 444
-
-CFLAGS+= -DMAGIC='"$(MAGIC)"'
+CFLAGS+= -DMAGIC='"$(MAGICDIR)/magic"'
PROG= file
SRCS= file.c apprentice.c fsmagic.c softmagic.c ascmagic.c \
@@ -44,16 +44,17 @@ MAGFILES= $(.CURDIR)/Magdir/Header\
$(.CURDIR)/Magdir/Localstuff\
$(.CURDIR)/Magdir/[a-z]*
-
all: file magic
magic: $(MAGFILES)
cat $(MAGFILES) > $(.TARGET)
-# called from /usr/src/etc/Makefile
beforeinstall:
- ${INSTALL} -c -o $(MAGICOWN) -g $(MAGICGRP) -m $(MAGICMODE) magic \
- $(DESTDIR)$(MAGIC)
+ $(INSTALL) $(COPY) -o $(MAGICOWN) -g $(MAGICGRP) -m $(MAGICMODE) \
+ magic $(DESTDIR)$(MAGICDIR)/magic
-.include <bsd.prog.mk>
+etc-magic:
+ rm -f ${DESTDIR}/etc/magic
+ ln -s ${MAGICDIR}/magic ${DESTDIR}/etc/magic
+.include <bsd.prog.mk>
OpenPOWER on IntegriCloud