@@ -32,7 +32,9 @@ export TIME=$(shell LANG=C date --date='@$(TIMESTAMP)' '+%T')
3232
3333kernel_version = @KERNEL_VERSION@
3434configure_realtime_arg = @CONFIGURE_REALTIME_ARG@
35+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
3536enable_build_documentation = @ENABLE_BUILD_DOCUMENTATION@
37+ endif
3638SRCDIR = $(CURDIR ) /src
3739DESTDIR =$(CURDIR ) /debian/tmp
3840DEV_PACKAGE_NAME =@MAIN_PACKAGE_NAME@-dev
@@ -55,18 +57,25 @@ override_dh_auto_build-arch:
5557 dh_auto_build -- build-software
5658
5759override_dh_auto_build-indep :
60+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
5861ifneq "$(enable_build_documentation ) " ""
5962 dh_auto_build -- manpages
6063 dh_auto_build -- translateddocs
6164 dh_auto_build -- docs
6265endif
66+ endif
6367
6468override_dh_auto_clean :
6569 if [ -r src/Makefile.inc -a -r src/config.status ]; then \
6670 dh_auto_clean; \
6771 py3clean . ; \
6872 fi
6973
74+ override_dh_auto_test :
75+ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS ) ) )
76+ dh_auto_test
77+ endif
78+
7079override_dh_auto_install-arch :
7180 # Install all architecture-dependent libraries and executables
7281 # in DESTDIR (the staging dir for the main package).
@@ -79,6 +88,7 @@ override_dh_auto_install-arch:
7988 rm -f $(DESTDIR)/usr/share/doc/@MAIN_PACKAGE_NAME@/examples/sample-configs/*/*position*.txt
8089
8190override_dh_installdocs-arch :
91+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
8292 # Sample configs go in `usr/share/doc/linuxcnc` (not `.../doc/@MAIN_PACKAGE_NAME@`)
8393 # because that's where the `linuxcnc` launcher script looks for them,
8494 # and that's inconvenient to change.
@@ -87,19 +97,21 @@ override_dh_installdocs-arch:
8797 mv debian/@MAIN_PACKAGE_NAME@/usr/share/doc/@MAIN_PACKAGE_NAME@/examples debian/@MAIN_PACKAGE_NAME@/usr/share/doc/linuxcnc
8898
8999 dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=@MAIN_PACKAGE_NAME@-dev
90-
100+ endif
91101
92102override_dh_auto_install-indep :
103+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
93104 DESTDIR=$(DESTDIR) $(MAKE) -C src install-docs install-doc
94105 # Remove the docs we just built that we don't have debs for yet...
95106 rm -f $(DESTDIR)/usr/share/doc/linuxcnc/*_nb.pdf
107+ endif
96108
97109override_dh_installdocs-indep :
110+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
98111 # The G-code quick reference html docs are built as `docs/html/${LANG}/gcode.html`.
99- # We install them into `/usr/share/doc/@MAIN_PACKAGE_NAME@/` in each
100- # linuxcnc-doc-${LANG} package, then rename them there (except
101- # for the English one) to include the language in the filename,
102- # so they don't collide when we install all the doc debs.
112+ # We install them into `/usr/share/doc/@MAIN_PACKAGE_NAME@/` in each # linuxcnc-doc-${LANG} package,
113+ # then rename them there (except for the English one) to include the language in the filename,
114+ # so they do not collide when we install all the doc debs.
103115 #
104116 # Rename the "main" doc directories from
105117 # `usr/share/doc/@MAIN_PACKAGE_NAME@` to `usr/share/doc/linuxcnc`,
@@ -116,8 +128,10 @@ override_dh_installdocs-indep:
116128 $(RM) debian/tmp/usr/share/doc/linuxcnc/LinuxCNC_*_$$l.pdf; \
117129 done
118130 $(RM) debian/tmp/usr/share/doc/linuxcnc/*_es.adoc
119-
120-
131+ else
132+ # Avoiding error message because of examples
133+ $(RM) -fr debian/tmp/usr/share/doc/
134+ endif
121135
122136override_dh_compress :
123137 dh_compress -X.pdf -X.txt -X.hal -X.ini -X.clp -X.var -X.nml -X.tbl -X.xml -Xsample-configs
0 commit comments