Hi.

A trick which usually works is to generate the desired file using
a different filename, then error if the files differ.

The attached diff will give you an idea, but it's untested.
(I failed to see how the code in GNUmakefile is reached from debian/rules)

Thanks.
--- pcp-6.3.7/debian/GNUmakefile        2025-03-27 07:22:34.000000000 +0100
+++ pcp-6.3.7.new/debian/GNUmakefile    2025-04-07 12:57:35.586662524 +0200
@@ -333,27 +333,28 @@
 
 # always remake control from control.* pieces
 #
-.PHONY:        mycontrol
-mycontrol control:
-       ./fixcontrol >control
+# .PHONY:      mycontrol
+mycontrol:
+       ./fixcontrol > mycontrol
 ifeq ($(ENABLE_PYTHON2), true)
-       cat control.python2 >>control
+       cat control.python2 >> mycontrol
 endif
 ifeq ($(ENABLE_PYTHON3), true)
-       cat control.python3 >>control
+       cat control.python3 >> mycontrol
 endif
 ifeq ($(ENABLE_QT), true)
-       cat control.pcpgui >>control
+       cat control.pcpgui >> mycontrol
 endif
 ifeq ($(HAVE_PYTHON_OPENPYXL), true)
-       cat control.pcp2xlsx >>control
+       cat control.pcp2xlsx >> mycontrol
 endif
 ifeq ($(HAVE_PYTHON_PYARROW), true)
-       cat control.pcp2arrow >>control
+       cat control.pcp2arrow >> mycontrol
 endif
 ifeq ($(PMDA_INFINIBAND), true)
-       cat control.pmdaib >>control
+       cat control.pmdaib >> mycontrol
 endif
 ifeq ($(HAVE_PERL), true)
-       cat control.perl >>control
+       cat control.perl >> mycontrol
 endif
+       @cmp -s control mycontrol || (echo error: debian/control needs to be 
updated && false)

Reply via email to