Re: When to use a leading underscore?

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

 



Or maybe for historical reasons ?
http://www.rpm.org/wiki/PackagerDocs/Macros#ConfigurationusingMacros

If you find the right answer, please let me know, I'm interested too.


On Mon, Sep 3, 2012 at 10:47 AM, indent man <indentman@xxxxxxxxx> wrote:
You can take a look at top comment in /usr/lib/rpm/macros
Not sure what it means, however :)

Cheers


On Fri, Aug 31, 2012 at 11:33 PM, Björn Persson <bjorn@xxxxxxxxxxxxxxxxxxxx> wrote:
As maintainer of fedora-gnat-project-common I sometimes work on RPM macros for
use in Ada packages. Every time I define a new macro I have trouble deciding
whether its name should begin with an underscore or not. I know that there is
some technical difference but I've never quite understood what practical
difference it makes.

I've been trying to imitate macros with a similar function, so I defined
_GNAT_project_dir with a leading underscore in analogy with _libdir and
others. Macros containing command line flags for build tools I've defined
without a leading underscore in analogy with optflags, but then there are
_smp_mflags and the hardening macros which have the underscore, and
__global_cflags and __global_ldflags even have two leading underscores.

Could someone explain what difference a leading underscore makes and give some
guidance on when I should use it?

Is a double leading underscore functionally different from a single one, or is
that just some kind of naming convention?

Björn Persson

--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging


--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux