mirror of
https://github.com/osmarks/ngircd.git
synced 2025-06-28 16:13:06 +00:00
"make uninstall": remove ngircd.conf if not modified
Now "make uninstall" removes the installed "ngircd.conf" file, if it is still equal to our "sample-ngircd.conf" file and therefore hasn't been modified by the user. If it has been modified, it isn't removed and a notice is displayed to the user. In addition, "make install" now displays a message when no ngircd.conf file exists and the "sample-ngircd.conf" file will be installed as a starting point.
This commit is contained in:
parent
160f728530
commit
4cf65b973c
@ -52,8 +52,8 @@ all: $(generated_docs)
|
|||||||
|
|
||||||
install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
|
install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
|
||||||
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
|
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
|
||||||
if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
|
@if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
|
||||||
$(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; \
|
make install-config; \
|
||||||
fi
|
fi
|
||||||
$(mkinstalldirs) $(DESTDIR)$(docdir)
|
$(mkinstalldirs) $(DESTDIR)$(docdir)
|
||||||
for f in $(static_docs) $(toplevel_docs); do \
|
for f in $(static_docs) $(toplevel_docs); do \
|
||||||
@ -63,10 +63,30 @@ install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
|
|||||||
$(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
|
$(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
install-config:
|
||||||
|
$(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf
|
||||||
|
@echo; \
|
||||||
|
echo " ** NOTE: Installed sample configuration file:"; \
|
||||||
|
echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
|
||||||
|
echo
|
||||||
|
|
||||||
uninstall-hook:
|
uninstall-hook:
|
||||||
rm -rf $(DESTDIR)$(docdir)
|
rm -rf $(DESTDIR)$(docdir)
|
||||||
|
@if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
|
||||||
|
make uninstall-config; \
|
||||||
|
else \
|
||||||
|
echo; \
|
||||||
|
echo " ** NOTE: Not uninstalling changed configuration file:"; \
|
||||||
|
echo " ** \"$(DESTDIR)$(sysconfdir)/ngircd.conf\""; \
|
||||||
|
echo; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
uninstall-config:
|
||||||
|
rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
|
||||||
|
|
||||||
srcdoc:
|
srcdoc:
|
||||||
make -C src srcdoc
|
make -C src srcdoc
|
||||||
|
|
||||||
|
.PHONY: install-config uninstall-config srcdoc
|
||||||
|
|
||||||
# -eof-
|
# -eof-
|
||||||
|
Loading…
x
Reference in New Issue
Block a user