source: trunk/build_support/Makefile.am @ 2422

Last change on this file since 2422 was 2422, checked in by Peter, 12 years ago

rm yat.pc before generating it, to avoid problem that 'mv' hangs with question do you wanna overwrite.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1## Process this file with automake to produce Makefile.in
2##
3## $Id: Makefile.am 2422 2011-02-01 01:07:32Z peter $
4
5# Copyright (C) 2008, 2009, 2010, 2011 Peter Johansson
6#
7# This file is part of the yat library, http://dev.thep.lu.se/yat
8#
9# The yat library is free software; you can redistribute it and/or
10# modify it under the terms of the GNU General Public License as
11# published by the Free Software Foundation; either version 3 of the
12# License, or (at your option) any later version.
13#
14# The yat library is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with yat. If not, see <http://www.gnu.org/licenses/>.
21
22bin_SCRIPTS=for_installation/yat-config
23
24pkgconfigexecdir = $(libdir)/pkgconfig
25pkgconfigexec_DATA= yat.pc
26
27CLEANFILES = yat.pc yat-config for_installation/yat-config
28
29EXTRA_DIST =  move-if-change yat-config.in yat.pc.in
30
31edit = $(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
63yat-config: Makefile $(srcdir)/yat-config.in
64  @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  @echo creating $@
72
73for_installation/yat-config: yat-config
74  @rm -f $@ $@-t \
75  && $(MKDIR_P) for_installation \
76  && sed 's|installed=no|installed=yes|g' < yat-config > $@-t \
77  && mv $@-t $@ && echo creating $@
78
79yat.pc: $(srcdir)/yat.pc.in gen_yat_pc.sh Makefile
80  @rm -f $@ $@-t \
81  && $(SHELL) gen_yat_pc.sh --prefix="$(prefix)" \
82  --exec-prefix="$(exec_prefix)" \
83  --libdir="$(libdir)" --includedir="$(includedir)" \
84  --input="$(srcdir)/yat.pc.in" > $@-t && mv $@-t $@ && echo creating $@
Note: See TracBrowser for help on using the repository browser.