summaryrefslogtreecommitdiff
path: root/ACE/bin
diff options
context:
space:
mode:
authormitza <mitza@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-09-23 16:17:42 +0000
committermitza <mitza@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-09-23 16:17:42 +0000
commit3ce0367cbbca2c47636be22d13d80acfd2bb5b21 (patch)
tree1675598f45f5763b488dd4c73f818e2b70464af3 /ACE/bin
parente904941ec1050ce094ad1f2d2d6dbfb83524ca88 (diff)
downloadATCD-3ce0367cbbca2c47636be22d13d80acfd2bb5b21.tar.gz
ChangeLogTag: Thu Sep 23 16:14:12 UTC 2010 Adam Mitz <mitza@ociweb.com>
Diffstat (limited to 'ACE/bin')
-rw-r--r--ACE/bin/MakeProjectCreator/config/pkgconfig.mpb3
-rw-r--r--ACE/bin/MakeProjectCreator/templates/gnu.mpd19
-rwxr-xr-xACE/bin/ace_install_pkgconfig.pl45
3 files changed, 59 insertions, 8 deletions
diff --git a/ACE/bin/MakeProjectCreator/config/pkgconfig.mpb b/ACE/bin/MakeProjectCreator/config/pkgconfig.mpb
index e48f56242b6..075c91932cd 100644
--- a/ACE/bin/MakeProjectCreator/config/pkgconfig.mpb
+++ b/ACE/bin/MakeProjectCreator/config/pkgconfig.mpb
@@ -3,7 +3,6 @@
project {
Define_Custom(pkgconfig) {
- automatic = 0
- inputext = .in
+ inputext = .pc.in
}
}
diff --git a/ACE/bin/MakeProjectCreator/templates/gnu.mpd b/ACE/bin/MakeProjectCreator/templates/gnu.mpd
index d703883a6a5..ea73ba06cfe 100644
--- a/ACE/bin/MakeProjectCreator/templates/gnu.mpd
+++ b/ACE/bin/MakeProjectCreator/templates/gnu.mpd
@@ -177,13 +177,7 @@ VSHDIR = <%targetoutdir%>.shobj/
<%endif%>
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-<%if(version)%>
-
-ifeq ($(versioned_so),1)
- SOVERSION = .<%version%>
-endif # versioned_so
-<%endif%>
<%marker(extension)%>
<%if(ciao)%>
include $(CIAO_ROOT)/rules.ciao.GNU
@@ -195,6 +189,12 @@ include $(DANCE_ROOT)/rules.dance.GNU
include $(TAO_ROOT)/rules.tao.GNU
<%endif%>
+<%if(version)%>
+GNUACE_PROJECT_VERSION = <%version%>
+<%else%>
+GNUACE_PROJECT_VERSION ?= $(ACE_VERSION)
+<%endif%>
+
<%if(resource_files)%>
ifneq (,$(RC))
RESOURCES += \
@@ -800,6 +800,13 @@ else
$(INSTALLER) -i -s $(subst $(SPACE),$(COMMA),$(INST_TAGS)) \
$(INST_LOCATIONS) $(if $(ARCH),-d $(ARCH)) $(PRJINST_OPTIONS) \
$(INSTALL_PREFIX)
+<%foreach(custom_types)%>
+<%if(compares(custom_type, pkgconfig_files))%>
+<%if(custom_type->input_files)%>
+ $(ACE_ROOT)/bin/ace_install_pkgconfig.pl <%custom_type->input_files%> --prefix $(INSTALL_PREFIX) --libdir $(INSTALL_LIB) --libs "$(LIBS)" --version $(GNUACE_PROJECT_VERSION)<%foreach(pkgconfig_variables)%> --custom "<%pkgconfig_variable%>"<%endfor%>
+<%endif%>
+<%endif%>
+<%endfor%>
<%marker(postinstall)%>
endif
endif
diff --git a/ACE/bin/ace_install_pkgconfig.pl b/ACE/bin/ace_install_pkgconfig.pl
new file mode 100755
index 00000000000..703249da3b1
--- /dev/null
+++ b/ACE/bin/ace_install_pkgconfig.pl
@@ -0,0 +1,45 @@
+eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}'
+ & eval 'exec perl -w -S $0 $argv:q'
+ if 0;
+# ********************************************************************
+# $Id$
+# ace_install_pkgconfig.pl - Creates *.pc files for pkg-config in the
+# installed location, based on the *.pc.in
+# files from the source tree, with @foo@
+# variables replaced with their values.
+# Called from the MPC-generated makefiles.
+# ********************************************************************
+
+use strict;
+use Getopt::Long;
+
+my ($prefix, $libdir, $libs, $version, %custom);
+GetOptions('prefix=s' => \$prefix, 'libdir=s' => \$libdir, 'libs=s' => \$libs,
+ 'version=s' => \$version, 'custom=s' => \%custom);
+
+my %subs = ('LIBS' => $libs, 'VERSION' => $version, 'exec_prefix' => $prefix,
+ 'prefix' => $prefix, 'includedir' => "$prefix/include",
+ 'libdir' => "$prefix/$libdir");
+
+for my $k (keys %custom) {
+ $subs{$k} = $custom{$k};
+}
+
+my $pcdir = "$prefix/$libdir/pkgconfig";
+if (scalar @ARGV && ! -d $pcdir) {
+ mkdir($pcdir, 0755);
+}
+
+for my $file (@ARGV) {
+ open IN, $file;
+ my $pcfile = $file;
+ $pcfile =~ s/\.in$//;
+ open OUT, ">$pcdir/$pcfile";
+ while (<IN>) {
+ s/@(\w+)@/exists $subs{$1} ? $subs{$1} : $&/ge;
+ print OUT $_;
+ }
+ close OUT;
+ close IN;
+}
+