[asterisk-dev] [Code Review]: Clean up Makefile "warning" clutter when makeopts doesn't exist
Jason Parker
reviewboard at asterisk.org
Wed Jan 30 10:48:39 CST 2013
> On Jan. 30, 2013, 10:35 a.m., David Lee wrote:
> > What do you think about putting the defaults in build_tools/make_version itself? That would have the added bonus of making it easier to run the script from the command line.
>
> wdoekes wrote:
> That would only fix the make_version problem. The other $(shell ...) stuff would still have issues.
>
> I can certainly add defaults to make_version *as* *well* if you like.
The ASTERISKVERSION/ASTERISKVERSIONNUM case is easy enough - just create a .tmpversion file and include it within the Makefile. If it doesn't exist, we don't continue (it's not needed for most operations, and it would let us fail with a useful error, rather than "Illegal option -").
The slightly trickier case is the grep for documentation. It adds all .c files that contain XML documentation, to the dependency list for the .xml files, so that if any of those files change, the docs get regenerated. It seems like this could be architected a little differently, and be avoided altogether.
- Jason
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2304/#review7774
-----------------------------------------------------------
On Jan. 30, 2013, 4:24 a.m., wdoekes wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2304/
> -----------------------------------------------------------
>
> (Updated Jan. 30, 2013, 4:24 a.m.)
>
>
> Review request for Asterisk Developers and Jason Parker.
>
>
> Summary
> -------
>
> When there is no makeopts (distclean removes it), we get ugly errors when running make.
>
> $ make
> build_tools/make_version: 183: URL: not found
> build_tools/make_version: 183: {print $2;}: not found
> svn: Write error: Broken pipe
> /bin/sh: Illegal option -
> /bin/sh: Illegal option -
> ...
> ****
> **** The configure script must be executed before running 'make'.
> **** Please run "./configure".
> ****
>
> Those ugly errors can be avoided in the majority of case by providing defaults for AWK and GREP. That's what this patch does.
>
> This means that you can now run make distclean twice and get output without ugly errors.
>
>
> P.S. @admins: https://reviewboard.asterisk.org/r/2303/ yields a Django error and is uneditable because I accidentally called qwell "Jason Parker".
>
>
> Diffs
> -----
>
> /trunk/Makefile 380448
>
> Diff: https://reviewboard.asterisk.org/r/2304/diff
>
>
> Testing
> -------
>
> It works if awk en grep are in your path. If they aren't, the errors will at least be more readable (missing grep instead of "Illegal option").
>
> AWK and GREP will still get overridden by makeopts if it exists, so no loss of functionality there.
>
>
> Thanks,
>
> wdoekes
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130130/83e55f43/attachment.htm>
More information about the asterisk-dev
mailing list