Author: Sergei Golovan
Description: Patch fixes installing directories and copying files under
    DESTDIR. Also, it fixes clean distclean targets, which is not
    strictly necessary, because debian/rules builds the packages
    in subdirectories of debian/ instead of the main source directory.
Last-Modified: Sat, 17 May 2025 21:56:04 +0300
Forwarded: yes
Bug: https://sourceforge.net/p/blt/patches/38/

--- a/Makefile.in
+++ b/Makefile.in
@@ -50,7 +50,7 @@
 	for i in $(subdirs); do \
 	   $(MAKE) -C $$i install || exit 1 ; \
 	done
-	$(INSTALL) bltConfig.sh $(libdir)
+	$(INSTALL) bltConfig.sh $(DESTDIR)$(libdir)
 
 clean:
 	for i in $(subdirs); do \
@@ -62,4 +62,7 @@
 	config.status config.cache config.log Makefile 
 
 distclean: clean
+	for i in $(subdirs); do \
+	   $(MAKE) -C $$i distclean || exit 1 ; \
+	done
 	$(RM) $(GENERATED_FILES)
--- a/library/palettes/Makefile.in
+++ b/library/palettes/Makefile.in
@@ -285,7 +285,7 @@
 install:
 	$(MKDIR_P) $(DESTDIR)$(destdir)
 	for i in $(FILES) ; do \
-	    $(INSTALL_DATA) $(srcdir)/$$i $(destdir); \
+	    $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(destdir); \
 	done 
 
 clean:
