Skip to content

Commit 51d6491

Browse files
committed
override_dh_auto_clean: Perform cleaning only if required
The src/Makefile file has a check of variables at the very beginning and exits by mistake if they are not initialized. That is, if there is no src/Makefile.inc file, then the project configuration was not performed and any other goals were not fulfilled. It is not possible to complete any goal before the initial configuration. This check ensures that the source code is clean and there is no need to clean it.
1 parent 886d8b1 commit 51d6491

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

debian/rules.in

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,10 @@ ifneq "$(enable_build_documentation)" ""
6060
endif
6161

6262
override_dh_auto_clean:
63-
dh_auto_clean
64-
py3clean .
65-
if [ -r src/Makefile.inc -a -r src/config.status ]; then $(MAKE) -C src clean -s; fi
66-
rm -f Makefile.inc
67-
rm -f src/config.log src/config.status
68-
rm -f $(for i in $(find . -name "*.in"); do basename $i .in; done)
69-
dh_clean
70-
63+
if [ -r src/Makefile.inc -a -r src/config.status ]; then \
64+
dh_auto_clean; \
65+
py3clean .; \
66+
fi
7167

7268
override_dh_auto_install-arch:
7369
# Install all architecture-dependent libraries and executables

0 commit comments

Comments
 (0)