xref: /freebsd/contrib/file/Makefile.am (revision 6990ffd8a95caaba6858ad44ff1b3157d1efba8f)
1# don't enforce GNU packaging standards
2AUTOMAKE_OPTIONS = foreign no-dependencies
3
4bin_PROGRAMS = file
5
6data_DATA = magic magic.mime magic.mgc
7
8MAGIC	 = @datadir@/magic
9CPPFLAGS = -DMAGIC='"$(MAGIC)"'
10
11if FSECT5
12man_MAGIC = magic.5
13else
14man_MAGIC = magic.4
15endif
16fsect = @fsect@
17man_MANS = file.1 $(man_MAGIC)
18
19file_SOURCES = file.c apprentice.c fsmagic.c softmagic.c ascmagic.c \
20	compress.c is_tar.c readelf.c print.c \
21	file.h names.h patchlevel.h readelf.h tar.h
22
23EXTRA_DIST = LEGAL.NOTICE MAINT PORTING Makefile.std magic2mime \
24	Localstuff Header $(magic_FRAGMENTS) file.man magic.man
25
26CLEANFILES = $(man_MANS) magic magic.mgc
27
28magic: Header Localstuff $(magic_FRAGMENTS)
29	cat $(srcdir)/Header $(srcdir)/Localstuff > $@
30	for frag in $(magic_FRAGMENTS); do \
31	  if test -f $(srcdir)/$$frag; then \
32	    f=$(srcdir)/$$frag; \
33	  else \
34	    f=$$frag; \
35	  fi; \
36          cat $$f; \
37	done >> $@
38
39magic.mgc: magic file
40	./file -C -m magic
41
42file.1:	Makefile file.man
43	@rm -f $@
44	sed -e s@__CSECTION__@1@g \
45	    -e s@__FSECTION__@${fsect}@g \
46	    -e s@__VERSION__@${VERSION}@g \
47	    -e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@
48
49magic.${fsect}: Makefile magic.man
50	@rm -f $@
51	sed -e s@__CSECTION__@1@g \
52	    -e s@__FSECTION__@${fsect}@g \
53	    -e s@__VERSION__@${VERSION}@g \
54	    -e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@
55
56magic_FRAGMENTS = Magdir/adi Magdir/adventure Magdir/allegro Magdir/alliant \
57    Magdir/alpha Magdir/amanda Magdir/amigaos Magdir/animation \
58    Magdir/apl Magdir/apple Magdir/applix Magdir/archive Magdir/asterix \
59    Magdir/att3b Magdir/audio Magdir/blender Magdir/blit Magdir/bsdi \
60    Magdir/c-lang Magdir/chi Magdir/cisco Magdir/claris Magdir/clipper \
61    Magdir/commands Magdir/compress Magdir/console Magdir/convex \
62    Magdir/database Magdir/diamond Magdir/diff Magdir/digital \
63    Magdir/dump Magdir/elf Magdir/encore Magdir/epoc Magdir/filesystems \
64    Magdir/flash Magdir/fonts Magdir/frame Magdir/freebsd Magdir/fsav \
65    Magdir/gimp Magdir/gnu Magdir/grace Magdir/hp Magdir/ibm370 \
66    Magdir/ibm6000 Magdir/iff Magdir/images Magdir/intel \
67    Magdir/interleaf Magdir/island Magdir/ispell Magdir/java \
68    Magdir/jpeg Magdir/karma Magdir/lecter Magdir/lex Magdir/lif \
69    Magdir/linux Magdir/lisp Magdir/mach Magdir/macintosh Magdir/magic \
70    Magdir/mail.news Magdir/maple Magdir/mathematica Magdir/mcrypt \
71    Magdir/mime Magdir/mips Magdir/mirage Magdir/mkid Magdir/mmdf Magdir/modem \
72    Magdir/motorola Magdir/msdos Magdir/msvc Magdir/ncr Magdir/netbsd \
73    Magdir/netscape Magdir/news Magdir/octave Magdir/olf Magdir/os2 \
74    Magdir/os9 Magdir/osf1 Magdir/palm Magdir/pbm Magdir/pdf Magdir/pdp \
75    Magdir/pgp Magdir/pkgadd Magdir/plus5 Magdir/printer Magdir/project \
76    Magdir/psdbms Magdir/pyramid Magdir/python Magdir/riff Magdir/rpm \
77    Magdir/rtf Magdir/sc Magdir/sccs Magdir/sendmail Magdir/sequent \
78    Magdir/sgml Magdir/sketch Magdir/sniffer Magdir/softquad Magdir/spectrum \
79    Magdir/sun Magdir/teapot Magdir/terminfo Magdir/tex Magdir/ti-8x \
80    Magdir/timezone Magdir/troff Magdir/typeset Magdir/unknown \
81    Magdir/uuencode Magdir/varied.out Magdir/vax Magdir/vicar Magdir/visx \
82    Magdir/vms Magdir/vmware Magdir/wordperfect Magdir/xdelta Magdir/xenix \
83    Magdir/zilog Magdir/zyxel
84