docs: add faq about make and console

This commit is contained in:
bookug 2018-10-26 22:35:03 +08:00
parent 96ff1c74ce
commit 6e31142fc8
4 changed files with 83 additions and 6 deletions

52
.gitattributes vendored Normal file
View File

@ -0,0 +1,52 @@
# https://git-scm.com/docs/gitattributes
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
*.txt text
*.vcproj text eol=crlf
*.sh text eol=lf
*.py eol=lf
*.c text eol=lf
*.h text eol=lf
*.cpp text eol=lf
*.cu text eol=lf
*.md text eol=lf
*.nt text eol=lf
*.sql text eol=lf
#*.jpg -text
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
#*.c text
#*.h text
*.md text
*.js text
*.json text
*.wxss text
*.wxml text
# Declare files that will always have CRLF line endings on checkout.
#*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
# Below denotes which file to use git-lfs, large files
#*.zip filter=lfs diff=lfs merge=lfs -text
#*.tar.gz filter=lfs diff=lfs merge=lfs -text
#*.7z filter=lfs diff=lfs merge=lfs -text
#*.rar filter=lfs diff=lfs merge=lfs -text
#*.torrent filter=lfs diff=lfs merge=lfs -text
#*.iso filter=lfs diff=lfs merge=lfs -text
#*.jpg filter=lfs diff=lfs merge=lfs -text
#*.jpeg filter=lfs diff=lfs merge=lfs -text
#*.png filter=lfs diff=lfs merge=lfs -text
#*.pdf filter=lfs diff=lfs merge=lfs -text
#*.mp3 filter=lfs diff=lfs merge=lfs -text
#*.wav filter=lfs diff=lfs merge=lfs -text
#*.mp4 filter=lfs diff=lfs merge=lfs -text
#*.rmvb filter=lfs diff=lfs merge=lfs -text
#*.nt filter=lfs diff=lfs merge=lfs -text
#*.n3 filter=lfs diff=lfs merge=lfs -text

View File

@ -1,3 +1,26 @@
#### How can I redirect the output to disk files from the console, even the content is output from stderr?
You can redirect the output of the whole console and use `tail -f` to see the immediate updates to the disk file.
For example, if you are using `gquery` console, you can do it in the way below:
```
In one terminal, named x
bin/gquery ${YOUR_DATABASE} >& log.txt
type console commands in terminal x
In another terminal y
tail -f log.txt
```
---
#### Why can not I run correctly after `make` again, even the new code has fixed bugs or added new features?
Sometimes file dependency is not complete, and some objects are not re-compiled in practice.
In this case you are advised to run `make clean` first, and then run `make`.
---
#### When I use the newer gStore system to query the original database, why error?
The database produced by gStore contains several indexes, whose structures may have been chnaged in the new gStore version. So, please rebuild your dataset just in case.

View File

@ -90,6 +90,8 @@ Notice:
- path completion is supported for utility. (not built-in command completion)
- To ouput the result to disk files, use `sparql ${YOUR_QUERY} > ${YOUR_FILE}` in the console.
- - -
#### 3. ghttp

View File

@ -40,11 +40,11 @@ CC = g++
#NOTICE: -O2 is recommended, while -O3(add loop-unroll and inline-function) is dangerous
#when developing, not use -O because it will disturb the normal
#routine. use it for test and release.
CFLAGS = -c -Wall -O2 -pthread -std=c++11
EXEFLAG = -O2 -pthread -std=c++11
#CFLAGS = -c -Wall -O2 -pthread -std=c++11
#EXEFLAG = -O2 -pthread -std=c++11
#-coverage
#CFLAGS = -c -Wall -pthread -g -std=c++11 -pg
#EXEFLAG = -pthread -g -std=c++11 -pg
CFLAGS = -c -Wall -pthread -g -std=c++11 -pg
EXEFLAG = -pthread -g -std=c++11 -pg
#add -lreadline [-ltermcap] if using readline or objs contain readline
library = -lreadline -L./lib -L/usr/local/lib -lantlr -lgcov -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread -I/usr/local/include/boost -lcurl
@ -516,7 +516,7 @@ $(api_java):
.PHONY: clean dist tarball api_example gtest sumlines contribution test
test:
test: $(TARGET)
@echo "basic build/query/add/sub test"
@bash scripts/basic_test.sh
@echo "repeatedly insertion/deletion test"
@ -537,8 +537,8 @@ clean:
rm -rf bin/*.class
rm -rf bin/update_test
#rm -rf .project .cproject .settings just for eclipse
#rm -rf cscope* just for vim
rm -rf logs/*.log
rm -rf *.out # gmon.out for gprof with -pg
dist: clean
rm -rf *.nt *.n3 .debug/*.log .tmp/*.dat *.txt *.db