-
Notifications
You must be signed in to change notification settings - Fork 40
/
Makefile.am
77 lines (68 loc) · 2.7 KB
/
Makefile.am
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
#
# Copyright (c) 2020 Jonathan Perkin <[email protected]>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
bin_PROGRAMS= pkgin
#
# External source files imported from elsewhere.
#
openssh_SOURCES= external/progressmeter.c
pkg_install_SOURCES= external/automatic.c external/dewey.c
pkg_install_SOURCES+= external/fexec.c external/iterate.c external/lpkg.c
pkg_install_SOURCES+= external/opattern.c external/pkgdb.c external/plist.c
pkg_install_SOURCES+= external/var.c external/xwrapper.c
pkgin_SOURCES= actions.c autoremove.c depends.c download.c fsops.c impact.c
pkgin_SOURCES+= main.c order.c pkg_check.c pkg_infos.c pkg_install.c
pkgin_SOURCES+= pkg_str.c pkgindb.c pkgindb_queries.c pkglist.c preferred.c
pkgin_SOURCES+= selection.c sqlite_callbacks.c summary.c tools.c
pkgin_SOURCES+= $(openssh_SOURCES) $(pkg_install_SOURCES)
noinst_HEADERS= cmd.h messages.h pkgin.h pkgindb.h tools.h
noinst_HEADERS+= external/dewey.h external/humanize_number.h external/lib.h
noinst_HEADERS+= external/progressmeter.h external/queue.h
#
# Conditional sources.
#
if !HAVE_HUMANIZE_NUMBER
pkgin_SOURCES+= external/humanize_number.c
endif
#
# Required defines.
#
pkgin_CPPFLAGS= -DMACHINE_ARCH=\""$(MACHINE_ARCH)"\"
pkgin_CPPFLAGS+= -DPKGIN_DBDIR=\""$(PKGIN_DBDIR)"\"
pkgin_CPPFLAGS+= -DPKGIN_VERSION=\""$(VERSION)"\"
pkgin_CPPFLAGS+= -DPKG_INSTALL_DIR=\""$(PKG_INSTALL_DIR)"\"
pkgin_CPPFLAGS+= -DPKG_SYSCONFDIR=\""$(sysconfdir)"\"
pkgin_CPPFLAGS+= -DPREFIX=\""$(prefix)"\"
#
# Manual pages.
#
man1_MANS= pkgin.1
dist_pkgin_SOURCES= pkgin.1.in
nodist_pkgin_SOURCES= pkgin.1
pkgin.1: pkgin.1.in
@sed -e 's,/var/db/pkgin,$(PKGIN_DBDIR),g' \
-e 's,/usr/pkg/etc,$(sysconfdir),g' $(srcdir)/pkgin.1.in >$@
#
# Generated sources.
#
dist_pkgin_SOURCES+= pkgin.sql
nodist_pkgin_SOURCES+= pkgindb_create.h
pkgindb_create.h: Makefile pkgin.sql
@echo "/* Automatically generated, DO NOT EDIT */" >$@
@echo "#define CREATE_DRYDB \" \\" >>$@
@sed -e 's/$$/ \\/' -e 's/\"/\\\"/g' $(srcdir)/pkgin.sql >>$@
@echo '"' >>$@
BUILT_SOURCES= $(nodist_pkgin_SOURCES)
CLEANFILES= $(BUILT_SOURCES)