1## Process this file with automake to produce Makefile.in
2
3## Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
4##
5## This program is free software; you can redistribute it and/or modify
6## it under the terms of the GNU General Public License as published by
7## the Free Software Foundation; either version 2, or (at your option)
8## any later version.
9##
10## This program is distributed in the hope that it will be useful,
11## but WITHOUT ANY WARRANTY; without even the implied warranty of
12## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13## GNU General Public License for more details.
14##
15## You should have received a copy of the GNU General Public License
16## along with this program; if not, write to the Free Software
17## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18## 02110-1301, USA.
19##
20
21ACLOCAL_AMFLAGS = -I m4
22
23if ENABLE_PERL
24  PERL_DIR = scripts
25endif
26
27SUBDIRS =        \
28	build external_libs liboct_parser \
29	src share doc testsuite $(PERL_DIR)
30
31EXTRA_DIST =     \
32	ChangeLog PACKAGING \
33	TODO \
34	debian/changelog debian/control debian/copyright debian/dirs     \
35	debian/README.Debian debian/rules
36
37DISTCLEANFILES = \
38	config.log config.status
39
40DEB_DIR = deb-work
41
42check-short:
43	$(MAKE) -C build check
44	$(MAKE) -C external_libs check
45	$(MAKE) -C liboct_parser check
46	$(MAKE) -C src check
47	$(MAKE) -C share check
48	$(MAKE) -C doc check
49	$(MAKE) -C testsuite check-short
50
51check-long:
52	$(MAKE) -C build check
53	$(MAKE) -C external_libs check
54	$(MAKE) -C liboct_parser check
55	$(MAKE) -C src check
56	$(MAKE) -C share check
57	$(MAKE) -C doc check
58	$(MAKE) -C testsuite check-long
59
60check-performance:
61	$(MAKE) -C share check
62	$(MAKE) -C testsuite check-performance
63
64rpm: dist
65	@topdir=`rpmbuild --showrc | @GREP@ ': *_topdir' | cut -f 2`; \
66	mv -f $(PACKAGE)-$(VERSION).tar.gz $$topdir/SOURCES; \
67	cp build/$(PACKAGE).spec $$topdir/SPECS; \
68	rpmbuild -ba $$topdir/SPECS/$(PACKAGE).spec; \
69	echo "-------------------------------------------------------------"; \
70	echo "  RPMs are built, and are located under:"; \
71	echo "       $$topdir/RPMS/<arch>"; \
72	echo "       $$topdir/SRPMS"; \
73	echo "-------------------------------------------------------------"
74#	scp $(RPM_DIR)/RPMS/*/octopus*.rpm \
75		marques@nautilus.fis.uc.pt:/server/www/tddft.org/programs/octopus/download/
76
77deb: dist
78	rm -rf $(DEB_DIR)
79	mkdir $(DEB_DIR)
80	mv -f $(PACKAGE)-$(VERSION).tar.gz $(DEB_DIR)
81	(cd $(DEB_DIR); tar xzf *gz; cd $(PACKAGE)-$(VERSION); debuild -E -ePATH)
82	rm -rf $(DEB_DIR)/$(PACKAGE)-$(VERSION)
83	scp $(DEB_DIR)/octopus*.deb \
84		marques@nautilus.fis.uc.pt:/server/www/tddft.org/programs/octopus/download/
85