return;
}
+#ifndef _WIN32
// Preserve file permissions
struct stat st;
if(stat(src_path.str().c_str(), &st)==0)
FS::unlink(link);
symlink(relpath.str().c_str(), link.str().c_str());
}
+#endif
status = Task::SUCCESS;
}
#include <cstdlib>
#include <unistd.h>
-#include <sys/wait.h>
#include <msp/fs/dir.h>
#include <msp/io/console.h>
#include <msp/io/file.h>
if(stdin_action==IGNORE || stdout_action==IGNORE || stderr_action==IGNORE)
{
+#ifdef _WIN32
+ devnull = new IO::File("nul", IO::M_RDWR);
+#else
devnull = new IO::File("/dev/null", IO::M_RDWR);
+#endif
if(stdin_action==IGNORE)
process->redirect_cin(*devnull);
if(stdout_action==IGNORE)
string PackageManager::run_pkgconfig(const string &pkg, const string &what)
{
+#ifndef _WIN32
if(!env_set)
{
const FS::Path &prefix = builder.get_prefix();
builder.get_logger().log("auxcommands", format("Running %s", join(argv.begin(), argv.end())));
return ExternalTask::run_and_capture_output(argv);
+#else
+ (void)pkg;
+ (void)what;
+ return string();
+#endif
}
FS::Path PackageManager::get_package_location(const string &name)
for(ComponentList::iterator i=components.begin(); i!=components.end(); ++i)
(*i)->create_targets();
+ const Architecture &arch = builder.get_native_arch();
if(!export_binfo.libs.empty())
{
export_binfo.incpath.push_back((builder.get_prefix()/"include").str());
export_binfo.libpath.push_back((builder.get_prefix()/"lib").str());
- PkgConfigFile *pc = new PkgConfigFile(builder, *this);
- builder.get_build_graph().get_target("install")->add_dependency(*builder.get_toolchain().get_tool("CP").create_target(*pc));
+ if(arch.get_system()=="linux")
+ {
+ PkgConfigFile *pc = new PkgConfigFile(builder, *this);
+ builder.get_build_graph().get_target("install")->add_dependency(*builder.get_toolchain().get_tool("CP").create_target(*pc));
+ }
}
}