mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Michael-Luke Jones" <mlj28@cam.ac.uk>
Cc: "Nitin Gupta" <nitingupta910@gmail.com>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-mm-cc@laptop.org,
	linuxcompressed-devel@lists.sourceforge.net,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Daniel Hazelton" <dhazelton@enter.net>,
	"Richard Purdie" <richard@openedhand.com>,
	"Bret Towe" <magnade@gmail.com>
Subject: Re: Makefile question (was [RFC] LZO de/compression support - take 6)
Date: Tue, 29 May 2007 16:11:32 +0530	[thread overview]
Message-ID: <a781481a0705290341w4c403c1ej43565a1e66805522@mail.gmail.com> (raw)
In-Reply-To: <292C7F80-B80D-4645-8FF5-49BF911398E1@cam.ac.uk>

On 5/29/07, Michael-Luke Jones <mlj28@cam.ac.uk> wrote:
> On 28 May 2007, at 15:34, Nitin Gupta wrote:
>
> > diff --git a/lib/Kconfig b/lib/Kconfig
> > index 2e7ae6b..eb95eaa 100644
> > --- a/lib/Kconfig
> > +++ b/lib/Kconfig
> > @@ -64,6 +64,12 @@ config ZLIB_INFLATE
> > config ZLIB_DEFLATE
> >       tristate
> >
> > +config LZO1X_COMPRESS
> > +     tristate
> > +
> > +config LZO1X_DECOMPRESS
> > +     tristate
> > +
> > #
> > # Generic allocator support is selected if needed
> > #
> > diff --git a/lib/Makefile b/lib/Makefile
> > index c8c8e20..448ae37 100644
> > --- a/lib/Makefile
> > +++ b/lib/Makefile
> > @@ -49,6 +49,8 @@ obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o
> > obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/
> > obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/
> > obj-$(CONFIG_REED_SOLOMON) += reed_solomon/
> > +obj-$(CONFIG_LZO1X_COMPRESS) += lzo1x/
> > +obj-$(CONFIG_LZO1X_DECOMPRESS) += lzo1x/
> >
> > obj-$(CONFIG_TEXTSEARCH) += textsearch.o
> > obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o
>
> Hey there,
>
> Is this syntax OK for Makefile use? I'm only asking out of personal
> ignorance and because I'd use:

> > +obj-$(CONFIG_LZO1X_COMPRESS) += lzo1x/
> > +obj-$(CONFIG_LZO1X_DECOMPRESS) += lzo1x/

