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

Re: CDBS and dh_install



On 13 Jun 2006, George Danchev said:

> On Saturday 10 June 2006 15:57, Marc Dequènes wrote:
> --cut--
>> Until this is solved, i'm still maintaining my original version,
>> since more people use it than the one in the package, but this is
>> not an ideal situation.
>
> Ok, time to ask a real question about cdbs ;-) I assume you are
> pretty much familiar with it and its strengths and weaknesses, hence
> my little problem follows:
>
> my debian/rules (in which I have my self-written target, no it is
> not supported by cdbs yet)

        I do not think your make file does what you think it does. It
 replaces, instead of enhancing, the single colon rule that CDBS
 uses.  

> * what couses that, and how to escape that annoying warn ?


common-configure-arch common-configure-indep:: myowntarget

myowntarget:
        ./configure --prefix=/usr
        touch debian/stamp-autotools-files

> * where is that described in cdbs official or unofficial docs ?

        Err, if you look at the warning, you see where it comes
 from. Looking at the target, you can see  that
 debian/stamp-autotools-files is a double colon dependency of  targets
 common-configure-arch and common-configure-indep. So, it is simple as
 to how one introduces the additional commands ...

> Thanks. Excuse moa if I failed to see the obvious ;-)

        There is a difference between double colon dependencies and
 single colon dependencies. You'll be well served to know the
 difference.

        manoj

======================================================================
One file can be the target of several rules.  All the prerequisites
mentioned in all the rules are merged into one list of prerequisites for
the target.  If the target is older than any prerequisite from any rule,
the commands are executed.

   There can only be one set of commands to be executed for a file.  If
more than one rule gives commands for the same file, `make' uses the
last set given and prints an error message.  (As a special case, if the
file's name begins with a dot, no error message is printed.  This odd
behavior is only for compatibility with other implementations of
`make'... you should avoid using it).  Occasionally it is useful to
have the same target invoke multiple commands which are defined in
different parts of your makefile; you can use "double-colon rules"
(*note Double-Colon::) for this.


"Double-colon" rules are rules written with `::' instead of `:' after
the target names.  They are handled differently from ordinary rules
when the same target appears in more than one rule.

   When a target appears in multiple rules, all the rules must be the
same type: all ordinary, or all double-colon.  If they are
double-colon, each of them is independent of the others.  Each
double-colon rule's commands are executed if the target is older than
any prerequisites of that rule.  If there are no prerequisites for that
rule, its commands are always executed (even if the target already
exists).  This can result in executing none, any, or all of the
double-colon rules.

   Double-colon rules with the same target are in fact completely
separate from one another.  Each double-colon rule is processed
individually, just as rules with different targets are processed.

   The double-colon rules for a target are executed in the order they
appear in the makefile.  However, the cases where double-colon rules
really make sense are those where the order of executing the commands
would not matter.

======================================================================

-- 
You will get what you deserve.
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: