summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2009-04-14 21:28:11 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2009-04-14 21:28:11 +0000
commit10437fbca8a612383c3f4500e0bbda0cdd78c3b2 (patch)
tree58476708327cda1744a26b3dafe744bbe61e4f60 /usr.bin
parent857b531ef333a89a8867fa73be8ca3e88bbd1c24 (diff)
force magic file to include all magdir files in alphabetical order,
preparing the way for upcoming update to file 4.24 almost entirely written by espie@ "Go ahead, commit it." espie@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/file/Makefile22
1 files changed, 15 insertions, 7 deletions
diff --git a/usr.bin/file/Makefile b/usr.bin/file/Makefile
index c498ac255ee..28cf145e4f1 100644
--- a/usr.bin/file/Makefile
+++ b/usr.bin/file/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.11 2008/11/09 23:00:42 espie Exp $
+# $OpenBSD: Makefile,v 1.12 2009/04/14 21:28:10 chl Exp $
MAGIC= /etc/magic
MAGICOWN= root
@@ -11,15 +11,23 @@ SRCS= file.c apprentice.c fsmagic.c softmagic.c ascmagic.c is_tar.c \
CFLAGS+= -DMAGIC='"$(MAGIC)"' -DUSE_UTIMES -DHAVE_CONFIG_H
MAN= file.1 magic.5
-CLEANFILES+= magic
+CLEANFILES+= magic post-magic
all: file magic
-MAGFILES= $(.CURDIR)/magdir/Header\
+MAG1= $(.CURDIR)/magdir/Header\
$(.CURDIR)/magdir/Localstuff\
- $(.CURDIR)/magdir/OpenBSD\
- $(.CURDIR)/magdir/[0-9a-z]*
-magic: $(MAGFILES)
- cat ${.ALLSRC:N*.orig} > $(.TARGET)
+ $(.CURDIR)/magdir/OpenBSD
+MAGFILES= $(.CURDIR)/magdir/[0-9a-z]*
+
+post-magic: $(MAGFILES)
+ for i in ${.ALLSRC:N*.orig}; \
+ do \
+ echo $$i; \
+ done|sort|xargs -n 1024 cat > $(.TARGET)
+
+magic: $(MAG1) post-magic
+ cat ${MAG1} post-magic > $(.TARGET)
+
afterinstall:
${INSTALL} ${INSTALL_COPY} -o $(MAGICOWN) -g $(MAGICGRP) -m $(MAGICMODE) magic \