@@ -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,24 +88,30 @@ 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 :
82- # Sample configs go in `usr/share/doc/linuxcnc` (not `.../doc/@MAIN_PACKAGE_NAME@`)
83- # because that's where the `linuxcnc` launcher script looks for them,
84- # and that's inconvenient to change.
91+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
92+ # Sample configs go in `usr/share/doc/linuxcnc` (not
93+ # `.../doc/@MAIN_PACKAGE_NAME@`) because that's where the
94+ # `linuxcnc` launcher script looks for them, and that's
95+ # inconvenient to change.
8596 dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=@MAIN_PACKAGE_NAME@
8697 mkdir -p debian/@MAIN_PACKAGE_NAME@/usr/share/doc/linuxcnc
8798 mv debian/@MAIN_PACKAGE_NAME@/usr/share/doc/@MAIN_PACKAGE_NAME@/examples debian/@MAIN_PACKAGE_NAME@/usr/share/doc/linuxcnc
8899
89100 dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=@MAIN_PACKAGE_NAME@-dev
90-
101+ endif
91102
92103override_dh_auto_install-indep :
104+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
93105 DESTDIR=$(DESTDIR) $(MAKE) -C src install-docs install-doc
94106 # Remove the docs we just built that we don't have debs for yet...
95107 rm -f $(DESTDIR)/usr/share/doc/linuxcnc/*_nb.pdf
108+ endif
96109
97110override_dh_installdocs-indep :
98- # 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
111+ ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS ) ) )
112+ # The G-code quick reference html docs are built as
113+ # `docs/html/${LANG}/gcode.html`. We install them
114+ # into `/usr/share/doc/@MAIN_PACKAGE_NAME@/` in each
100115 # linuxcnc-doc-${LANG} package, then rename them there (except
101116 # for the English one) to include the language in the filename,
102117 # so they don't collide when we install all the doc debs.
@@ -116,8 +131,7 @@ override_dh_installdocs-indep:
116131 $(RM) debian/tmp/usr/share/doc/linuxcnc/LinuxCNC_*_$$l.pdf; \
117132 done
118133 $(RM) debian/tmp/usr/share/doc/linuxcnc/*_es.adoc
119-
120-
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