author | zecke <zecke> | 2003-04-20 18:11:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-04-20 18:11:49 (UTC) |
commit | d32e9a7306da861786551c518525862a50154b95 (patch) (side-by-side diff) | |
tree | 4ee2c97637b53691ea48322a200ec98cb7f13189 /qmake | |
parent | ca3cd49d65353584bfe85755ef2885b049d25d33 (diff) | |
download | opie-d32e9a7306da861786551c518525862a50154b95.zip opie-d32e9a7306da861786551c518525862a50154b95.tar.gz opie-d32e9a7306da861786551c518525862a50154b95.tar.bz2 |
add PRO = file.pro
to the Makefile
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index cbe2014..9bb6f6b 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -78,9 +78,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString deps = fileFixify(Option::output.name()), prl; bool do_incremental = (project->isActiveConfig("incremental") && !project->variables()["QMAKE_INCREMENTAL"].isEmpty() && (!project->variables()["QMAKE_APP_FLAG"].isEmpty() || - !project->isActiveConfig("staticlib"))), + !project->isActiveConfig("staticlib"))), src_incremental=FALSE, moc_incremental=FALSE; QString os = project->variables()["QMAKESPEC"].first().section( '-', 0, 0 ); t << "####### Compiler, tools and options" << endl << endl; @@ -135,8 +135,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; t << "MOVE = " << var("QMAKE_MOVE") << endl; + t << "PRO = " << fileFixify(project->projectFile() )<< endl; t << endl; t << "####### Output directory" << endl << endl; if (! project->variables()["OBJECTS_DIR"].isEmpty()) @@ -529,9 +530,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "\n\t" << "$(RANLIB) $(TARGETA)"; t << endl << endl; } } else { - t << "all: " << deps << " " << varGlue("ALL_DEPS",""," "," ") << var("DESTDIR") << "$(TARGET) " + t << "all: " << deps << " " << varGlue("ALL_DEPS",""," "," ") << var("DESTDIR") << "$(TARGET) " << varGlue("QMAKE_AR_SUBLIBS", var("DESTDIR"), " " + var("DESTDIR"), "") << "\n\n" << "staticlib: " << var("DESTDIR") << "$(TARGET)" << "\n\n"; if(project->isEmpty("QMAKE_AR_SUBLIBS")) { t << var("DESTDIR") << "$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(TARGETDEPS) " << "\n\t"; @@ -544,27 +545,27 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isEmpty("QMAKE_POST_LINK")) t << "\t" << var("QMAKE_POST_LINK") << "\n"; if(!project->isEmpty("QMAKE_RANLIB")) t << "\t" << "$(RANLIB) $(TARGET)" << "\n"; - if(!project->isEmpty("DESTDIR")) + if(!project->isEmpty("DESTDIR")) t << "\t" << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET)" << "\n" << "\t" << "-$(MOVE) $(TARGET) " << var("DESTDIR") << "\n"; } else { int cnt = 0, max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt(); QStringList objs = project->variables()["OBJECTS"] + project->variables()["OBJMOC"], libs = project->variables()["QMAKE_AR_SUBLIBS"]; libs.prepend("$(TARGET)"); - for(QStringList::Iterator libit = libs.begin(), objit = objs.begin(); + for(QStringList::Iterator libit = libs.begin(), objit = objs.begin(); libit != libs.end(); ++libit) { QStringList build; - for(cnt = 0; cnt < max_files && objit != objs.end(); ++objit, cnt++) + for(cnt = 0; cnt < max_files && objit != objs.end(); ++objit, cnt++) build << (*objit); QString ar; if((*libit) == "$(TARGET)") { - t << var("DESTDIR") << "$(TARGET): $(UICDECLS) " << " $(TARGETDEPS) " + t << var("DESTDIR") << "$(TARGET): $(UICDECLS) " << " $(TARGETDEPS) " << valList(build) << "\n\t"; ar = project->variables()["QMAKE_AR_CMD"].first(); - ar = ar.replace("$(OBJMOC)", "").replace("$(OBJECTS)", + ar = ar.replace("$(OBJMOC)", "").replace("$(OBJECTS)", build.join(" ")); } else { t << (*libit) << ": " << valList(build) << "\n\t"; ar = "$(AR) " + (*libit) + " " + build.join(" "); @@ -578,9 +579,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isEmpty("QMAKE_POST_LINK")) t << "\t" << var("QMAKE_POST_LINK") << "\n"; if(!project->isEmpty("QMAKE_RANLIB")) t << "\t" << "$(RANLIB) " << (*libit) << "\n"; - if(!project->isEmpty("DESTDIR")) + if(!project->isEmpty("DESTDIR")) t << "\t" << "-$(DEL_FILE) " << var("DESTDIR") << (*libit) << "\n" << "\t" << "-$(MOVE) " << (*libit) << " " << var("DESTDIR") << "\n"; } } @@ -595,9 +596,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) //better than the alternative for now. QString moc = project->first("QMAKE_MOC"), target = project->first("TARGET"); fixEnvVariables(target); fixEnvVariables(moc); - if(target != moc) + if(target != moc) t << "$(MOC): \n\t" << "( cd $(QTDIR)/src/moc ; $(MAKE) )" << endl << endl; } @@ -641,9 +642,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isEmpty("FORMS")) { QStringList &forms = project->variables()["FORMS"], ui_headers; for(QStringList::Iterator formit = forms.begin(); formit != forms.end(); ++formit) { QString ui_h = fileFixify((*formit) + Option::h_ext.first()); - if(QFile::exists(ui_h) ) + if(QFile::exists(ui_h) ) ui_headers << ui_h; } if(!ui_headers.isEmpty()) t << "$(COPY_FILE) --parents " << val(ui_headers) << " " << ddir_c << Option::dir_sep << " && "; @@ -804,9 +805,9 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct) t << "MAKEFILE = " << var("MAKEFILE") << endl; t << "QMAKE = " << var("QMAKE") << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "SUBTARGETS = "; // subdirectory targets are sub-directory - for( it.toFirst(); it.current(); ++it) + for( it.toFirst(); it.current(); ++it) t << " \\\n\t\t" << it.current()->target; t << endl << endl; t << "first: all\n\nall: " << ofile << " $(SUBTARGETS)" << endl << endl; @@ -833,9 +834,9 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct) if (project->isActiveConfig("ordered")) { // generate dependencies for( it.toFirst(); it.current(); ) { QString tar = it.current()->target; ++it; - if (it.current()) + if (it.current()) t << it.current()->target << ": " << tar << endl; } t << endl; } @@ -856,9 +857,9 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct) for( it.toFirst(); it.current(); ++it) { t << "\n\t ( "; if(!(*it)->directory.isEmpty()) t << "[ -d " << (*it)->directory << " ] && cd " << (*it)->directory << " ; "; - t << "grep \"^qmake_all:\" " << (*it)->makefile + t << "grep \"^qmake_all:\" " << (*it)->makefile << " && $(MAKE) -f " << (*it)->makefile << " qmake_all" << "; ) || true"; } t << endl; t << "clean uninstall install uiclean mocclean: qmake_all FORCE"; @@ -921,9 +922,9 @@ void UnixMakefileGenerator::init2() project->variables()["TARGET_x.y.z"].append("lib" + project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_SHLIB")); if(project->isActiveConfig("lib_version_first")) project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." + - project->first("VER_MAJ") + "." + + project->first("VER_MAJ") + "." + project->first("QMAKE_EXTENSION_SHLIB")); else project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_SHLIB") + @@ -934,12 +935,12 @@ void UnixMakefileGenerator::init2() project->variables()["DEFINES"].append("QT_PLUGIN"); } else if ( os == "hpux" ) { project->variables()["TARGET_"].append("lib" + project->first("TARGET") + ".sl"); if(project->isActiveConfig("lib_version_first")) - project->variables()["TARGET_x"].append("lib" + project->first("VER_MAJ") + "." + + project->variables()["TARGET_x"].append("lib" + project->first("VER_MAJ") + "." + project->first("TARGET")); else - project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." + + project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." + project->first("VER_MAJ")); project->variables()["TARGET"] = project->variables()["TARGET_x"]; } else if ( os == "aix" ) { project->variables()["TARGET_"].append("lib" + project->first("TARGET") + ".a"); |