All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Krufky <mkrufky@m1k.net>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>
Subject: [HOWTO] set extra_cflags to indicate compilation against -mm kernels
Date: Sat, 30 Jul 2005 17:29:21 -0400	[thread overview]
Message-ID: <42EBF131.60507@m1k.net> (raw)

With the addition of topdir-mm.patch into the -mm tree (since 
2.6.13-rc3-mm2), it is now possible for Makefile to detect whether a cvs 
subtree is being built against -mm or not...  -mm kernels now have a .mm 
file in the top level directory.

inside Makefile:

mm-kernel := $(TOPDIR)/.mm
ifneq ($(mm-kernel),)
MM_KERNEL_CFLAGS	:= -DMM_KERNEL=$(shell cat $(mm-kernel) 2> /dev/null)
ifneq ($(MM_KERNEL_CFLAGS),-DMM_KERNEL=)
EXTRA_CFLAGS		+= $(MM_KERNEL_CFLAGS)
endif
endif


inside C files:
#ifdef MM_KERNEL
/* code needed by -mm kernel only */
#else
/* original code for compilation against -linus */
#endif


This should probably be documented somewhere, but I don't know where it 
goes.......

-- 
Michael Krufky


             reply	other threads:[~2005-07-30 21:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-30 21:29 Michael Krufky [this message]
2005-07-31  8:44 ` [HOWTO] set extra_cflags to indicate compilation against -mm kernels Sam Ravnborg
2005-07-31 14:05   ` Michael Krufky

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=42EBF131.60507@m1k.net \
    --to=mkrufky@m1k.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.