1 # Makefile.am - use automake to generate Makefile.in
3 # Copyright (C) 2006 Luke Howard
4 # Copyright (C) 2006 West Consulting
5 # Copyright (C) 2006, 2007, 2008 Arthur de Jong
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.
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.
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
22 SUBDIRS = compat common nss nslcd man tests
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 \
37 EXTRA_DIST = nss-ldapd.conf nslcd.h nslcd-common.h \
38 $(wildcard m4/*.m4) HACKING $(DEBIAN_FILES)
40 DISTCHECK_CONFIGURE_FLAGS='--enable-warnings'
42 ACLOCAL_AMFLAGS = -I m4
44 NSS_LDAP_PATH_CONF = @NSS_LDAP_PATH_CONF@
46 install-data-local: install-ldap_conf
47 uninstall-local: uninstall-ldap_conf
49 # install a default configuration file if it is not already there
51 @if [ -f $(DESTDIR)$(NSS_LDAP_PATH_CONF) ]; then \
52 echo "$(DESTDIR)$(NSS_LDAP_PATH_CONF) already exists, install will not overwrite"; \
54 $(INSTALL_DATA) -D $(srcdir)/nss-ldapd.conf $(DESTDIR)$(NSS_LDAP_PATH_CONF); \
57 -rm -f $(DESTDIR)$(NSS_LDAP_PATH_CONF)
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
62 find $(distdir) -type d | xargs touch
67 # target for generating the ChangeLog file
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' ; \
76 flawfinder --quiet --html --context --followdotdir . > $@
79 rats --quiet --html --context . > $@
82 -env LARCH_PATH=/usr/share/splint/lib/ \
83 LCLIMPORTDIR=/usr/share/splint/imports/ \
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
93 .PHONY: flawfinder.html rats.html splint.txt