#include "misc.h"
#include "objectfile.h"
#include "package.h"
+#include "pkgconfig.h"
#include "sharedlibrary.h"
#include "staticlibrary.h"
#include "systemlibrary.h"
if(help)
{
- usage("builder", false);
+ usage(0, "builder", false);
cout<<'\n';
package_help();
return 0;
delete analyzer;
}
-void Builder::usage(const char *argv0, bool brief)
+void Builder::usage(const char *reason, const char *argv0, bool brief)
{
+ if(reason)
+ cerr<<reason<<'\n';
+
if(brief)
- cerr<<"Usage: "<<argv0<<" [-a|--analyze MODE] [-b|--build] [-c|--clean] [-f|--file FILE] [-h|--help] [-j|--jobs NUM] [-n||--dry-run] [-v|--verbose] [-A|--conf-all] [-B|--build-all] [-C|--chdir DIRECTORY] [-W|--what-if FILE] [--chrome] [--full-paths] [--max-depth NUM] [<target> ...]";
+ cerr<<"Usage: "<<argv0<<" [-a|--analyze MODE] [-b|--build] [-c|--clean] [-f|--file FILE] [-h|--help] [-j|--jobs NUM] [-n||--dry-run] [-v|--verbose] [-A|--conf-all] [-B|--build-all] [-C|--chdir DIRECTORY] [-W|--what-if FILE] [--chrome] [--conf-only] [--full-paths] [--max-depth NUM] [<target> ...]";
else
{
cerr<<
}
}
}
+
+ if(i->second->get_install_flags()&(Package::LIB|Package::INCLUDE))
+ {
+ PkgConfig *pc=new PkgConfig(*this, *i->second);
+ add_target(pc);
+ Install *inst=new Install(*this, *i->second, *pc, (inst_base/"lib"/"pkgconfig"/Path::basename(pc->get_name())).str());
+ add_target(inst);
+ install->add_depend(inst);
+ }
}
// Find dependencies until no new targets are created