On Thu, 2008-09-04 at 15:50 -0500, Serge E. Hallyn wrote: > Quoting Matt Helsley ([EMAIL PROTECTED]): > > Use non-recursive assignment. This means, for example, that: > > > > SRCS := $(wildcard *.c) > > > > will call the wildcard function, substitute the output, and assign it to > > SRCS. Recursive assignment (plain =) would use the output and continue > > performing substitutions until no further substitutions could be made. > > > > Signed-off-by: Matt Helsley <[EMAIL PROTECTED]> > > I'll trust your Makefile wizardry > > Acked-by: Serge Hallyn <[EMAIL PROTECTED]>
Merged-By: Subrata Modak <[EMAIL PROTECTED]> > > > Cc: Veerendra Chandrappa <[EMAIL PROTECTED]> > > Cc: Sudhir Kumar15 <[EMAIL PROTECTED]> > > Cc: Subrata Modak <[EMAIL PROTECTED]> > > Cc: Serge E. Hallyn <[EMAIL PROTECTED]> > > --- > > testcases/kernel/containers/Makefile | 2 +- > > testcases/kernel/containers/libclone/Makefile | 4 ++-- > > testcases/kernel/containers/pidns/Makefile | 4 ++-- > > testcases/kernel/containers/sysvipc/Makefile | 4 ++-- > > testcases/kernel/containers/utsname/Makefile | 4 ++-- > > 5 files changed, 9 insertions(+), 9 deletions(-) > > > > Index: ltp-20080902/testcases/kernel/containers/pidns/Makefile > > =================================================================== > > --- ltp-20080902.orig/testcases/kernel/containers/pidns/Makefile > > +++ ltp-20080902/testcases/kernel/containers/pidns/Makefile > > @@ -22,8 +22,8 @@ CFLAGS += -Wall > > CPPFLAGS += -I../../../../include -I../libclone > > LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp > > > > -SRCS = $(wildcard *.c) > > -TARGETS = $(patsubst %.c,%,$(SRCS)) > > +SRCS := $(wildcard *.c) > > +TARGETS := $(SRCS:%.c=%) > > > > HAS_UNSHARE ?= $(shell ../check_for_unshare && echo y) > > ifneq ($(HAS_UNSHARE),y) > > Index: ltp-20080902/testcases/kernel/containers/utsname/Makefile > > =================================================================== > > --- ltp-20080902.orig/testcases/kernel/containers/utsname/Makefile > > +++ ltp-20080902/testcases/kernel/containers/utsname/Makefile > > @@ -22,8 +22,8 @@ CFLAGS += -Wall > > CPPFLAGS += -I../../../../include -I../libclone > > LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp > > > > -SRCS = $(wildcard *.c) > > -TARGETS = $(patsubst %.c,%,$(SRCS)) > > +SRCS := $(wildcard *.c) > > +TARGETS := $(SRCS:%.c=%) > > > > HAS_UNSHARE ?= $(shell ../check_for_unshare && echo y) > > ifneq ($(HAS_UNSHARE),y) > > Index: ltp-20080902/testcases/kernel/containers/sysvipc/Makefile > > =================================================================== > > --- ltp-20080902.orig/testcases/kernel/containers/sysvipc/Makefile > > +++ ltp-20080902/testcases/kernel/containers/sysvipc/Makefile > > @@ -21,8 +21,8 @@ > > CFLAGS += -I../../../../include -I../libclone -Wall > > LDLIBS += -L../../../../lib -L../libclone ../libclone/libclone.a -lltp > > > > -SRCS = $(wildcard *.c) > > -TARGETS = $(patsubst %.c,%,$(SRCS)) > > +SRCS := $(wildcard *.c) > > +TARGETS := $(SRCS:%.c=%) > > > > HAS_UNSHARE ?= $(shell ../check_for_unshare && echo y) > > ifneq ($(HAS_UNSHARE),y) > > Index: ltp-20080902/testcases/kernel/containers/libclone/Makefile > > =================================================================== > > --- ltp-20080902.orig/testcases/kernel/containers/libclone/Makefile > > +++ ltp-20080902/testcases/kernel/containers/libclone/Makefile > > @@ -18,8 +18,8 @@ > > ## > > ## > > > > ################################################################################ > > > > -SRCS=$(wildcard *.c) > > -OBJS=$(patsubst %.c,%.o,$(SRCS)) > > +SRCS := $(wildcard *.c) > > +OBJS := $(SRCS:%.c=%.o) > > > > HAS_UNSHARE ?= $(shell ../check_for_unshare && echo y) > > ifeq ($(HAS_UNSHARE),y) > > Index: ltp-20080902/testcases/kernel/containers/Makefile > > =================================================================== > > --- ltp-20080902.orig/testcases/kernel/containers/Makefile > > +++ ltp-20080902/testcases/kernel/containers/Makefile > > @@ -18,7 +18,7 @@ > > ## > > ## > > > > ################################################################################ > > > > -SUBDIRS = libclone utsname sysvipc pidns > > +SUBDIRS := libclone utsname sysvipc pidns > > > > all: check_for_unshare > > @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done > > > > -- ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
