summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_install/files/audit-packages/Makefile.in
blob: 724bd1ca3731c575433b8b3440355a9de81697b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# $NetBSD: Makefile.in,v 1.1 2007/07/14 20:17:08 adrianp Exp $

prefix = @prefix@
exec_prefix = @exec_prefix@
sbindir = @sbindir@
mandir = @mandir@
pprefix = @prefix@

pkgdbdir = @pkgdbdir@
sysconfdir = @sysconfdir@

man5dir = $(mandir)/man5
man1dir = $(mandir)/man1
cat5dir = $(mandir)/cat5
cat1dir = $(mandir)/cat1
sharedir = $(prefix)/share/examples/pkg_install

do_subst = 	sed -e 's,_pkgdbdir_,$(pkgdbdir),g' \
		-e 's,_sysconfdir_,$(sysconfdir),g' \
		-e 's,_prefix_,$(prefix),g' \
		-e 's,_pprefix_,$(pprefix),g' \
		-e 's,_ftp_,@ftp@,g' \
		-e 's,_gzcat_,@gzcat@,g'

CC = @CC@
CCLD= $(CC)
LIBS= -linstall @LIBS@
CPPFLAGS= @CPPFLAGS@ -DHOST=\"$(CANONICAL_HOST)\" -DPKGSRC -I. -I../lib
DEFS= @DEFS@
CFLAGS= @CFLAGS@ -Wall
LDFLAGS= @LDFLAGS@ -L../lib
SUBST_FILES= audit-packages.1 download-vulnerability-list.1 audit-packages.conf audit-packages.conf.5 audit-packages.conf.cat5

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
CANONICAL_HOST = @CANONICAL_HOST@

LINK= $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
COMPILE= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS)

audit-packages_OBJS = audit-packages.o

.c.o:
	$(COMPILE) -c $< -o $@

all: audit-packages

audit-packages: $(audit-packages_OBJS)
	$(LINK) $(audit-packages_OBJS) $(LIBS)

subst:
	@list='$(SUBST_FILES)'; for f in $$list; do \
	  $(do_subst) $$f > $$f.tmp; \
	  rm $$f; mv $$f.tmp $$f; \
	done

clean:
	rm -f *.o audit-packages

install:
	$(INSTALL) -m 755 -d $(sbindir)
	$(INSTALL) -m 755 -d $(man1dir)
	$(INSTALL) -m 755 -d $(man5dir)
	$(INSTALL) -m 755 -d $(cat1dir)
	$(INSTALL) -m 755 -d $(cat5dir)
	$(INSTALL) -m 755 -d $(sharedir)

	$(INSTALL_PROGRAM) audit-packages $(DESTDIR)$(sbindir)/audit-packages
	$(INSTALL_SCRIPT) download-vulnerability-list.sh \
		$(DESTDIR)$(sbindir)/download-vulnerability-list
	$(INSTALL_DATA) audit-packages.conf \
		$(DESTDIR)$(sharedir)/audit-packages.conf
	$(INSTALL_DATA) audit-packages.1 $(DESTDIR)$(man1dir)/audit-packages.1
	$(INSTALL_DATA) audit-packages.cat1 \
		$(DESTDIR)$(cat1dir)/audit-packages.0
	$(INSTALL_DATA) audit-packages.conf.5 \
		$(DESTDIR)$(man5dir)/audit-packages.conf.5
	$(INSTALL_DATA) audit-packages.conf.cat5 \
		$(DESTDIR)$(cat5dir)/audit-packages.conf.0
	$(INSTALL_DATA) download-vulnerability-list.1 \
		$(DESTDIR)$(man1dir)/download-vulnerability-list.1
	$(INSTALL_DATA) download-vulnerability-list.cat1 \
		$(DESTDIR)$(cat1dir)/download-vulnerability-list.0