Makefile.am 1.66 KB
Newer Older
1 2 3
# vi: noexpandtab softtabstop=0
## Process this file with automake to produce Makefile.in

intrigeri's avatar
intrigeri committed
4
EXTRA_DIST = FAQ.md README.md COPYING AUTHORS INSTALL.md NEWS ChangeLog \
5 6
             backupninja.spec backupninja.spec.in autogen.sh

7
SUBDIRS = etc examples handlers lib man src
micah's avatar
micah committed
8

9
local_rpm_topdir=`cd $(top_srcdir) && pwd`/rpm
micah's avatar
micah committed
10
rpm-package: dist
11
	if test x$(HAVE_RPM) = xyes ; then \
12 13
               mkdir -p $(local_rpm_topdir) ; \
               cd $(local_rpm_topdir) ; \
micah's avatar
micah committed
14 15
               mkdir -p BUILD RPMS SOURCES SPECS ; \
               cd SOURCES ; \
16
               $(LN_S) ../../$(distdir).tar.gz ; \
micah's avatar
micah committed
17 18
               cd .. ; \
               cd SPECS ; \
19 20
               $(LN_S) ../../backupninja.spec . ; \
	       cd .. ; \
micah's avatar
micah committed
21 22 23 24 25
               rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/backupninja.spec && \
               echo "Package successfully built in `pwd`/RPMS." ; \
       else \
               echo "Error: RPM executable and/or source directory not found." ; \
       fi
26

micah's avatar
micah committed
27
srpm-package: dist
28
	if test x$(HAVE_RPM) = xyes ; then \
29 30
               mkdir -p $(local_rpm_topdir) ; \
               cd $(local_rpm_topdir) ; \
micah's avatar
micah committed
31 32
               mkdir -p BUILD SRPMS SOURCES SPECS ; \
               cd SOURCES ; \
33
               $(LN_S) ../../$(distdir).tar.gz ; \
micah's avatar
micah committed
34 35
               cd .. ; \
               cd SPECS ; \
36 37
               $(LN_S) ../../backupninja.spec . \
	       cd .. ; \
micah's avatar
micah committed
38 39 40
               rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/backupninja.spec && \
               echo "Package successfully built in `pwd`/SRPMS." ; \
       else \
41 42 43 44 45
              echo "Error: RPM executable and/or source directory not found." ; \
       fi

clean-local:
	-rm -rf $(local_rpm_topdir)