Blame Makefile.am

Packit 6bd9ab
# Makefile.am - use automake to generate Makefile.in
Packit 6bd9ab
#
Packit 6bd9ab
# Copyright (C) 2006 Luke Howard
Packit 6bd9ab
# Copyright (C) 2006 West Consulting
Packit 6bd9ab
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Arthur de Jong
Packit 6bd9ab
#
Packit 6bd9ab
# This library is free software; you can redistribute it and/or
Packit 6bd9ab
# modify it under the terms of the GNU Lesser General Public
Packit 6bd9ab
# License as published by the Free Software Foundation; either
Packit 6bd9ab
# version 2.1 of the License, or (at your option) any later version.
Packit 6bd9ab
#
Packit 6bd9ab
# This library is distributed in the hope that it will be useful,
Packit 6bd9ab
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6bd9ab
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6bd9ab
# Lesser General Public License for more details.
Packit 6bd9ab
#
Packit 6bd9ab
# You should have received a copy of the GNU Lesser General Public
Packit 6bd9ab
# License along with this library; if not, write to the Free Software
Packit 6bd9ab
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit 6bd9ab
# 02110-1301 USA
Packit 6bd9ab
Packit 6bd9ab
SUBDIRS = compat common
Packit 6bd9ab
if ENABLE_NSS
Packit 6bd9ab
  SUBDIRS += nss
Packit 6bd9ab
endif
Packit 6bd9ab
if ENABLE_PAM
Packit 6bd9ab
  SUBDIRS += pam
Packit 6bd9ab
endif
Packit 6bd9ab
if ENABLE_NSLCD
Packit 6bd9ab
  SUBDIRS += nslcd
Packit 6bd9ab
endif
Packit 6bd9ab
if ENABLE_PYNSLCD
Packit 6bd9ab
  SUBDIRS += pynslcd
Packit 6bd9ab
endif
Packit 6bd9ab
if ENABLE_UTILS
Packit 6bd9ab
  SUBDIRS += utils
Packit 6bd9ab
endif
Packit 6bd9ab
SUBDIRS += man tests
Packit 6bd9ab
Packit 6bd9ab
EXTRA_DIST = nslcd.conf nslcd.h $(wildcard ChangeLog-20??) \
Packit 6bd9ab
             $(wildcard m4/*.m4) HACKING ldapns.schema ldapns.ldif
Packit 6bd9ab
Packit 6bd9ab
DISTCHECK_CONFIGURE_FLAGS = --enable-warnings --enable-pynslcd --enable-utils \
Packit 6bd9ab
                            --with-pam-seclib-dir="\$${libdir}/security" \
Packit 6bd9ab
                            --with-ldap-conf-file="\$${prefix}/nslcd.conf" \
Packit 6bd9ab
                            CPPFLAGS=$(CPPFLAGS) LDFLAGS=$(LDFLAGS)
Packit 6bd9ab
Packit 6bd9ab
ACLOCAL_AMFLAGS = -I m4
Packit 6bd9ab
Packit 6bd9ab
NSLCD_CONF_PATH = @NSLCD_CONF_PATH@
Packit 6bd9ab
Packit 6bd9ab
install-data-local: install-nslcd_conf
Packit 6bd9ab
uninstall-local: uninstall-nslcd_conf
Packit 6bd9ab
Packit 6bd9ab
# install a default configuration file if it is not already there
Packit 6bd9ab
install-nslcd_conf:
Packit 6bd9ab
	@if [ -f $(DESTDIR)$(NSLCD_CONF_PATH) ]; then \
Packit 6bd9ab
	  echo "$(DESTDIR)$(NSLCD_CONF_PATH) already exists, install will not overwrite"; \
Packit 6bd9ab
	else \
Packit 6bd9ab
	  $(mkinstalldirs) `dirname $(DESTDIR)$(NSLCD_CONF_PATH)`; \
Packit 6bd9ab
	  $(INSTALL) -m 600 $(srcdir)/nslcd.conf $(DESTDIR)$(NSLCD_CONF_PATH); \
Packit 6bd9ab
	fi
Packit 6bd9ab
uninstall-nslcd_conf:
Packit 6bd9ab
	-rm -f $(DESTDIR)$(NSLCD_CONF_PATH)
Packit 6bd9ab
Packit 6bd9ab
# target for generating the ChangeLog file
Packit 6bd9ab
changelog:
Packit 6bd9ab
	git log --date=short --name-only \
Packit 6bd9ab
	    --format="%x0c%ad  %aN <%aE>%n%n%x09* [%h]%x00%s%n%x00%+b%x00" \
Packit 6bd9ab
	    e3f0453... | \
Packit 6bd9ab
	  awk 'BEGIN { RS="\f"; FS="\0" } { if ($$1) { gsub(/\n*$$/, "", $$4); gsub(/^\n*/, "", $$4); gsub(/\n/, ", ", $$4); gsub(/\n*$$/, "", $$3); gsub(/\n/, "\n\t  ", $$3); gsub(/.$$/, "&\n", $$3); print $$1 " " $$4 ": "; print "\t  " $$2 $$3 }}' | \
Packit 6bd9ab
	  fmt --width=78 -c > ChangeLog
Packit 6bd9ab
Packit 6bd9ab
flawfinder.html:
Packit 6bd9ab
	flawfinder --quiet --html --context --followdotdir . > $@
Packit 6bd9ab
Packit 6bd9ab
rats.html:
Packit 6bd9ab
	rats --quiet --html --context . > $@
Packit 6bd9ab
Packit 6bd9ab
splint.txt:
Packit 6bd9ab
	-env LARCH_PATH=/usr/share/splint/lib/ \
Packit 6bd9ab
	    LCLIMPORTDIR=/usr/share/splint/imports/ \
Packit 6bd9ab
	    splint -checks -mustfreefresh \
Packit 6bd9ab
	           -warnposix +showsummary +showalluses +hints -namechecks \
Packit 6bd9ab
	           -globstate -predboolint -mustfreeonly -temptrans -kepttrans \
Packit 6bd9ab
	           -I. -I$(srcdir) -I$(top_builddir) $(DEFS) -D_REENTRANT -DDEBUG \
Packit 6bd9ab
	           -D__signed__=signed -D__thread= -D__gnuc_va_list=__ptr_t \
Packit 6bd9ab
	           -Dkrb5_int32=int32_t -Dkrb5_ui_4=uint32_t \
Packit 6bd9ab
	           -D__u16=uint16_t -D__u32=uint32_t \
Packit 6bd9ab
	           *.[ch] nss/*.[ch] nslcd/*.[ch] common/*.[ch] compat/*.[ch] > $@ 2>&1
Packit 6bd9ab
Packit 6bd9ab
.PHONY: flawfinder.html rats.html splint.txt