aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorꙮ <ymir@ulthar.xyz>2024-04-11 19:36:03 -0700
committerrodarima <rodarima@gmail.com>2024-05-08 21:46:17 +0200
commit7e75090122fdee07aa9d443c8f6982839d68c0ed (patch)
treed6a534596480fc1602cf0a78668f03b8754b3ebc /Makefile
parentac3412cbccaa1320ffc939c415bdacbe549e8c70 (diff)
Fix makefile to seek out config file
Installing dillo from source with the default prefix of /usr/local/ or installing it from ports on FreeBSD puts the config files in /usr/local/etc/ rather than /etc/
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index dab2b10..51036ae 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,10 @@ all:
@echo "Use 'make uninstall' to uninstall"
$(DPIDRC):
- cp /etc/dillo/dpidrc $@
+ mkdir -p $(DPI_DIR)
+ if [ -f /etc/dillo/dpidrc ]; then cp /etc/dillo/dpidrc $@; \
+ elif [ -f /usr/local/etc/dillo/dpidrc ]; then cp /usr/local/etc/dillo/dpidrc $@; \
+ else echo "Can't find dpidrc, is dillo installed?"; false; fi
install-proto: $(DPIDRC)
grep -q '^proto.$(NAME)=$(NAME)' $< || echo 'proto.$(NAME)=$(NAME)/$(BIN)' >> $<