feat: makefile handles git and cache paths
This commit is contained in:
parent
fc9cc67538
commit
b49a808739
21
makefile
21
makefile
|
@ -43,7 +43,25 @@ STYLE_BLUEPRINT=webkit
|
|||
FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT)
|
||||
## Commands
|
||||
|
||||
## Hardcoded paths
|
||||
## Cache
|
||||
USER=`whoami`
|
||||
DEFAULT_CACHE_DIR=/home/loki/.cache/rose
|
||||
CURRENT_CACHE_DIR=/home/$(USER)/.cache/rose
|
||||
## dir
|
||||
DEFAULT_DIR='/home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot'
|
||||
CURRENT_DIR=`pwd`
|
||||
|
||||
build: $(SRC) $(PLUGS) $(CONFIG)
|
||||
# Make cache
|
||||
mkdir -p $(CURRENT_CACHE_DIR)
|
||||
# Hardcode cache path
|
||||
find $(CURRENT_DIR) -type f -not -path "*.git*" -not -path "*makefile*" -exec \
|
||||
sed -i "s|$(DEFAULT_CACHE_DIR)|$(CURRENT_CACHE_DIR)|g" {} +
|
||||
# Hardcode git repository path
|
||||
find $(CURRENT_DIR) -type f -not -path "*.git*" -not -path "*makefile*" -exec \
|
||||
sed -i "s|$(DEFAULT_DIR)|$(CURRENT_DIR)|g" {} +
|
||||
# Compile rosenrot
|
||||
$(CC) $(DEBUG) $(INCS) $(PLUGS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
|
||||
|
||||
install: rose
|
||||
|
@ -56,11 +74,12 @@ uninstall:
|
|||
rm -r /usr/share/themes/rose
|
||||
rm /usr/bin/rose
|
||||
rm /usr/bin/rose-mklink
|
||||
rm $(CACHE_DIR)
|
||||
|
||||
clean:
|
||||
rm rose
|
||||
rm $(CACHE_DIR)
|
||||
|
||||
format: $(SRC) $(PLUGS)
|
||||
$(FORMATTER) $(SRC) $(PLUGS)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user