On Mon, 2011-08-22 at 08:25 -0700, Wes Hardaker wrote:
> >>>>> On Sat, 20 Aug 2011 12:52:31 +0200, Magnus Fromreide
> >>>>> <[email protected]> said:
>
> MF> If I want to build with all code that is required or wanted by something
> MF> I have configured then I give configure the flag --enable-minimalist -
> MF> Is this correct?
>
> Yes, but I'd word it differently: "If you want to remove code that isn't
> marked as needed by something else" then add that flag.
>
> MF> --with-out-features=A doesn't seem to trigger the generation of
> MF> features.h so make fails.
>
> Really? I'll have to check into that one. Did you specify
> --enable-minimalist too? I guess if you didn't then the best thing to
> do would be to have --with-out-features imply --enable-minimalist.
>
> MF> --enable-minimalist --with-out-features=A builds A but not AA. I
> MF> expected it to build neither.
>
> I guess that answers my question... Wee need to make it implied.
>
> And that should have worked (IE, A shouldn't have been built). Did you
> watch the configure output? Or look in
> include/net-snmp/feature-details.h which should have showed you why it
> added that component in (IE, what required it; look at the comments).
I think this was down to my requirements being bad. I have now changed
it to
netsnmp_feature_child_of(AA, netsnmp_unused)
netsnmp_feature_child_of(A, AA) /* Yes, AA requires A so A is obviously
a child of AA... */
netsnmp_feature_want(A)
> MF> --with-features=AA --with-out-features=A doesn't seem to trigger the
> MF> generation of features.h so make fails.
>
> Same problem...
>
> MF> --enable-minimalist --with-features=AA --with-out-features=A builds A
> MF> and AA. I expected an error message since the configuration is
> MF> inconsistent.
This case is bad with the new version as well, but when I looked at
feature-remove it seemed inclusion happy.
I think feature-remove should
1. Check if the feature is required on the command line
2. Check if the feature is required by a file
3. Check if the feature is a child of a required feature
4. Check if the feature is wanted by a file
5. Check if the feature is rejected on the command line
Then it all comes down to
if (1 || 2 || 3)
if (5)
ERROR
else
#define FEATURE_HAS
elif (4 && wantwantedfeatures && !5)
#define FEATURE_HAS
else
#define FEATURE_REMOVE
Todays code does
if (1)
#define FEATURE_HAS
elif (2)
if (5)
ERROR
else
#define FEATURE_HAS
elif (4)
if (5)
#define FEATURE_REMOVE
else
#define FEATURE_HAS
elif (3)
#define FEATURE_HAS
else
#define FEATURE_REMOVE
wantwantedfeatures is to ignore want's - kind of like remove every
feature unless it is necessary. That is a new feature i am proposing.
> MF> Is my source file correct?
Apparently it wasn't
> MF> Do --with-out-features work?
>
> You should have gotten errors. I know that I tested those particular
> things.
>
> If everything was in one file,
Yes, everything is in one file.
> I do wonder if that caused the problem.
> The ordering of how things are processed are very important. IE, the
> headers must be processed in careful ordering (and you *can't* run make
> features using a -j flag; parallel feature checks won't work).
I ran them without -j. I only use -j for release testing as that machine
is harder to get to.
> I'm assuming, by the way, you've read this:
>
> http://www.net-snmp.org/wiki/index.php/Feature_Marking_and_Selection
>
Yes, otherwise my questions would have been a lot more basic.
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders