Package: cups-filters Version: 1.0.4-1 Severity: normal Tags: patch upstream
Hi, currently, 'make clean' -- if run from the top-level source directory -- does not entirely clean the source tree but leaves some object files in the filter/fontembed and pdftoopvp/oprs sub-directories around. This is especially frustrating if you are trying to build the Debian package twice in a row, as dpkg-source will complain about untrackable differences in the source tree. The attached patch adds calls to the clean rules in these sub-directories to the Makefiles in the containing directories. Furthermore, the Makedefs file is on the one hand removed in the distclean rule but on the other hand unconditionally included in all the Makefiles. This makes it imposible to e.g. run the clean rule twice in a row. I have therefore included a conditional to only include Makedefs if Make is *not* run for any of the clean rules. Since each Makefile in the sub-directories also includes Makedefs, I decided to merely touch it in the clean rule of the top-level Makefile. So 'make clean' is at least idempotent if run from the top-level Makefile. - Fabian -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (901, 'testing'), (501, 'unstable'), (101, 'experimental') Architecture: i386 (i686) Kernel: Linux 3.2.0-1-686-pae (SMP w/1 CPU core) Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
--- cups-filters-1.0.4.orig/Makefile +++ cups-filters-1.0.4/Makefile @@ -13,7 +13,9 @@ # file is missing or damaged, see the license at "http://www.cups.org/". # +ifeq ($(findstring $(MAKECMDGOALS), clean distclean maintainer-clean),) include Makedefs +endif # @@ -44,6 +46,7 @@ all: # clean: + touch Makedefs for dir in $(DIRS); do\ echo Cleaning in $$dir... ;\ (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\ --- cups-filters-1.0.4.orig/filter/Makefile +++ cups-filters-1.0.4/filter/Makefile @@ -101,6 +101,7 @@ all: $(TARGETS) # clean: + $(MAKE) -C fontembed $@ $(RM) $(OBJS) $(TARGETS) $(RM) */*.d $(RM) */*.o --- cups-filters-1.0.4.orig/pdftoopvp/Makefile +++ cups-filters-1.0.4/pdftoopvp/Makefile @@ -39,6 +39,7 @@ framedhelp: # clean: + $(MAKE) -C oprs $@ $(RM) $(OBJS) $(RM) pdftoopvp