1 | ## $Id: Makefile.am 2932 2012-12-27 01:00:30Z peter $ |
---|
2 | |
---|
3 | # Copyright (C) 2008, 2009, 2010, 2011, 2012 Peter Johansson |
---|
4 | # |
---|
5 | # This file is part of the yat library, http://dev.thep.lu.se/yat |
---|
6 | # |
---|
7 | # The yat library is free software; you can redistribute it and/or |
---|
8 | # modify it under the terms of the GNU General Public License as |
---|
9 | # published by the Free Software Foundation; either version 3 of the |
---|
10 | # License, or (at your option) any later version. |
---|
11 | # |
---|
12 | # The yat 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 | # General Public License for more details. |
---|
16 | # |
---|
17 | # You should have received a copy of the GNU General Public License |
---|
18 | # along with yat. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | |
---|
20 | noinst_SCRIPTS = build_support/tag_and_release.sh |
---|
21 | bin_SCRIPTS = build_support/for_installation/yat-config |
---|
22 | |
---|
23 | pkgconfigexecdir = $(libdir)/pkgconfig |
---|
24 | pkgconfigexec_DATA= build_support/yat.pc |
---|
25 | |
---|
26 | CLEANFILES += build_support/yat.pc build_support/yat-config |
---|
27 | CLEANFILES += build_support/for_installation/yat-config |
---|
28 | |
---|
29 | EXTRA_DIST += build_support/yat-config.in build_support/yat.pc.in |
---|
30 | |
---|
31 | edit = $(SED) \ |
---|
32 | -e 's|@SHELL[@]|$(SHELL)|g' \ |
---|
33 | -e 's|@prefix[@]|$(prefix)|g' \ |
---|
34 | -e 's|@exec_prefix[@]|$(exec_prefix)|g' \ |
---|
35 | -e 's|@bindir[@]|$(bindir)|g' \ |
---|
36 | -e 's|@libdir[@]|$(libdir)|g' \ |
---|
37 | -e 's|@includedir[@]|$(includedir)|g' \ |
---|
38 | -e 's|@CXX[@]|$(CXX)|g' \ |
---|
39 | -e 's|@CXXCPP[@]|$(CXXCPP)|g' \ |
---|
40 | -e 's|@CPPFLAGS[@]|$(CPPFLAGS)|g' \ |
---|
41 | -e 's|@CXXFLAGS[@]|$(CXXFLAGS)|g' \ |
---|
42 | -e 's|@LDFLAGS[@]|$(LDFLAGS)|g' \ |
---|
43 | -e 's|@LIBS[@]|$(LIBS)|g' \ |
---|
44 | -e 's|@YAT_CBLAS_LIB[@]|$(YAT_CBLAS_LIB)|g' \ |
---|
45 | -e 's|@YAT_CPPFLAGS[@]|$(YAT_CPPFLAGS)|g' \ |
---|
46 | -e 's|@YAT_CXXFLAGS[@]|$(YAT_CXXFLAGS)|g' \ |
---|
47 | -e 's|@YAT_LDFLAGS[@]|$(YAT_LDFLAGS)|g' \ |
---|
48 | -e 's|@YAT_PRIMARY_LIBS[@]|$(YAT_PRIMARY_LIBS)|g' \ |
---|
49 | -e 's|@LIBM[@]|$(LIBM)|g' \ |
---|
50 | -e 's|@PACKAGE[@]|$(PACKAGE)|g' \ |
---|
51 | -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \ |
---|
52 | -e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \ |
---|
53 | -e 's|@VERSION[@]|$(VERSION)|g' \ |
---|
54 | -e 's|@YAT_MAJOR_VERSION[@]|$(YAT_MAJOR_VERSION)|g' \ |
---|
55 | -e 's|@YAT_MINOR_VERSION[@]|$(YAT_MINOR_VERSION)|g' \ |
---|
56 | -e 's|@YAT_PATCH_VERSION[@]|$(YAT_PATCH_VERSION)|g' \ |
---|
57 | -e 's|@YAT_DEV_BUILD[@]|$(YAT_DEV_BUILD)|g' \ |
---|
58 | -e 's|@gsl_version[@]|$(gsl_version)|g' \ |
---|
59 | -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \ |
---|
60 | -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \ |
---|
61 | -e 's|@boost_version[@]|$(boost_version)|g' |
---|
62 | |
---|
63 | build_support/yat-config: Makefile $(srcdir)/build_support/yat-config.in |
---|
64 | @$(AM_V_GEN)rm -f $@ $@.tmp \ |
---|
65 | && echo "#! $(SHELL)" > $@.tmp \ |
---|
66 | && echo "# $@ generated by make from yat-config.in" >> $@.tmp \ |
---|
67 | && $(edit) '$(srcdir)/$@.in' >>$@.tmp \ |
---|
68 | && chmod +x $@.tmp \ |
---|
69 | && chmod a-w $@.tmp \ |
---|
70 | && mv $@.tmp $@ |
---|
71 | |
---|
72 | build_support/for_installation/yat-config: build_support/yat-config |
---|
73 | $(AM_V_GEN)rm -f $@ $@-t \ |
---|
74 | && $(MKDIR_P) build_support/for_installation \ |
---|
75 | && sed 's|installed=no|installed=yes|g' < build_support/yat-config > $@-t \ |
---|
76 | && mv $@-t $@ |
---|
77 | |
---|
78 | build_support/yat.pc: $(srcdir)/build_support/yat.pc.in build_support/gen_yat_pc.sh Makefile |
---|
79 | $(AM_V_GEN)rm -f $@ $@-t \ |
---|
80 | && cd build_support \ |
---|
81 | && $(SHELL) gen_yat_pc.sh --prefix="$(prefix)" \ |
---|
82 | --exec-prefix="$(exec_prefix)" \ |
---|
83 | --libdir="$(libdir)" --includedir="$(includedir)" \ |
---|
84 | --input="../$(srcdir)/build_support/yat.pc.in" > yat.pc-t \ |
---|
85 | && mv yat.pc-t yat.pc |
---|