]> git.sur5r.net Git - openldap/blob - contrib/slapd-modules/nssov/nss-ldapd/Makefile.am
ITS#5801
[openldap] / contrib / slapd-modules / nssov / nss-ldapd / Makefile.am
1 # Makefile.am - use automake to generate Makefile.in
2 #
3 # Copyright (C) 2006 Luke Howard
4 # Copyright (C) 2006 West Consulting
5 # Copyright (C) 2006, 2007, 2008 Arthur de Jong
6 #
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
11 #
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 # Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 # 02110-1301 USA
21
22 SUBDIRS = compat common nss nslcd man tests
23
24 DEBIAN_FILES = debian/changelog debian/compat debian/control \
25                debian/copyright debian/rules \
26                debian/libnss-ldapd.docs \
27                debian/libnss-ldapd.examples \
28                debian/libnss-ldapd.lintian-overrides \
29                debian/libnss-ldapd.nslcd.init \
30                debian/libnss-ldapd.config \
31                debian/libnss-ldapd.templates \
32                debian/libnss-ldapd.postinst \
33                debian/libnss-ldapd.postrm \
34                $(wildcard debian/po/*.po) debian/po/templates.pot \
35                debian/po/POTFILES.in
36
37 EXTRA_DIST = nss-ldapd.conf nslcd.h nslcd-common.h \
38              $(wildcard m4/*.m4) HACKING $(DEBIAN_FILES)
39
40 DISTCHECK_CONFIGURE_FLAGS='--enable-warnings'
41
42 ACLOCAL_AMFLAGS = -I m4
43
44 NSS_LDAP_PATH_CONF = @NSS_LDAP_PATH_CONF@
45
46 install-data-local: install-ldap_conf
47 uninstall-local: uninstall-ldap_conf
48
49 # install a default configuration file if it is not already there
50 install-ldap_conf:
51         @if [ -f $(DESTDIR)$(NSS_LDAP_PATH_CONF) ]; then \
52           echo "$(DESTDIR)$(NSS_LDAP_PATH_CONF) already exists, install will not overwrite"; \
53         else \
54           $(INSTALL_DATA) -D $(srcdir)/nss-ldapd.conf $(DESTDIR)$(NSS_LDAP_PATH_CONF); \
55         fi
56 uninstall-ldap_conf:
57         -rm -f $(DESTDIR)$(NSS_LDAP_PATH_CONF)
58
59 # target for easily creating a Debian package
60 # the find is an ugly hack to fix a bug if being built on an nfs filesystem
61 deb: distdir
62         find $(distdir) -type d | xargs touch
63         cd $(distdir) && \
64           debuild
65         rm -rf $(distdir)
66
67 # target for generating the ChangeLog file
68 changelog:
69         ( svn2cl -i --stdout -r HEAD:195 ; \
70           svn2cl -i --stdout -r 194:3 --strip-prefix='libnss_ldapd' ; \
71           svn2cl -i --stdout -r 2 --strip-prefix='libnss_ldap_251-5.2' ; \
72           svn2cl -i --stdout -r 1 --strip-prefix='nss_ldap-251' ; \
73         ) > ChangeLog
74
75 flawfinder.html:
76         flawfinder --quiet --html --context --followdotdir . > $@
77
78 rats.html:
79         rats --quiet --html --context . > $@
80
81 splint.txt:
82         -env LARCH_PATH=/usr/share/splint/lib/ \
83             LCLIMPORTDIR=/usr/share/splint/imports/ \
84             splint -checks \
85                    -warnposix +showsummary +showalluses +hints -namechecks \
86                    -globstate -predboolint -mustfreeonly -temptrans -kepttrans \
87                    -I. -I$(srcdir) -I$(top_builddir) $(DEFS) -D_REENTRANT -DDEBUG \
88                    -D__signed__=signed -D__thread= -D__gnuc_va_list=__ptr_t \
89                    -Dkrb5_int32=int32_t -Dkrb5_ui_4=uint32_t \
90                    -D__u16=uint16_t -D__u32=uint32_t \
91                    *.[ch] nss/*.[ch] nslcd/*.[ch] common/*.[ch] compat/*.[ch] > $@ 2>&1
92
93 .PHONY: flawfinder.html rats.html splint.txt