diff options
Diffstat (limited to 'experimental/tqtinterface/qt4/qmake/generators/unix/unixmake2.cpp')
-rw-r--r-- | experimental/tqtinterface/qt4/qmake/generators/unix/unixmake2.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/experimental/tqtinterface/qt4/qmake/generators/unix/unixmake2.cpp b/experimental/tqtinterface/qt4/qmake/generators/unix/unixmake2.cpp index dc56d1edf..b4a8a8b80 100644 --- a/experimental/tqtinterface/qt4/qmake/generators/unix/unixmake2.cpp +++ b/experimental/tqtinterface/qt4/qmake/generators/unix/unixmake2.cpp @@ -221,7 +221,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) for(TQStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) { bool increment = FALSE; for(TQStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) { - if((*objit).tqfind(TQRegExp((*incrit), TRUE, TRUE)) != -1) { + if((*objit).find(TQRegExp((*incrit), TRUE, TRUE)) != -1) { increment = TRUE; incrs_out.append((*objit)); break; @@ -254,7 +254,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) for(TQStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) { bool increment = FALSE; for(TQStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) { - if((*objit).tqfind(TQRegExp((*incrit), TRUE, TRUE)) != -1) { + if((*objit).find(TQRegExp((*incrit), TRUE, TRUE)) != -1) { increment = TRUE; incrs_out.append((*objit)); break; @@ -371,7 +371,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) } if(!d_file.isEmpty()) { d_file = odir + ".deps/" + d_file + ".d"; - TQStringList deps = tqfindDependencies((*it)).grep(TQRegExp(Option::cpp_tqmoc_ext + "$")); + TQStringList deps = findDependencies((*it)).grep(TQRegExp(Option::cpp_tqmoc_ext + "$")); if(!deps.isEmpty()) t << d_file << ": " << deps.join(" ") << endl; t << var("TQMAKE_CFLAGS_USE_PRECOMPILE") << " " << d_file << endl; @@ -399,7 +399,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) TQMakeMetaInfo libinfo; if(libinfo.readLib((*it)) && !libinfo.isEmpty("TQMAKE_PRL_BUILD_DIR")) { TQString dir; - int slsh = (*it).tqfindRev(Option::dir_sep); + int slsh = (*it).findRev(Option::dir_sep); if(slsh != -1) dir = (*it).left(slsh + 1); TQString targ = dir + libinfo.first("TQMAKE_PRL_TARGET"); @@ -416,9 +416,9 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) if(do_incremental) { //incremental target TQString incr_target = var("TARGET") + "_incremental"; - if(incr_target.tqfind(Option::dir_sep) != -1) + if(incr_target.find(Option::dir_sep) != -1) incr_target = incr_target.right(incr_target.length() - - (incr_target.tqfindRev(Option::dir_sep) + 1)); + (incr_target.findRev(Option::dir_sep) + 1)); TQString incr_deps, incr_objs; if(project->first("TQMAKE_INCREMENTAL_STYLE") == "ld") { TQString incr_target_dir = var("OBJECTS_DIR") + incr_target + Option::obj_ext; @@ -494,11 +494,11 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) TQString destdir = project->first("DESTDIR"), incr_deps; if(do_incremental) { TQString s_ext = project->variables()["TQMAKE_EXTENSION_SHLIB"].first(); - TQString incr_target = TQT_TQSTRING(var("TQMAKE_ORIG_TARGET").tqreplace( - TQRegExp("\\." + s_ext), "")).tqreplace(TQRegExp("^lib"), "") + "_incremental"; - if(incr_target.tqfind(Option::dir_sep) != -1) + TQString incr_target = TQT_TQSTRING(var("TQMAKE_ORIG_TARGET").replace( + TQRegExp("\\." + s_ext), "")).replace(TQRegExp("^lib"), "") + "_incremental"; + if(incr_target.find(Option::dir_sep) != -1) incr_target = incr_target.right(incr_target.length() - - (incr_target.tqfindRev(Option::dir_sep) + 1)); + (incr_target.findRev(Option::dir_sep) + 1)); if(project->first("TQMAKE_INCREMENTAL_STYLE") == "ld") { TQString incr_target_dir = var("OBJECTS_DIR") + incr_target + Option::obj_ext; @@ -508,7 +508,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) << "ld -r -o " << incr_target_dir << " " << link_deps << endl; //communicated below TQStringList &cmd = project->variables()["TQMAKE_LINK_SHLIB_CMD"]; - cmd.first().tqreplace("$(OBJECTS) $(OBJTQMOC)", + cmd.first().replace("$(OBJECTS) $(OBJTQMOC)", "$(INCREMENTAL_OBJECTS) $(INCREMENTAL_OBJTQMOC)"); //ick cmd.append(incr_target_dir); deps.prepend(incr_target_dir + " "); @@ -651,7 +651,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) t << var("DESTDIR") << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) " << var("POST_TARGETDEPS") << valList(build) << "\n\t"; ar = project->variables()["TQMAKE_AR_CMD"].first(); - ar = TQT_TQSTRING(ar.tqreplace("$(OBJTQMOC)", "")).tqreplace("$(OBJECTS)", + ar = TQT_TQSTRING(ar.replace("$(OBJTQMOC)", "")).replace("$(OBJECTS)", build.join(" ")); } else { t << (*libit) << ": " << valList(build) << "\n\t"; @@ -906,7 +906,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) outfile += header_prefix + "c++"; compiler = "$(CXX) "; } - t << outfile << ": " << precomph << " " << tqfindDependencies(precomph).join(" \\\n\t\t") + t << outfile << ": " << precomph << " " << findDependencies(precomph).join(" \\\n\t\t") << "\n\t" << "test -d " << outdir << " || mkdir -p " << outdir << "\n\t" << compiler << flags << " $(INCPATH) " << precomph << " -o " << outfile << endl << endl; } @@ -940,7 +940,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) dep = (*dep_it); deps += " " + dep; } - if(project->variables()[(*it) + ".CONFIG"].tqfindIndex("phony") != -1) + if(project->variables()[(*it) + ".CONFIG"].findIndex("phony") != -1) deps += TQString(" ") + "FORCE"; t << targ << ":" << deps << "\n\t" << cmd << endl << endl; @@ -961,17 +961,17 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t) TQFileInfo fi(Option::fixPathToLocalOS((*input))); TQString in = Option::fixPathToTargetOS((*input), FALSE), out = tmp_out, cmd = tmp_cmd, deps; - out.tqreplace("${TQMAKE_FILE_BASE}", fi.baseName()); - out.tqreplace("${TQMAKE_FILE_NAME}", fi.filePath()); - cmd.tqreplace("${TQMAKE_FILE_BASE}", fi.baseName()); - cmd.tqreplace("${TQMAKE_FILE_OUT}", out); - cmd.tqreplace("${TQMAKE_FILE_NAME}", fi.filePath()); + out.replace("${TQMAKE_FILE_BASE}", fi.baseName()); + out.replace("${TQMAKE_FILE_NAME}", fi.filePath()); + cmd.replace("${TQMAKE_FILE_BASE}", fi.baseName()); + cmd.replace("${TQMAKE_FILE_OUT}", out); + cmd.replace("${TQMAKE_FILE_NAME}", fi.filePath()); for(TQStringList::Iterator it3 = vars.begin(); it3 != vars.end(); ++it3) - cmd.tqreplace("$(" + (*it3) + ")", "$(TQMAKE_COMP_" + (*it3)+")"); + cmd.replace("$(" + (*it3) + ")", "$(TQMAKE_COMP_" + (*it3)+")"); if(!tmp_dep.isEmpty()) { char buff[256]; TQString dep_cmd = tmp_dep; - dep_cmd.tqreplace("${TQMAKE_FILE_NAME}", fi.filePath()); + dep_cmd.replace("${TQMAKE_FILE_NAME}", fi.filePath()); if(FILE *proc = TQT_POPEN(dep_cmd.latin1(), "r")) { while(!feof(proc)) { int read_in = int(fread(buff, 1, 255, proc)); @@ -1020,7 +1020,7 @@ UnixMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct) subdirs.append(sd); sd->makefile = "$(MAKEFILE)"; if((*it).right(4) == ".pro") { - int slsh = file.tqfindRev(Option::dir_sep); + int slsh = file.findRev(Option::dir_sep); if(slsh != -1) { sd->directory = file.left(slsh+1); sd->profile = file.mid(slsh+1); @@ -1036,22 +1036,22 @@ UnixMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct) sd->directory = sd->directory.left(sd->directory.length() - 1); if(!sd->profile.isEmpty()) { TQString basename = sd->directory; - int new_slsh = basename.tqfindRev(Option::dir_sep); + int new_slsh = basename.findRev(Option::dir_sep); if(new_slsh != -1) basename = basename.mid(new_slsh+1); if(sd->profile != basename + ".pro") sd->makefile += "." + sd->profile.left(sd->profile.length() - 4); //no need for the .pro } sd->target = "sub-" + (*it); - sd->target.tqreplace('/', '-'); - sd->target.tqreplace('.', '_'); + sd->target.replace('/', '-'); + sd->target.replace('.', '_'); } } TQPtrListIterator<SubDir> it(subdirs); TQString ofile = Option::output.name(); - if(ofile.tqfindRev(Option::dir_sep) != -1) - ofile = ofile.right(ofile.length() - ofile.tqfindRev(Option::dir_sep) -1); + if(ofile.findRev(Option::dir_sep) != -1) + ofile = ofile.right(ofile.length() - ofile.findRev(Option::dir_sep) -1); t << "MAKEFILE = " << var("MAKEFILE") << endl; t << "TQMAKE = " << var("TQMAKE") << endl; t << "DEL_FILE = " << var("TQMAKE_DEL_FILE") << endl; @@ -1173,7 +1173,7 @@ UnixMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct) dep = (*dep_it); deps += " " + dep; } - if(project->variables()[(*qut_it) + ".CONFIG"].tqfindIndex("phony") != -1) + if(project->variables()[(*qut_it) + ".CONFIG"].findIndex("phony") != -1) deps += TQString(" ") + "FORCE"; t << targ << ":" << deps << "\n"; if(!cmd.isEmpty()) @@ -1220,7 +1220,7 @@ void UnixMakefileGenerator::init2() project->variables()["TARGET_la"] = TQT_TQSTRING(project->first("DESTDIR") + "lib" + project->first("TARGET") + Option::libtool_ext); if ( !project->variables()["TQMAKE_AR_CMD"].isEmpty() ) - project->variables()["TQMAKE_AR_CMD"].first().tqreplace("(TARGET)","(TARGETA)"); + project->variables()["TQMAKE_AR_CMD"].first().replace("(TARGET)","(TARGETA)"); else project->variables()["TQMAKE_AR_CMD"].append("$(AR) $(TARGETA) $(OBJECTS) $(OBJTQMOC)"); if( project->isActiveConfig("compile_libtool") ) { @@ -1396,9 +1396,9 @@ void UnixMakefileGenerator::init2() TQFileInfo fi(Option::fixPathToLocalOS((*input))); TQString in = Option::fixPathToTargetOS((*input), FALSE), out = tmp_out; - out.tqreplace("${TQMAKE_FILE_BASE}", fi.baseName()); - out.tqreplace("${TQMAKE_FILE_NAME}", fi.filePath()); - if(project->variables()[(*it) + ".CONFIG"].tqfindIndex("no_link") == -1) + out.replace("${TQMAKE_FILE_BASE}", fi.baseName()); + out.replace("${TQMAKE_FILE_NAME}", fi.filePath()); + if(project->variables()[(*it) + ".CONFIG"].findIndex("no_link") == -1) project->variables()["OBJCOMP"] += out; } } @@ -1409,10 +1409,10 @@ TQString UnixMakefileGenerator::libtoolFileName() { TQString ret = var("TARGET"); - int slsh = ret.tqfindRev(Option::dir_sep); + int slsh = ret.findRev(Option::dir_sep); if(slsh != -1) ret = ret.right(ret.length() - slsh); - int dot = ret.tqfind('.'); + int dot = ret.find('.'); if(dot != -1) ret = ret.left(dot); ret += Option::libtool_ext; @@ -1425,7 +1425,7 @@ void UnixMakefileGenerator::writeLibtoolFile() { TQString fname = libtoolFileName(), lname = fname; - int slsh = lname.tqfindRev(Option::dir_sep); + int slsh = lname.findRev(Option::dir_sep); if(slsh != -1) lname = lname.right(lname.length() - slsh - 1); TQFile ft(fname); @@ -1494,12 +1494,12 @@ TQString UnixMakefileGenerator::pkgConfigFileName() { TQString ret = var("TARGET"); - int slsh = ret.tqfindRev(Option::dir_sep); + int slsh = ret.findRev(Option::dir_sep); if(slsh != -1) ret = ret.right(ret.length() - slsh); if(ret.startsWith("lib")) ret = ret.mid(3); - int dot = ret.tqfind('.'); + int dot = ret.find('.'); if(dot != -1) ret = ret.left(dot); ret += Option::pkgcfg_ext; @@ -1545,7 +1545,7 @@ UnixMakefileGenerator::pkgConfigFixPath(TQString path) const { TQString prefix = pkgConfigPrefix(); if(path.startsWith(prefix)) - path = path.tqreplace(prefix, "${prefix}"); + path = path.replace(prefix, "${prefix}"); return path; } @@ -1553,7 +1553,7 @@ void UnixMakefileGenerator::writePkgConfigFile() // ### does make sense only for libtqt so far { TQString fname = pkgConfigFileName(), lname = fname; - int slsh = lname.tqfindRev(Option::dir_sep); + int slsh = lname.findRev(Option::dir_sep); if(slsh != -1) lname = lname.right(lname.length() - slsh - 1); TQFile ft(fname); @@ -1588,7 +1588,7 @@ UnixMakefileGenerator::writePkgConfigFile() // ### does make sense only for TQString desc = project->first("TQMAKE_PKGCONFIG_DESCRIPTION"); if(desc.isEmpty()) { desc = project->first("TARGET").lower(); - desc.tqreplace(0, 1, TQT_TQCHAR(desc[0]).upper()); + desc.replace(0, 1, TQT_TQCHAR(desc[0]).upper()); if(project->first("TEMPLATE") == "lib") { if(project->isActiveConfig("plugin")) desc += " Plugin"; @@ -1632,7 +1632,7 @@ void UnixMakefileGenerator::writeTMOCFile() { TQString fname = TMOCFileName(), lname = fname; - int slsh = lname.tqfindRev(Option::dir_sep); + int slsh = lname.findRev(Option::dir_sep); if(slsh != -1) lname = lname.right(lname.length() - slsh - 1); TQFile ft(fname); @@ -1672,7 +1672,7 @@ void UnixMakefileGenerator::writeTMOCFile2() { TQString fname = TMOCFileName2(), lname = fname; - int slsh = lname.tqfindRev(Option::dir_sep); + int slsh = lname.findRev(Option::dir_sep); if(slsh != -1) lname = lname.right(lname.length() - slsh - 1); TQFile ft(fname); |