1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

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...
This commit is contained in:
Bruce Evans 1996-12-13 11:49:16 +00:00
parent 7b69bdb95c
commit 7f782006b9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20394

View File

@ -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
etc-magic:
rm -f ${DESTDIR}/etc/magic
ln -s ${MAGICDIR}/magic ${DESTDIR}/etc/magic
.include <bsd.prog.mk>