On Friday 2008-05-02 16:15, Jeff Schroeder wrote:
Make is not my forte, but here is a working test to see if apparmor
exists in Ubuntu 8.04.
Maybe have make apply a patch to the btrfs source if this test
succeeds? Does this work in SUSE?
http://www.digitalprognosis.com/opensource/patches/btrfs/lame_apparmor_test_for_btrfs.patch
Woah, you rely on autoconf.h. Uh no thanks, let the build system handle it.
# -*- Makefile -*-
btrfs-objs := ...
obj-m += btrfs.o and-so-on.o
ifneq (${CONFIG_SECURITY_APPARMOR},)
EXTRA_CFLAGS += -DI_HAZ_AN_APPARMOR
endif
all:
${MAKE} -C ${kdir} M=$PWD all;
Best of all, you can override that from the command line too...
make CONFIG_SECURITY_APPARMOR=y
(and if you don't, it takes its value from the appropriate .config,
all without you having to care about autoconf.h)