aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2022-01-02 10:52:15 +0000
committerr <r@freesoftwareextremist.com>2022-01-02 10:55:26 +0000
commit003233d60da4a2b69260642e57757bba48021ca1 (patch)
tree2d429cdfb05c4473523538aef692f268020b0d40 /Makefile
parent21ef7a66106958bd61534e5d0603b447e6fe306d (diff)
downloadbloat-003233d60da4a2b69260642e57757bba48021ca1.tar.gz
bloat-003233d60da4a2b69260642e57757bba48021ca1.zip
Change config file lookup
- Look for both local and global config file - Directly generate the global config file with make install
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 5 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 4231015..1b32268 100644
--- a/Makefile
+++ b/Makefile
@@ -14,17 +14,11 @@ SRC=main.go \
service/*.go \
util/*.go \
-all: bloat bloat.def.conf
+all: bloat
bloat: $(SRC) $(TMPL)
$(GO) build $(GOFLAGS) -o bloat main.go
-bloat.def.conf:
- sed -e "s%=database%=/var/bloat%g" \
- -e "s%=templates%=$(SHAREPATH)/templates%g" \
- -e "s%=static%=$(SHAREPATH)/static%g" \
- < bloat.conf > bloat.def.conf
-
install: bloat
mkdir -p $(DESTDIR)$(BINPATH) \
$(DESTDIR)$(SHAREPATH)/templates \
@@ -35,6 +29,10 @@ install: bloat
chmod 0644 $(DESTDIR)$(SHAREPATH)/templates/*
cp -r static/* $(DESTDIR)$(SHAREPATH)/static
chmod 0644 $(DESTDIR)$(SHAREPATH)/static/*
+ sed -e "s%=database%=/var/bloat%g" \
+ -e "s%=templates%=$(SHAREPATH)/templates%g" \
+ -e "s%=static%=$(SHAREPATH)/static%g" \
+ < bloat.conf > /etc/bloat.conf
uninstall:
rm -f $(DESTDIR)$(BINPATH)/bloat
@@ -42,4 +40,3 @@ uninstall:
clean:
rm -f bloat
- rm -f bloat.def.conf