bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make: ordering of dependencies


From: nobrowser
Subject: make: ordering of dependencies
Date: Sun, 20 Jul 2008 13:05:24 -0700 (PDT)
User-agent: G2/1.0

Until today, I thought that make guarantees that dependencies in a
rule are updated in the order they're listed in the makefile, unless
in parallel mode (i.e. without -jN).  There are awfully many makefiles
out there which are written to depend on that, even if it's a bad idea
in general.

But today, because @&*$# Firefox/Iceweasel decided to start storing
bookmarks in a binary file like any *&#% Windoze program, I tried
this:

SHELL = /bin/bash

local-mirror = ~/mirror/
remote-mirror = my.shell.server:~/mirror/
local-pics = ~/pictures-of-everything/
remote-pics = my.shell.server:~/www/pictures-of-everything/

get-%: do-get-% post-get-%
        @true

do-get-%:
        rsync -avu --delete $(remote-$*) $(local-$*)

post-get-%:
        @true

put-%: pre-put-% do-put-%
        @true

do-put-%:
        rsync -avu --delete $(local-$*) $(remote-$*)

pre-put-%:
        @true

sync-%:
        @get-$* put-$*

pre-put-mirror:
        for f in key3.db signons3.txt bookmarks.html .tdldb .reminders ; do \
         gpg-encrypt.sh $$f mirror/.secure/$$f.gpg ;\
        done

post-get-mirror:
        for f in key3.db signons3.txt bookmarks.html .tdldb .reminders ; do \
         gpg-decrypt.sh mirror/.secure/$$f.gpg $$f ;\
        done


When I do "make get-mirror", the gpg-decrypt.sh loop runs first, then
the rsync.  That is, post-get-mirror is updated first, then do-get-
mirror.  Same behavior even if I explicitly say make -j1.

wtf?  Bug, Feature, or User Error?

(debian packaged make 3.81-5)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]