mirror of
https://github.com/libAthena/athena.git
synced 2025-07-07 21:55:54 +00:00
more build system tweaks
This commit is contained in:
parent
2bb60ab152
commit
96ed8a2ce2
2
PKGBUILD
2
PKGBUILD
@ -19,7 +19,7 @@ pkgver() {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/$_pkgname"
|
cd "$srcdir/$_pkgname"
|
||||||
qmake && make
|
qmake PREFIX="$pkgdir/usr" && make
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# PKGBUILD for atdna
|
# PKGBUILD for atdna
|
||||||
_pkgname=atdna
|
_pkgname=atdna
|
||||||
pkgname=$_pkgname-git
|
pkgname=$_pkgname-git
|
||||||
pkgver=1.1.0.17.gfb722a9
|
pkgver=1.1.0.18.g2bb60ab
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Companion DNA utility for libAthena"
|
pkgdesc="Companion DNA utility for libAthena"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
@ -20,7 +20,7 @@ pkgver() {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/$_pkgname/atdna"
|
cd "$srcdir/$_pkgname/atdna"
|
||||||
qmake && make
|
qmake PREFIX="$pkgdir/usr" && make
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
@ -71,3 +71,6 @@ win32 {
|
|||||||
utilFiles.files = $$OUT_PWD/atdna
|
utilFiles.files = $$OUT_PWD/atdna
|
||||||
INSTALLS += utilFiles
|
INSTALLS += utilFiles
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINES += SYSTEM_PREFIX="$$PREFIX"
|
||||||
|
|
||||||
|
@ -11,6 +11,13 @@
|
|||||||
#include "llvm/Support/Format.h"
|
#include "llvm/Support/Format.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
|
|
||||||
|
#ifndef SYSTEM_PREFIX
|
||||||
|
#define SYSTEM_PREFIX /usr/local
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define XSTR(s) STR(s)
|
||||||
|
#define STR(s) #s
|
||||||
|
|
||||||
static llvm::cl::opt<bool> Help("h", llvm::cl::desc("Alias for -help"), llvm::cl::Hidden);
|
static llvm::cl::opt<bool> Help("h", llvm::cl::desc("Alias for -help"), llvm::cl::Hidden);
|
||||||
|
|
||||||
static llvm::cl::OptionCategory ATDNAFormatCategory("atdna options");
|
static llvm::cl::OptionCategory ATDNAFormatCategory("atdna options");
|
||||||
@ -435,19 +442,12 @@ int main(int argc, const char** argv)
|
|||||||
std::vector<std::string> args = {"clang-tool",
|
std::vector<std::string> args = {"clang-tool",
|
||||||
"-fsyntax-only",
|
"-fsyntax-only",
|
||||||
"-std=c++11"};
|
"-std=c++11"};
|
||||||
|
args.push_back("-I" + std::string(XSTR(SYSTEM_PREFIX)) + "/lib/clang/" + CLANG_VERSION_STRING + "/include");
|
||||||
llvm::IntrusiveRefCntPtr<clang::FileManager> fman(new clang::FileManager(clang::FileSystemOptions()));
|
llvm::outs() << args.back() << "\n";
|
||||||
const clang::FileEntry* selfEntry = fman->getFile(argv[0]);
|
|
||||||
if (selfEntry && selfEntry->isValid())
|
|
||||||
{
|
|
||||||
std::string base(selfEntry->getDir()->getName());
|
|
||||||
args.push_back("-I" + base + "/clang/" + CLANG_VERSION_STRING + "/include");
|
|
||||||
args.push_back("-I" + base);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int a=1 ; a<argc ; ++a)
|
for (int a=1 ; a<argc ; ++a)
|
||||||
args.push_back(argv[a]);
|
args.push_back(argv[a]);
|
||||||
|
|
||||||
|
llvm::IntrusiveRefCntPtr<clang::FileManager> fman(new clang::FileManager(clang::FileSystemOptions()));
|
||||||
clang::tooling::ToolInvocation TI(args, new ATDNAAction, fman.get());
|
clang::tooling::ToolInvocation TI(args, new ATDNAAction, fman.get());
|
||||||
if (TI.run())
|
if (TI.run())
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user