forked from RolandRosenfeld/lbdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
202 lines (166 loc) · 5.85 KB
/
Makefile.in
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# Copyright (C) 1998 Thomas Roessler <[email protected]>
# Copyright (C) 1999-2018 Roland Rosenfeld <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA.
CC=@CC@
LDFLAGS=@LDFLAGS@
CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@ $(CPPFLAGS)
DEFS=@DEFS@
INSTALL=@INSTALL@
MODULES=@MODULES@
DOTLOCKBASE=@DOTLOCKBASE@
DOTLOCK_TARGET=@DOTLOCK_TARGET@
TACTARGET=@TACTARGET@
PERL=@PERL@
XCODEBUILD=@XCODEBUILD@
PBXBUILD=@PBXBUILD@
VFORMAT=@VFORMAT@
LIBICONV=@LIBICONV@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
srcdir=@srcdir@
libdir=@libdir@
mandir=@mandir@
sysconfdir=@sysconfdir@
SUBDIRS=tests
ALL=lbdbq lbdb_lib lbdb-fetchaddr lbdb-munge fetchaddr qpto8bit munge \
nodelist2lbdb palm_lsaddr mutt_ldap_query lbdbq.man \
lbdb-fetchaddr.man nodelist2lbdb.man mutt_ldap_query.man lbdb.rc \
$(MODULES) $(DOTLOCK_TARGET) $(TACTARGET)
all: Makefile $(ALL)
test: all test_perl
$(MAKE) -C tests check-local
testinstalled:
$(MAKE) -C tests installcheck-local
test_perl:
[ "$(PERL)" = "no" ] || perl -wc nodelist2lbdb
[ "$(PERL)" = "no" ] || perl -wc palm_lsaddr
[ "$(PERL)" = "no" ] || perl -wc mutt_ldap_query
install: all
$(srcdir)/mkinstalldirs $(install_prefix)$(bindir)
$(srcdir)/mkinstalldirs $(install_prefix)$(libdir)
$(srcdir)/mkinstalldirs $(install_prefix)$(sysconfdir)
$(srcdir)/mkinstalldirs $(install_prefix)$(mandir)
$(srcdir)/mkinstalldirs $(install_prefix)$(mandir)/man1
$(INSTALL) -m 755 fetchaddr $(install_prefix)$(libdir)
$(INSTALL) -m 755 qpto8bit $(install_prefix)$(libdir)
$(INSTALL) -m 755 lbdbq $(install_prefix)$(bindir)
$(INSTALL) -m 755 lbdb-fetchaddr $(install_prefix)$(bindir)
$(INSTALL) -m 755 lbdb-munge $(install_prefix)$(libdir)
$(INSTALL) -m 755 lbdb_lib $(install_prefix)$(libdir)
$(INSTALL) -m 755 munge $(install_prefix)$(libdir)
$(INSTALL) -m 644 lbdb_bbdb_query.el $(install_prefix)$(libdir)
if [ "$(PERL)" != "no" ]; then \
$(INSTALL) -m 755 nodelist2lbdb $(install_prefix)$(bindir); \
$(INSTALL) -m 644 nodelist2lbdb.man \
$(install_prefix)$(mandir)/man1/nodelist2lbdb.1; \
$(INSTALL) -m 755 palm_lsaddr $(install_prefix)$(libdir); \
$(INSTALL) -m 755 mutt_ldap_query $(install_prefix)$(libdir); \
$(INSTALL) -m 644 mutt_ldap_query.man \
$(install_prefix)$(mandir)/man1/mutt_ldap_query.1; \
$(INSTALL) -m 644 lbdb_ldap.rc \
$(install_prefix)$(sysconfdir)/lbdb_ldap.rc; \
fi
if [ "$(XCODEBUILD)" != "no" -o "$(PBXBUILD)" != "no" ]; then \
$(INSTALL) -m 755 ABQuery $(install_prefix)$(libdir); \
fi
if [ "$(VFORMAT)" != "no" ]; then \
$(INSTALL) -m 755 vcquery $(install_prefix)$(libdir); \
fi
for i in $(MODULES); do \
$(INSTALL) -m 755 $$i $(install_prefix)$(libdir); \
done
$(INSTALL) -m 644 lbdbq.man $(install_prefix)$(mandir)/man1/lbdbq.1
$(INSTALL) -m 644 lbdb-fetchaddr.man \
$(install_prefix)$(mandir)/man1/lbdb-fetchaddr.1
$(INSTALL) -m 644 lbdb.rc $(install_prefix)$(sysconfdir)/lbdb.rc
if [ "$(DOTLOCK_TARGET)" != "" ]; then \
$(INSTALL) -m 755 lbdb_dotlock $(install_prefix)$(bindir); \
$(INSTALL) -m 644 dotlock.man \
$(install_prefix)$(mandir)/man1/lbdb_dotlock.1; \
fi
if [ "$(TACTARGET)" != "" ]; then \
$(INSTALL) -m 755 tac $(install_prefix)$(libdir)/tac; \
fi
fetchaddr: $(srcdir)/fetchaddr.o $(srcdir)/rfc822.o $(srcdir)/helpers.o \
$(srcdir)/rfc2047.o
$(CC) $(CFLAGS) $(LDFLAGS) $? -o $@ $(LIBICONV)
qpto8bit: $(srcdir)/qpto8bit.o $(srcdir)/rfc822.o $(srcdir)/helpers.o \
$(srcdir)/rfc2047.o
$(CC) $(CFLAGS) $(LDFLAGS) $? -o $@ $(LIBICONV)
fetch: $(srcdir)/fetch.sh
query: $(srcdir)/query.sh
lbdb-query: $(srcdir)/lbdb-query.sh
nodelist2lbdb: $(srcdir)/nodelist2lbdb.pl
cat nodelist2lbdb.pl > $@
palm_lsaddr: $(srcdir)/palm_lsaddr.pl
cat palm_lsaddr.pl > $@
mutt_ldap_query: $(srcdir)/mutt_ldap_query.pl
cat mutt_ldap_query.pl > $@
lbdb_dotlock: $(srcdir)/dotlock.o $(srcdir)/helpers.o
$(CC) $(CFLAGS) $(LDFLAGS) $? -o $@
dotlock.o: $(srcdir)/dotlock.h $(srcdir)/dotlock.c
tac: $(srcdir)/tac.awk
cat tac.awk > $@
chmod a+x $@
munge: $(srcdir)/munge.awk
cat munge.awk > $@
chmod a+x $@
mutt_ldap_query.man: $(srcdir)/mutt_ldap_query.pl
if [ "$(PERL)" != "no" ]; then \
pod2man mutt_ldap_query.pl > $@; \
else \
touch mutt_ldap_query.man; \
fi
m_vcf: vcquery
vcquery: vcquery.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $? -lvformat
m_osx_addressbook: ABQuery
ABQuery: ABQuery.m
$(CC) $(CFLAGS) $(DEFS) -framework Foundation -framework AddressBook -o $@ $^
update-version:
-rm -f configure tests/package.m4 tests/testsuite
autoconf
./configure
$(MAKE) test
$(MAKE) distclean
clean:
-rm -f *.o *~ $(ALL) munge.awk tac.awk ABQuery \
nodelist2lbdb.pl palm_lsaddr.pl mutt_ldap_query.pl \
lbdb_dotlock lbdb.spec lbdb-pkg.el
-rm -rf ABQuery.dSYM autom4te.cache
$(MAKE) -C tests clean
distclean: clean
-rm -f config.status config.cache config.log Makefile
-rm -f *.sh
-rm -f vcquery
$(MAKE) -C tests distclean
Makefile: Makefile.in
./config.status
%.sh: %.sh.in
./config.status
%.pl: %.pl.in
./config.status
%.awk: %.awk.in
./config.status
%.man: %.man.in
sed -e 's!@''libdir@!$(libdir)!' \
-e 's!@''sysconfdir@!$(sysconfdir)!' \
-e 's!@''dotlock@!$(DOTLOCKBASE)!' [email protected] > $@
%.o: %.c
$(CC) $(CFLAGS) $(DEFS) -c $<
.PHONY: test test_perl update-version