Skip to contentSkip to conversation

how to known whether a .inc file had been include

DISCUSSION 张忠山 3 participants 4 messages Feb 20, 2019 – Feb 21, 2019

lore
Share & tools
lore

张忠山

author
#0 lore raw

In my recipe, Would include a foo.inc.But if it
had been include in other place, I won't include it duplicated. So howto check whether foo.inc had been include?

#1 lore raw
Quoted 3 lines · 张忠山

In my recipe, Would include a foo.inc.But if it
had been include in other place, I won't include it duplicated. So howto check whether foo.inc had been include?

I haven't ever met such requirement. So instead of trying to figure out how, I'd suggest to take a look at why you have such needs. Maybe you change something else and do not have to do this after that.

Best Regards,
Chen Qi

author
#2 lore raw
Quoted 7 lines · ChenQi
Quoted 3 lines · 张忠山

In my recipe, Would include a foo.inc.But if it
had been include in other place, I won't include it duplicated. So howto check whether foo.inc had been include?

I haven't ever met such requirement. So instead of trying to figure out how, I'd suggest to take a look at why you have such needs. Maybe you change something else and do not have to do this after that.

Dose this means there is no way to known the inclusion status?

#3 lore raw
Quoted 6 lines · 张忠山
Quoted 5 lines · ChenQi
Quoted 3 lines · 张忠山

In my recipe, Would include a foo.inc.But if it
had been include in other place, I won't include it duplicated. So howto check whether foo.inc had been include?

Quoted 6 lines
Quoted 5 lines

I haven't ever met such requirement. So instead of trying to figure out how, I'd suggest to take a look at why you have such needs. Maybe you change something else and do not have to do this after that.

Dose this means there is no way to known the inclusion status?

You can check whether some variable is set, or you can look for the name in the BBINCLUDED variable.

As the previous reply says, its an odd requirement and people don't usually need to do that so it suggests you're trying to do something unusual people don't need to do...

Cheers,

Richard