Patchwork [5,of,5,evolve-ext,V2] debian: remove .PHONY line completely

login
register
mail settings
Submitter Faheem Mitha
Date Oct. 10, 2014, 11:07 p.m.
Message ID <86dbbc8b72ca366ac6e6.1412982450@orwell.homelinux.org>
Download mbox | patch
Permalink /patch/6211/
State Accepted
Headers show

Comments

Faheem Mitha - Oct. 10, 2014, 11:07 p.m.
# HG changeset patch
# User Faheem Mitha <faheem@faheem.info>
# Date 1412974641 -19800
#      Sat Oct 11 02:27:21 2014 +0530
# Branch stable
# Node ID 86dbbc8b72ca366ac6e64628764d60d8472545d7
# Parent  ab10d25ff09558cbb60f8d68e19007faf0b0abc6
debian: remove .PHONY line completely

This does not work in the case of implicit pattern matching rules as
used by dh. Consider this example from Geoffrey Thomas:

    $ ls -l
    total 16
    -rw-r--r-- 1 faheem faheem 17 Aug 16 20:27 blue.c
    -rw-r--r-- 1 faheem faheem 17 Aug 16 20:27 green.c
    -rw-r--r-- 1 faheem faheem 35 Aug 16 20:26 Makefile
    -rw-r--r-- 1 faheem faheem 17 Aug 16 20:27 red.c

    $ cat Makefile
    %: %.c
            gcc -o $@ $<
    .PHONY: blue

    $ make red
    gcc -o red red.c

    $ make green
    gcc -o green green.c

    $ make blue
    make: Nothing to be done for blue'.

The Make manual
(http://www.gnu.org/software/make/manual/make.html#Phony-Targets) says

    Since it knows that phony targets do not name actual files that
    could be remade from other files, make skips the implicit rule
    search for phony targets (see Implicit Rules).

Thanks to the good folks on #debian-mentors on OFTC for instruction
and explanation in these matters.
Pierre-Yves David - Oct. 12, 2014, 4:34 a.m.
On 10/10/2014 04:07 PM, Faheem Mitha wrote:
> # HG changeset patch
> # User Faheem Mitha <faheem@faheem.info>
> # Date 1412974641 -19800
> #      Sat Oct 11 02:27:21 2014 +0530
> # Branch stable
> # Node ID 86dbbc8b72ca366ac6e64628764d60d8472545d7
> # Parent  ab10d25ff09558cbb60f8d68e19007faf0b0abc6
> debian: remove .PHONY line completely

series pushed to the main repo, thanks.
Faheem Mitha - Oct. 12, 2014, 1:09 p.m.
On Sat, 11 Oct 2014, Pierre-Yves David wrote:

> On 10/10/2014 04:07 PM, Faheem Mitha wrote:
>> # HG changeset patch
>> # User Faheem Mitha <faheem@faheem.info>
>> # Date 1412974641 -19800
>> #      Sat Oct 11 02:27:21 2014 +0530
>> # Branch stable
>> # Node ID 86dbbc8b72ca366ac6e64628764d60d8472545d7
>> # Parent  ab10d25ff09558cbb60f8d68e19007faf0b0abc6
>> debian: remove .PHONY line completely
>
> series pushed to the main repo, thanks.

Thanks.
                          Regards, Faheem

Patch

diff -r ab10d25ff095 -r 86dbbc8b72ca debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -26,5 +26,3 @@ 
 	rm -rf html
 	rm -f docs/static/logo-evolve.ico
 	rm -f docs/tutorials/tutorial.rst
-
-.PHONY: build clean clean-docs