Summary:ASTERISK-15990: [patch] Missing Menuselect Option "Compiler Flags - Development" in dev mode
Reporter:nick_lewis (nick_lewis)Labels:
Date Opened:2010-04-21 05:43:14Date Closed:2011-05-05 18:47:25
Versions:Frequency of
Environment:Attachments:( 0) 20100612__issue17219.diff.txt
( 1) issue_17219.rev1.txt
Description:After changing to dev mode by using

>make clean
>./configure --enable-dev-mode
>make menuselect

it is not possible to access the "Compiler Flags - Development" menu. Instead the "Compiler Flags" menu is presented instead.


The problem can be resolved by typing

>rm menuselect-tree

but I guess this should not be necessary and make clean or the --enable-dev-mode option should do this
Comments:By: Leif Madsen (lmadsen) 2010-04-21 12:19:55

And 'make distclean' doesn't resolve this?

By: nick_lewis (nick_lewis) 2010-04-22 05:56:48

Yes Makefile does rm this for distclean but my understanding is that "make distclean" is for cleaning out files generated by "./configure". The file is created by "make menuselect" so should it not be cleaned out by "make clean" instead?

The problem occurred not when I was attempting to clean anything but when I was just running "./configure" with a different option that changes the setting of ${AST_DEVMODE}. Afterwards when running "make menuselect" the Makefile was not picking up the dependency on ${AST_DEVMODE} and so was skipping the content of "menuselect-tree:" Specifically running "make menuselect-tree" just resulted in the message "menuselect-tree is up to date".

I regret that I do not know the first thing about writing makefiles so I cannot suggest a patch that would add the necessary dependency.

By: Leif Madsen (lmadsen) 2010-04-26 11:40:11

Well 'make clean' to me means just to delete the compiled modules.

I imagine if you ran './configure' in the menuselect subdirectory it may have worked for you. The configure script in the top level directory doesn't trigger the menuselect configure to be re-run.

By: nick_lewis (nick_lewis) 2010-04-27 06:37:04

The 'make clean' does not seem to align with gnu recommendations

Running ./configure in the menuselect subdirectory seems to have no impact on the problem.

I guess that the configure file could be changed after the comment "# Check whether --enable-dev-mode was given." to add "AST_OLDDEVMODE=$AST_DEVMODE" at the start and "if test $AST_OLDDEVMODE != $AST_DEVMODE; then rm menuselect-tree" at the end

By: Leif Madsen (lmadsen) 2010-04-27 11:03:18

Thanks for the feedback! I'll Acknowledge this and see what the other developers have to say.

By: Alec Davis (alecdavis) 2010-06-12 04:08:07

Has caught me out a few times, but getting to know to rm menuselect-tree

I agree with Nick, if ./configure --enable-dev-mode is run, then menuselect-tree should be removed.

By: Tilghman Lesher (tilghman) 2010-06-12 10:52:37

Try this.

By: Alec Davis (alecdavis) 2010-06-12 17:32:42

Tested, for 1.4

./configure --enable-dev-mode
  worked and created development options

But was unable to remove the development options with either of the following style of options.
./configure --disable-dev-mode
./configure --enable-dev-mode=no

By: Russell Bryant (russell) 2010-07-10 10:16:48

Here is a patch for an alternate approach.  It adds an additional dependency in the Makefile so that menuselect-tree will always get regenerated after the configure script is executed.

By: Bradley Watkins (marquis) 2010-12-09 15:54:25.000-0600

This approach seems to work if you are explicitly going from '--enable-dev-mode' or '--enable-dev-mode=yes' to '--enable-dev-mode=no', but it misses the case of omission.  That is, if you simply run './configure' it doesn't remove menuselect-tree and therefore stays in dev mode.  That can be seen as either a feature or a bug, but thought I'd mention it.

By: Digium Subversion (svnbot) 2011-05-05 18:46:55

Repository: asterisk
Revision: 317530

U   branches/1.8/Makefile

r317530 | russell | 2011-05-05 18:46:55 -0500 (Thu, 05 May 2011) | 10 lines

If the configure script runs, force a rebuild of menuselect-tree.

Some contents in the menuselect tree are dependent on configure script
parameters, namely --enable-dev-mode.

(closes issue ASTERISK-15990)
Reported by: Nick_Lewis
     issue_17219.rev1.txt uploaded by russell (license 2)



By: Digium Subversion (svnbot) 2011-05-05 18:47:24

Repository: asterisk
Revision: 317531

_U  trunk/
U   trunk/Makefile

r317531 | russell | 2011-05-05 18:47:24 -0500 (Thu, 05 May 2011) | 17 lines

Merged revisions 317530 via svnmerge from

 r317530 | russell | 2011-05-05 18:46:54 -0500 (Thu, 05 May 2011) | 10 lines
 If the configure script runs, force a rebuild of menuselect-tree.
 Some contents in the menuselect tree are dependent on configure script
 parameters, namely --enable-dev-mode.
 (closes issue ASTERISK-15990)
 Reported by: Nick_Lewis
       issue_17219.rev1.txt uploaded by russell (license 2)