summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-12-28 00:32:51 (UTC)
committer mickeyl <mickeyl>2003-12-28 00:32:51 (UTC)
commite889485e945d8fa9564566f286114be10d2a1ce5 (patch) (unidiff)
tree23eb3b07521f36d22b165793164c25f1d0acdaae
parent7812187f6732eef351e501d993aa664b7e351cbb (diff)
downloadopie-e889485e945d8fa9564566f286114be10d2a1ce5.zip
opie-e889485e945d8fa9564566f286114be10d2a1ce5.tar.gz
opie-e889485e945d8fa9564566f286114be10d2a1ce5.tar.bz2
fix qmake 1.05a to generate the PRO line in a Makefile
this feature seemed to have been removed in 1.05a - it was in 1.04a and is needed for opie-lupdate to work
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/generators/unix/unixmake2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 7fbb9f4..d8a4a0d 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -81,128 +81,129 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
81 (!project->variables()["QMAKE_APP_FLAG"].isEmpty() || 81 (!project->variables()["QMAKE_APP_FLAG"].isEmpty() ||
82 !project->isActiveConfig("staticlib"))), 82 !project->isActiveConfig("staticlib"))),
83 src_incremental=FALSE, moc_incremental=FALSE; 83 src_incremental=FALSE, moc_incremental=FALSE;
84 84
85 t << "####### Compiler, tools and options" << endl << endl; 85 t << "####### Compiler, tools and options" << endl << endl;
86 t << "CC = "; 86 t << "CC = ";
87 if (project->isActiveConfig("thread") && 87 if (project->isActiveConfig("thread") &&
88 ! project->variables()["QMAKE_CC_THREAD"].isEmpty()) 88 ! project->variables()["QMAKE_CC_THREAD"].isEmpty())
89 t << var("QMAKE_CC_THREAD") << endl; 89 t << var("QMAKE_CC_THREAD") << endl;
90 else 90 else
91 t << var("QMAKE_CC") << endl; 91 t << var("QMAKE_CC") << endl;
92 92
93 t << "CXX = "; 93 t << "CXX = ";
94 if (project->isActiveConfig("thread") && 94 if (project->isActiveConfig("thread") &&
95 ! project->variables()["QMAKE_CXX_THREAD"].isEmpty()) 95 ! project->variables()["QMAKE_CXX_THREAD"].isEmpty())
96 t << var("QMAKE_CXX_THREAD") << endl; 96 t << var("QMAKE_CXX_THREAD") << endl;
97 else 97 else
98 t << var("QMAKE_CXX") << endl; 98 t << var("QMAKE_CXX") << endl;
99 99
100 t << "LEX = " << var("QMAKE_LEX") << endl; 100 t << "LEX = " << var("QMAKE_LEX") << endl;
101 t << "YACC = " << var("QMAKE_YACC") << endl; 101 t << "YACC = " << var("QMAKE_YACC") << endl;
102 t << "CFLAGS = " << var("QMAKE_CFLAGS") << " " 102 t << "CFLAGS = " << var("QMAKE_CFLAGS") << " "
103 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " " 103 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " "
104 << varGlue("DEFINES","-D"," -D","") << endl; 104 << varGlue("DEFINES","-D"," -D","") << endl;
105 t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " " 105 t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " "
106 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " " 106 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " "
107 << varGlue("DEFINES","-D"," -D","") << endl; 107 << varGlue("DEFINES","-D"," -D","") << endl;
108 t << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl; 108 t << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl;
109 t << "YACCFLAGS= " << var("QMAKE_YACCFLAGS") << endl; 109 t << "YACCFLAGS= " << var("QMAKE_YACCFLAGS") << endl;
110 t << "INCPATH = " << "-I" << specdir(); 110 t << "INCPATH = " << "-I" << specdir();
111 if(!project->isActiveConfig("no_include_pwd")) { 111 if(!project->isActiveConfig("no_include_pwd")) {
112 QString pwd = fileFixify(QDir::currentDirPath()); 112 QString pwd = fileFixify(QDir::currentDirPath());
113 if(pwd.isEmpty()) 113 if(pwd.isEmpty())
114 pwd = "."; 114 pwd = ".";
115 t << " -I" << pwd; 115 t << " -I" << pwd;
116 } 116 }
117 t << varGlue("INCLUDEPATH"," -I", " -I", "") << endl; 117 t << varGlue("INCLUDEPATH"," -I", " -I", "") << endl;
118 118
119 if(!project->isActiveConfig("staticlib")) { 119 if(!project->isActiveConfig("staticlib")) {
120 t << "LINK = "; 120 t << "LINK = ";
121 if (project->isActiveConfig("thread") && 121 if (project->isActiveConfig("thread") &&
122 ! project->variables()["QMAKE_LINK_THREAD"].isEmpty()) 122 ! project->variables()["QMAKE_LINK_THREAD"].isEmpty())
123 t << var("QMAKE_LINK_THREAD") << endl; 123 t << var("QMAKE_LINK_THREAD") << endl;
124 else 124 else
125 t << var("QMAKE_LINK") << endl; 125 t << var("QMAKE_LINK") << endl;
126 126
127 t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl; 127 t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
128 t << "LIBS = " << "$(SUBLIBS) " << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << endl; 128 t << "LIBS = " << "$(SUBLIBS) " << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << endl;
129 } 129 }
130 130
131 t << "AR = " << var("QMAKE_AR") << endl; 131 t << "AR = " << var("QMAKE_AR") << endl;
132 t << "RANLIB = " << var("QMAKE_RANLIB") << endl; 132 t << "RANLIB = " << var("QMAKE_RANLIB") << endl;
133 t << "MOC = " << var("QMAKE_MOC") << endl; 133 t << "MOC = " << var("QMAKE_MOC") << endl;
134 t << "UIC = "<< var("QMAKE_UIC") << endl; 134 t << "UIC = "<< var("QMAKE_UIC") << endl;
135 t << "QMAKE = "<< (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; 135 t << "QMAKE = "<< (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
136 t << "TAR = "<< var("QMAKE_TAR") << endl; 136 t << "TAR = "<< var("QMAKE_TAR") << endl;
137 t << "GZIP = " << var("QMAKE_GZIP") << endl; 137 t << "GZIP = " << var("QMAKE_GZIP") << endl;
138 t << "COPY = " << var("QMAKE_COPY") << endl; 138 t << "COPY = " << var("QMAKE_COPY") << endl;
139 t << "COPY_FILE= " << var("QMAKE_COPY_FILE") << endl; 139 t << "COPY_FILE= " << var("QMAKE_COPY_FILE") << endl;
140 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl; 140 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl;
141 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 141 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
142 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; 142 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl;
143 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; 143 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
144 t << "MOVE = " << var("QMAKE_MOVE") << endl; 144 t << "MOVE = " << var("QMAKE_MOVE") << endl;
145 t << "PRO = " << fileFixify(project->projectFile() )<< endl;
145 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; 146 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
146 t << "MKDIR = " << var("QMAKE_MKDIR") << endl; 147 t << "MKDIR = " << var("QMAKE_MKDIR") << endl;
147 t << endl; 148 t << endl;
148 149
149 t << "####### Output directory" << endl << endl; 150 t << "####### Output directory" << endl << endl;
150 if (! project->variables()["OBJECTS_DIR"].isEmpty()) 151 if (! project->variables()["OBJECTS_DIR"].isEmpty())
151 t << "OBJECTS_DIR = " << var("OBJECTS_DIR") << endl; 152 t << "OBJECTS_DIR = " << var("OBJECTS_DIR") << endl;
152 else 153 else
153 t << "OBJECTS_DIR = ./" << endl; 154 t << "OBJECTS_DIR = ./" << endl;
154 t << endl; 155 t << endl;
155 156
156 /* files */ 157 /* files */
157 t << "####### Files" << endl << endl; 158 t << "####### Files" << endl << endl;
158 t << "HEADERS = " << varList("HEADERS") << endl; 159 t << "HEADERS = " << varList("HEADERS") << endl;
159 t << "SOURCES = " << varList("SOURCES") << endl; 160 t << "SOURCES = " << varList("SOURCES") << endl;
160 if(do_incremental) { 161 if(do_incremental) {
161 QStringList &objs = project->variables()["OBJECTS"], &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out; 162 QStringList &objs = project->variables()["OBJECTS"], &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out;
162 t << "OBJECTS = "; 163 t << "OBJECTS = ";
163 for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) { 164 for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) {
164 bool increment = FALSE; 165 bool increment = FALSE;
165 for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) { 166 for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
166 if((*objit).find(QRegExp((*incrit), TRUE, TRUE)) != -1) { 167 if((*objit).find(QRegExp((*incrit), TRUE, TRUE)) != -1) {
167 increment = TRUE; 168 increment = TRUE;
168 incrs_out.append((*objit)); 169 incrs_out.append((*objit));
169 break; 170 break;
170 } 171 }
171 } 172 }
172 if(!increment) 173 if(!increment)
173 t << "\\\n\t\t" << (*objit); 174 t << "\\\n\t\t" << (*objit);
174 } 175 }
175 if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done! 176 if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done!
176 t << incrs_out.join(" \\\n\t\t") << endl; 177 t << incrs_out.join(" \\\n\t\t") << endl;
177 } else if(!incrs_out.count()) { 178 } else if(!incrs_out.count()) {
178 t << endl; 179 t << endl;
179 } else { 180 } else {
180 src_incremental = TRUE; 181 src_incremental = TRUE;
181 t << endl; 182 t << endl;
182 t << "INCREMENTAL_OBJECTS = " << incrs_out.join(" \\\n\t\t") << endl; 183 t << "INCREMENTAL_OBJECTS = " << incrs_out.join(" \\\n\t\t") << endl;
183 } 184 }
184 } else { 185 } else {
185 t << "OBJECTS = " << varList("OBJECTS") << endl; 186 t << "OBJECTS = " << varList("OBJECTS") << endl;
186 } 187 }
187 t << "FORMS = " << varList("FORMS") << endl; 188 t << "FORMS = " << varList("FORMS") << endl;
188 t << "UICDECLS = " << varList("UICDECLS") << endl; 189 t << "UICDECLS = " << varList("UICDECLS") << endl;
189 t << "UICIMPLS = " << varList("UICIMPLS") << endl; 190 t << "UICIMPLS = " << varList("UICIMPLS") << endl;
190 QString srcMoc = varList("SRCMOC"), objMoc = varList("OBJMOC"); 191 QString srcMoc = varList("SRCMOC"), objMoc = varList("OBJMOC");
191 t << "SRCMOC = " << srcMoc << endl; 192 t << "SRCMOC = " << srcMoc << endl;
192 if(do_incremental) { 193 if(do_incremental) {
193 QStringList &objs = project->variables()["OBJMOC"], 194 QStringList &objs = project->variables()["OBJMOC"],
194 &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out; 195 &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out;
195 t << "OBJMOC = "; 196 t << "OBJMOC = ";
196 for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) { 197 for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) {
197 bool increment = FALSE; 198 bool increment = FALSE;
198 for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) { 199 for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
199 if((*objit).find(QRegExp((*incrit), TRUE, TRUE)) != -1) { 200 if((*objit).find(QRegExp((*incrit), TRUE, TRUE)) != -1) {
200 increment = TRUE; 201 increment = TRUE;
201 incrs_out.append((*objit)); 202 incrs_out.append((*objit));
202 break; 203 break;
203 } 204 }
204 } 205 }
205 if(!increment) 206 if(!increment)
206 t << "\\\n\t\t" << (*objit); 207 t << "\\\n\t\t" << (*objit);
207 } 208 }
208 if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done! 209 if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done!