aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2020-03-23 21:03:03 +0000
committerbloodstalker <thabogre@gmail.com>2020-03-23 21:03:03 +0000
commitca68569f80e97b951612ec849462b15b75310922 (patch)
tree9b47077d4fac9ddc66d9c0977cc64a1931e3366d
parentupdate (diff)
downloadcgrep-ca68569f80e97b951612ec849462b15b75310922.tar.gz
cgrep-ca68569f80e97b951612ec849462b15b75310922.zip
update
Diffstat (limited to '')
-rw-r--r--README.md2
-rw-r--r--cgrep.cpp4
-rw-r--r--makefile3
3 files changed, 6 insertions, 3 deletions
diff --git a/README.md b/README.md
index b09bb20..425033b 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,8 @@ git submodule update
make
```
+After the build is finished you can choose to run `make install`. It will simply symlink cgrep into `/usr/local/bin`.
+
If you have installed LLVM but don't have `llvm-config`, you are missing the dev package for LLVM.
`cgrep` supports LLVM 5,6,7,8 and 9. For 10 the latest tested trunk version is: 374971.
The makefile assumes clang is called `clang` and llvm-config is called `llvm-config`. On some distros, the names might not be the same. In those cases use `CXX` and `LLVM_CONF` to pass the values to the makefile like so:
diff --git a/cgrep.cpp b/cgrep.cpp
index b359aa7..7b2c5c2 100644
--- a/cgrep.cpp
+++ b/cgrep.cpp
@@ -869,11 +869,9 @@ private:
/*Main*/
int main(int argc, const char **argv) {
CommonOptionsParser op(argc, argv, CGrepCat);
- const std::vector<std::string> &SourcePathList [[maybe_unused]] =
- op.getSourcePathList();
ClangTool Tool(op.getCompilations(), op.getSourcePathList());
int ret = Tool.run(newFrontendActionFactory<AppFrontendAction>().get());
-#if 1
+#if 0
listDirs(CO_RECURSIVE);
#endif
return ret;
diff --git a/makefile b/makefile
index f149ec7..e5f241a 100644
--- a/makefile
+++ b/makefile
@@ -175,6 +175,9 @@ valgrind: $(TARGET)
format:
- clang-format -i $(SRCS) $(HDRS)
+install: $(TARGET)
+ ln -s ./$(TARGET) /usr/local/bin/
+
clean:
rm -f *.o *.dis *.odbg *.ocov *~ $(TARGET) $(TARGET).so $(TARGET)-static $(TARGET)-dbg $(TARGET).a $(TARGET)-cov