lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101006045255.GA24870@merkur.ravnborg.org>
Date:	Wed, 6 Oct 2010 06:52:55 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	Michal Marek <mmarek@...e.cz>, linux-media@...r.kernel.org,
	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [RFC PATCH] media: consolidation of -I flags

> 
> Ah, I was not aware of that, and I forgot to test for that case.
> 
> > > 
> > > If neither idea is considered beneficial, I will go ahead and replace
> > > the older variables with the newer ones as is.
> > 
> > This is the right approach.
> > 
> > You could consider to do a more general cleanup:
> > 1) replace EXTRA_CFLAGS with ccflags-y (the one you suggest)
> > 2) replace use of <module>-objs with <module>-y
> > 3) break continued lines into several assignments
> >    People very often uses '\' to break long lines, where a
> >    simple += would be much more readable.
> >    But this topic may be personal - I never uses "\" in my .c code unless in macros,
> >    and I have applied the same rule for Makefiles.
> >    An ugly example is drivers/media/Makefile
> > 4) In general use ":=" instead of "=".
> >    Add using "+=" as first assignment is OK - but it just looks plain wrong
> > 5) some files has a mixture of spaces/tabs (are red in my vim)
> >    dvb-core/Makefile is one such example
> > 6) remove useless stuff
> >    siano/Makefile has some strange assignments to EXTRA_CFLAGS
> > 7) Likely a few more items to look after...
> > 
> > This is more work - but then you finish a Makefile rather than doing a simple
> > conversion.
> 
> I agree with all your points above; however, I was unsure of whether a wholesale
> cleanup would be welcomed because I would then end up touching numerous lines
> (and in some cases, possibly all lines).
The Makefiles are all very simple - so touching all lines in a files
is not a big deal here. But then you would have to batch your changes
in smaller parts touching only a few Makefiles/one Makefile per patch.

> Is the use of <module>-objs deprecated? Some people might wonder why I am
> changing that when they are not building a multisource object.
I always recommends the <module>-y notation.
Because this version has the flexibility to use the kbuild way
of dealing with conditional modules.

I see no reason to do such change alaone - but as part of other minor
cleanups it would be natural to change to the <module>-y idiom.


All the comments above is valid for staging too. There we should
try to do general cleanup on the Makefile rather than a lot of small
edits.
But sometimes the MAkefiles contains so much legacy that this will be more
than one patch..

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