coding style: "obj-y" versus "obj-$(CONFIG_FOO)"?

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

 



  a bit more pedantry ... in init/Makefile, i see this test:

    ifneq ($(CONFIG_BLK_DEV_INITRD),y)
    obj-y                          += noinitramfs.o
    else
    obj-$(CONFIG_BLK_DEV_INITRD)   += initramfs.o
    endif

which is perfectly correct, but since BLK_DEV_INITRD is defined as a
boolean, it can be assigned only yes or no, so is there any reason
that second assignment wasn't written simply as:

    obj-y                          += initramfs.o

  sure, it's picky, but whenever i see Makefile content of the form:

    obj-$(CONFIG_FOO)

i take into account that that could be a tristate setting. if it
isn't, it just makes more sense aesthetically to me to use "obj-y" for
clarity.

  is there a coding style note about this sort of thing?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux