blob: 98f2cd49898449fce9ea24d02ceacf1a331bca8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
$NetBSD: patch-ak,v 1.1 2006/03/12 06:49:21 minskim Exp $
--- qmake/generators/unix/unixmake.cpp.orig 2005-09-02 12:43:19.000000000 +0000
+++ qmake/generators/unix/unixmake.cpp
@@ -340,27 +340,31 @@ UnixMakefileGenerator::init()
if(libtoolify[i].startsWith("QMAKE_LINK") || libtoolify[i] == "QMAKE_AR_CMD") {
libtool_flags += " --mode=link";
if(project->isActiveConfig("staticlib")) {
- libtool_flags += " -static";
+ comp_flags += " -static";
} else {
if(!project->isEmpty("QMAKE_LIB_FLAG")) {
+ if(project->isActiveConfig("plugin"))
+ comp_flags += " -avoid-version";
+ else {
int maj = project->first("VER_MAJ").toInt();
int min = project->first("VER_MIN").toInt();
int pat = project->first("VER_PAT").toInt();
- comp_flags += " -version-info " + QString::number(10*maj + min) +
- ":" + QString::number(pat) + ":0";
+ comp_flags += " -version-info " + QString::number(maj + min) +
+ ":" + QString::number(pat) +
+ ":" + QString::number(min);
+ }
if(libtoolify[i] != "QMAKE_AR_CMD") {
- QString rpath = Option::output_dir;
- if(!project->isEmpty("DESTDIR")) {
- rpath = project->first("DESTDIR");
- if(QDir::isRelativePath(rpath))
- rpath.prepend(Option::output_dir + Option::dir_sep);
- }
+ QString rpath = Option::fixPathToTargetOS(project->first("target.path")\
+ , FALSE);
+ rpath = fileFixify(rpath);
+ if(rpath.right(1) != Option::dir_sep)
+ rpath += Option::dir_sep;
comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, FALSE);
}
}
}
if(project->isActiveConfig("plugin"))
- libtool_flags += " -module";
+ comp_flags += " -module";
} else {
libtool_flags += " --mode=compile";
}
@@ -820,8 +824,12 @@ UnixMakefileGenerator::defaultInstall(co
src_targ = "$(TARGETL)";
QString dst_dir = fileFixify(targetdir);
if(QDir::isRelativePath(dst_dir))
- dst_dir = Option::fixPathToTargetOS(Option::output_dir + Option::dir_sep + dst_dir);
- ret = "-$(LIBTOOL) --mode=install cp \"" + src_targ + "\" \"" + root + dst_dir + "\"";
+ dst_dir = Option::fixPathToTargetOS(dst_dir);
+ if(!ret.isEmpty())
+ ret += "\n\t";
+ ret += "-$(LIBTOOL) --mode=install cp \"" + src_targ + "\" \"" + root + dst_dir + "\"";
+ if(!uninst.isEmpty())
+ uninst.append("\n\t");
uninst.append("-$(LIBTOOL) --mode=uninstall \"" + src_targ + "\"");
} else {
QString src_targ = target;
|