aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorNunoSempere <nuno.sempere@protonmail.com>2023-03-28 22:07:25 -0600
committerNunoSempere <nuno.sempere@protonmail.com>2023-03-28 22:07:25 -0600
commitb49a808739c12a220e8f90cc3ea928cd914489cf (patch)
tree438379520898ef4083db9162e7e375063d93b24e /makefile
parentfc9cc675386cf30891fc87ebcdd35574c6f36b5f (diff)
feat: makefile handles git and cache paths
Diffstat (limited to 'makefile')
-rw-r--r--makefile21
1 files changed, 20 insertions, 1 deletions
diff --git a/makefile b/makefile
index ec755d5..520a734 100644
--- a/makefile
+++ b/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)
-