@@ -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
8393 # `.../doc/@MAIN_PACKAGE_NAME@`) because that's where the
8494 # `linuxcnc` launcher script looks for them, and that's
@@ -88,14 +98,18 @@ override_dh_installdocs-arch:
8898 mv debian/@MAIN_PACKAGE_NAME@/usr/share/doc/@MAIN_PACKAGE_NAME@/examples debian/@MAIN_PACKAGE_NAME@/usr/share/doc/linuxcnc
8999
90100 dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=@MAIN_PACKAGE_NAME@-dev
101+ endif
91102
92103
93104override_dh_auto_install-indep :
105+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
94106 DESTDIR=$(DESTDIR) $(MAKE) -C src install-docs install-doc
95107 # Remove the docs we just built that we don't have debs for yet...
96108 rm -f $(DESTDIR)/usr/share/doc/linuxcnc/*_nb.pdf
109+ endif
97110
98111override_dh_installdocs-indep :
112+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
99113 # The G-code quick reference html docs are built as
100114 # `docs/html/${LANG}/gcode.html`. We install them
101115 # into `/usr/share/doc/@MAIN_PACKAGE_NAME@/` in each
@@ -124,6 +138,7 @@ override_dh_installdocs-indep:
124138 dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-zh-cn
125139 mv debian/linuxcnc-doc-zh-cn/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode.html debian/linuxcnc-doc-zh-cn/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode_zh_CN.html
126140 mv debian/linuxcnc-doc-zh-cn/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-zh-cn/usr/share/doc/linuxcnc
141+ endif
127142
128143
129144override_dh_compress :
0 commit comments