source: trunk/build_support/Makefile.am @ 3811

Last change on this file since 3811 was 3811, checked in by Peter, 11 months ago

prefer variable assignment as autoconf time rather than at configure time and get rid of the variable in Makefile and gen_yat_pc script.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1## $Id: Makefile.am 3811 2019-07-08 07:06:31Z peter $
2
3# Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017 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
20bin_SCRIPTS = build_support/for_installation/yat-config
21
22pkgconfigexecdir = $(libdir)/pkgconfig
23pkgconfigexec_DATA= build_support/yat.pc
24
25CLEANFILES += build_support/yat.pc build_support/yat-config
26CLEANFILES += build_support/for_installation/yat-config
27
28EXTRA_DIST +=  build_support/yat-config.in build_support/yat.pc.in
29
30edit = $(SED) \
31  -e 's|@SHELL[@]|$(SHELL)|g' \
32  -e 's|@prefix[@]|$(prefix)|g' \
33  -e 's|@exec_prefix[@]|$(exec_prefix)|g' \
34  -e 's|@bindir[@]|$(bindir)|g' \
35  -e 's|@libdir[@]|$(libdir)|g' \
36  -e 's|@includedir[@]|$(includedir)|g' \
37  -e 's|@host_os[@]|$(host_os)|g' \
38  -e 's|@GXX[@]|$(GXX)|g' \
39  -e 's|@CXX[@]|$(CXX)|g' \
40  -e 's|@CXXCPP[@]|$(CXXCPP)|g' \
41  -e 's|@CPPFLAGS[@]|$(CPPFLAGS)|g' \
42  -e 's|@CXXFLAGS[@]|$(CXXFLAGS)|g' \
43  -e 's|@LDFLAGS[@]|$(LDFLAGS)|g' \
44  -e 's|@LIBS[@]|$(LIBS)|g' \
45  -e 's|@YAT_CBLAS_LIB[@]|$(YAT_CBLAS_LIB)|g' \
46  -e 's|@YAT_CPPFLAGS[@]|$(YAT_CPPFLAGS)|g' \
47  -e 's|@YAT_CXXFLAGS[@]|$(YAT_CXXFLAGS)|g' \
48  -e 's|@YAT_LDFLAGS[@]|$(YAT_LDFLAGS)|g' \
49  -e 's|@YAT_PC_LIBS[@]|$(YAT_PC_LIBS)|g' \
50  -e 's|@YAT_PC_REQUIRES[@]|$(YAT_PC_REQUIRES)|g' \
51  -e 's|@YAT_PRIMARY_LIBS[@]|$(YAT_PRIMARY_LIBS)|g' \
52  -e 's|@YAT_STATIC_LIBS[@]|$(YAT_STATIC_LIBS)|g' \
53  -e 's|@LIBM[@]|$(LIBM)|g' \
54  -e 's|@YAT_CONFIG_CPPFLAGS[@]|$(YAT_CONFIG_CPPFLAGS)|g' \
55  -e 's|@YAT_CONFIG_CXXFLAGS[@]|$(YAT_CONFIG_CXXFLAGS)|g' \
56  -e 's|@YAT_CONFIG_LDFLAGS[@]|$(YAT_CONFIG_LDFLAGS)|g' \
57  -e 's|@PACKAGE[@]|$(PACKAGE)|g' \
58  -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
59  -e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \
60  -e 's|@VERSION[@]|$(VERSION)|g' \
61  -e 's|@YAT_MAJOR_VERSION[@]|$(YAT_MAJOR_VERSION)|g' \
62  -e 's|@YAT_MINOR_VERSION[@]|$(YAT_MINOR_VERSION)|g' \
63  -e 's|@YAT_PATCH_VERSION[@]|$(YAT_PATCH_VERSION)|g' \
64  -e 's|@YAT_DEV_BUILD[@]|$(YAT_DEV_BUILD)|g' \
65  -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
66  -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g'
67
68build_support/yat-config: Makefile $(srcdir)/build_support/yat-config.in
69  @$(AM_V_GEN)rm -f $@ $@.tmp \
70  && echo "#! $(SHELL)" > $@.tmp \
71  && echo "# yat-config generated by make from yat-config.in" >> $@.tmp \
72  && $(edit) '$(srcdir)/$@.in' >>$@.tmp \
73  && chmod +x $@.tmp \
74  && chmod a-w $@.tmp \
75  && mv $@.tmp $@
76
77build_support/for_installation/yat-config: build_support/yat-config
78  $(AM_V_GEN)rm -f $@ $@-t \
79  && $(MKDIR_P) build_support/for_installation \
80  && sed 's|installed=no|installed=yes|g' < build_support/yat-config > $@-t \
81  && mv $@-t $@
82
83build_support/yat.pc: $(srcdir)/build_support/yat.pc.in build_support/gen_yat_pc.sh Makefile
84  $(AM_V_GEN)rm -f $@ $@-t \
85  && cd build_support \
86  && $(SHELL) gen_yat_pc.sh --prefix="$(prefix)" \
87  --exec-prefix="$(exec_prefix)" \
88  --libdir="$(libdir)" --includedir="$(includedir)" \
89  --input="../$(srcdir)/build_support/yat.pc.in" > yat.pc-t \
90  && mv yat.pc-t yat.pc
Note: See TracBrowser for help on using the repository browser.