cons-discuss
[Top][All Lists]
Advanced

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

Re: pre-post actions ?


From: Steven Knight
Subject: Re: pre-post actions ?
Date: Mon, 17 Dec 2001 09:08:11 -0600 (CST)

> I can get the repository to work fine if I use it from a Construc file. It
> fetches the files (even .h) from the Rep. and all is fine.
> 
> Now, if I want to build the same directory from a higher lever construct,
> the repositiory functionality doesn't work. I get "don't know how to buld
> xxx.c" which is in the repository. What did I do wrong?

There's not enough information here to diagnose the problem.  You need
to provide (at least some of) the configuration you're using, as well
as the actual command line you're trying to build.

> I am missing the possibility to hook on the build process. I lint my files
> after they are compiled.
> Is there an easy way to do a "pre-build" action or a "post-build" action,
> something like:
> 
> $(DST)/%_arm.o : %.c
>       $(ECHO_COLOR) blue on_white ----- Compiling c   $<
>       $(CC) $(RELEASE_FLAG) $(CFLAGS) -c $< -o $@
>       @$(LINT) -os\(${DST}/$<_lint.txt\) $(LINTFLAGS) $<
>       @perl /iris/rtos/bin/lint/lint_post.pl ${DST}/$<_lint.txt

Redefine the CCCOM construction variable.  The modern way to do this
would be as an array reference for the separate commands:

        $env = new cons(CCCOM =>
                ["%ECHO_COLOR blue on white ----- Compiling c   %<",
                 "%CC %CFLAGS %_IFLAGS -c %< -o %>",
                 "@%LINT -os\(%DST/%<_lint.txt\) %LINTFLAGS %<",
                 "@perl /iris/rtos/bin/lint/lint_post.pl %DST/%<_lint.txt"],
                 LINT => 'lint',
                 LINTFLAGS => '',
                 DST => '/appopriate/directory',
                 ECHO_COLOR => '');

(Modulo errors I introduced by typing the above off the top of my head.)

You can also make the command list one string with newlines separating
the individual commands.

        --SK




reply via email to

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