Let the uninstall target remove the config file if DESTDIR is set
authorFabian Keil <fk@fabiankeil.de>
Tue, 26 Jan 2021 06:29:37 +0000 (07:29 +0100)
committerFabian Keil <fk@fabiankeil.de>
Tue, 26 Jan 2021 06:46:32 +0000 (07:46 +0100)
... and properly announce the deletion of the configuration files.

Apparently I broke this in 2008 (cc77d4eec4).

GNUmakefile.in

index c1e4931..e5fdc64 100644 (file)
@@ -1039,8 +1039,8 @@ uninstall: CONF_DEST LOG_DEST PID_DEST check_doc
                done ;\
        fi
        @$(ECHO) Removing $(PROGRAM) config files
-       -@for i in $(DESTDIR)$(CONFIGS); do \
-               test -f $(CONF_DEST)/$$i && $(ECHO) Removing $$i ;\
+       -@for i in $(CONFIGS); do \
+               test -f $(DESTDIR)$(CONF_DEST)/$$i && $(ECHO) Removing $$i ;\
                $(RM) $(DESTDIR)$(CONF_DEST)/$$i $(DESTDIR)$(CONF_DEST)/$$i~ $(DESTDIR)$(CONF_DEST)/$$i.new ;\
        done
        -@test -d $(DESTDIR)$(CONF_DEST)/templates && $(RM) -r $(DESTDIR)$(CONF_DEST)/templates &&\