This is syntactically correct (and wouldn't produce any build errors),
but it's quite ... strange, still. Why would I even want to /build/ the
compress code if all I selected was the decompress option?

Also, when both the options are y, make would just make the first
target, then recurse back into that same directory again and skip
it because it just made it ... which, although harmless, is ... strange.

So I'm not sure if we really want both the options to resolve to the
same make target -- the kernel typically has more users of
_decompress_ than those of _compress_, so it does make some sense
to completely decouple the two into separate directories in lib/ and have
separate Kconfig options (as well as Makefile target subdirs) for them.

> Kconfig:
>
> config LZO1X_COMPRESS
>         select LZO1X
>         tristate
>
> config LZO1X_DECOMPRESS
>         select LZO1X
>         tristate
>
> config LZO1X
>         tristate (or boolean??)

Hmmm ... if this is /really/ what we want to do, what's wrong with simply:

config LZO1x
	tristate

?

> Makefile:
>
> obj-$(CONFIG_LZO1X) += lzo1x/

I find nothing wrong with the style being used for ZLIB presently. Agreed,
users of ZLIB do typically want to select only decompress *without*
compress whereas there's no such user for LZO currently, but I see
nothing wrong in just copying over ZLIB's style for LZO too (i.e. decoupling
the compress and decompress code into separate subdirs in lib/).
And if not, then why have two separate (dummy) Kconfig options either?

  reply	other threads:[~2007-05-29 10:41 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-28 14:34 [RFC] LZO de/compression support - take 6 Nitin Gupta
2007-05-28 14:40 ` Nitin Gupta
2007-05-28 14:49   ` Daniel Hazelton
2007-05-28 15:06     ` Nitin Gupta
2007-05-28 15:43       ` Adrian Bunk
2007-05-28 16:03         ` Nitin Gupta
2007-05-28 17:11           ` Adrian Bunk
2007-05-28 19:59             ` Daniel Hazelton
2007-05-28 20:18             ` Daniel Hazelton
2007-05-28 20:52               ` Daniel Hazelton
2007-05-29  5:55             ` Nitin Gupta
2007-05-29  8:08             ` Michael-Luke Jones
2007-05-29 11:40               ` Adrian Bunk
2007-05-29 12:03                 ` Nitin Gupta
2007-05-29 13:13                   ` Daniel Hazelton
2007-05-29 21:10             ` Jan Engelhardt
2007-05-29 21:26               ` Adrian Bunk
2007-05-30  5:31                 ` Nitin Gupta
2007-05-30 13:56                   ` Johannes Stezenbach
2007-05-30 14:24                     ` Satyam Sharma
2007-05-28 15:30   ` Adrian Bunk
2007-05-28 15:47     ` Nitin Gupta
2007-05-28 15:55       ` Daniel Hazelton
2007-05-28 17:01         ` Adrian Bunk
2007-05-28 19:51           ` Daniel Hazelton
2007-05-28 15:49     ` Daniel Hazelton
2007-05-28 22:57   ` Bret Towe
2007-05-29  5:48     ` Nitin Gupta
2007-05-29 13:09       ` Daniel Hazelton
2007-05-28 22:53 ` Bret Towe
2007-05-28 22:58   ` Bret Towe
2007-05-29  5:58   ` Nitin Gupta
2007-05-29 20:14     ` Daniel Hazelton
2007-05-29 20:33       ` Daniel Hazelton
2007-05-29 21:48         ` Daniel Hazelton
2007-05-29 23:32     ` Daniel Hazelton
2007-05-30  5:19       ` Nitin Gupta
2007-05-29  8:17 ` Makefile question (was [RFC] LZO de/compression support - take 6) Michael-Luke Jones
2007-05-29 10:41   ` Satyam Sharma [this message]
2007-05-29 10:51     ` Michael-Luke Jones
2007-05-29 11:27       ` Satyam Sharma
2007-05-29 13:33         ` JFFS2 using 'private' zlib header " Michael-Luke Jones
2007-05-29 13:43           ` Daniel Hazelton
2007-05-29 15:15             ` Satyam Sharma
2007-05-29 16:20               ` Daniel Hazelton
2007-05-30  5:31               ` Mark Adler
2007-05-30 13:05                 ` Daniel Hazelton
2007-05-30 13:30                 ` Satyam Sharma
2007-05-30 23:02                   ` Mark Adler
2007-05-30 23:26                     ` Daniel Hazelton
2007-06-01  3:06                     ` Daniel Hazelton
2007-06-01 17:24                       ` Satyam Sharma
2007-05-30 13:41               ` Artem Bityutskiy
2007-05-30 15:46                 ` Artem Bityutskiy
2007-05-30 16:12                   ` Satyam Sharma
2007-05-30 16:43                     ` Artem Bityutskiy
2007-05-29 20:48 ` [RFC] LZO de/compression support - take 6 Jan Engelhardt
2007-05-30  5:54   ` Nitin Gupta
2007-05-30  8:31     ` Jan Engelhardt
2007-05-30 10:47       ` Nitin Gupta
2007-05-31 12:34 ` Nitin Gupta
2007-05-31 18:21   ` Satyam Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a781481a0705290341w4c403c1ej43565a1e66805522@mail.gmail.com \
    --to=satyam.sharma@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhazelton@enter.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm-cc@laptop.org \
    --cc=linuxcompressed-devel@lists.sourceforge.net \
    --cc=magnade@gmail.com \
    --cc=mlj28@cam.ac.uk \
    --cc=nitingupta910@gmail.com \
    --cc=richard@openedhand.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®