summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorBala.FA <barumuga@redhat.com>2014-03-07 18:28:09 +0530
committerBala.FA <barumuga@redhat.com>2014-04-29 10:21:36 +0530
commit981d905fd08d4565f306344c11c560a8479cbf75 (patch)
tree7f0d0006ab7d7fbeea1e3e9e9a549280bd68a0a3 /Makefile.am
parentfe7479d1c78555ee5f0dd219c690232c43c4938c (diff)
Initial commit
Change-Id: Iae865d7dce78de83f0931d99b67455b9a0f12e1c Signed-off-by: Bala.FA <barumuga@redhat.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am78
1 files changed, 78 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..8c4235f
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,78 @@
+#
+# Copyright 2014 Red Hat, Inc.
+#
+# 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+# keep sorted
+SUBDIRS = \
+ plugins \
+ $(NULL)
+
+# The tests should be always last as they need the rest of the source to be
+# prepared before running.
+SUBDIRS += tests
+
+EXTRA_DIST = \
+ build-aux/pkg-version \
+ nagios-server-addons.spec \
+ nagios-server-addons.spec.in
+
+CLEANFILES = \
+ nagios-server-addons.spec \
+ $(DIST_ARCHIVES) \
+ $(NULL)
+
+check-local:
+ find . -path './.git' -prune -type f -o \
+ -name '*.py' -o -name '*.py.in' | xargs $(PYFLAKES) | \
+ while read LINE; do echo "$$LINE"; false; done
+ $(PEP8) --version
+ $(PEP8) --filename '*.py,*.py.in' $(top_srcdir)
+ @if test -f .gitignore; then \
+ for i in `git ls-files \*.in`; do \
+ if ! grep -q -x $${i%%.in} .gitignore; then \
+ echo "Missing $${i%%.in} in .gitignore"; exit 1; fi; \
+ done; \
+ fi;
+
+all-local: \
+ nagios-server-addons.spec
+
+.PHONY: srpm rpm
+
+srpm: dist
+ rpmbuild -ts $(if $(BUILDID),--define="extra_release .$(BUILDID)") $(DIST_ARCHIVES)
+
+rpm: dist
+ rpmbuild -ta $(if $(BUILDID),--define="extra_release .$(BUILDID)") \
+ $(WITH_HOOKS) $(DIST_ARCHIVES)
+
+dist-hook: gen-VERSION gen-ChangeLog
+.PHONY: gen-VERSION gen-ChangeLog
+
+gen-ChangeLog:
+ if test -d .git; then \
+ $(top_srcdir)/build-aux/gitlog-to-changelog \
+ > $(distdir)/ChangeLog; \
+ fi
+
+gen-VERSION:
+ if test -d .git; then \
+ $(top_srcdir)/build-aux/pkg-version --full \
+ > $(distdir)/VERSION; \
+ fi