uml - kbuild: link cmd
PATCH 9/12 uml - kbuild: link cmd
Use the cmd_* syntax to define a command for symlink creations in UML (to reuse files from other archs).
Signed-off-by Paolo 'Blaisorblade' Giarrusso <[email protected]>
---
linux-2.6.11-paolo/arch/um/scripts/Makefile.rules | 3 +++ linux-2.6.11-paolo/arch/um/sys-i386/Makefile | 13 +++++-------- linux-2.6.11-paolo/arch/um/sys-x86_64/Makefile | 16 ++++++++-------- linux-2.6.11-paolo/include/asm-um/signal.h | 2 ++ 4 files changed, 18 insertions(+), 16 deletions(-)
arch/um/sys-x86_64/Makefile renamed from arch/um/sys-x86_64/Makefile~uml-kbuild-link-cmd +8 -8
@@ -14,10 +14,15 @@ include arch/um/scripts/Makefile.rules SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c memcpy.S \ semaphore.c thunk.S -SYMLINKS := $(foreach f,$(SYMLINKS),$(src)/$f) +# this needs to be before the foreach, because clean-files does not accept +# complete paths like $(src)/$f. clean-files := $(SYMLINKS) +targets += $(SYMLINKS) + +SYMLINKS := $(foreach f,$(SYMLINKS),$(obj)/$f) + bitops.c-dir = lib csum-copy.S-dir = lib csum-partial.c-dir = lib
@@ -26,12 +31,7 @@ memcpy.S-dir = lib semaphore.c-dir = kernel thunk.S-dir = lib -define make_link - -rm -f $1 - ln -sf $(srctree)/arch/x86_64/$($(notdir $1)-dir)/$(notdir $1) $1 -endef - -$(SYMLINKS): - $(call make_link,$@) +$(SYMLINKS): FORCE + $(call if_changed,make_link) CFLAGS_csum-partial.o := -Dcsum_partial=arch_csum_partial
arch/um/sys-i386/Makefile renamed from arch/um/sys-i386/Makefile~uml-kbuild-link-cmd +5 -8
@@ -14,19 +14,16 @@ SYMLINKS = bitops.c semaphore.c highmem. # complete paths like $(src)/$f. clean-files := $(SYMLINKS) -SYMLINKS := $(foreach f,$(SYMLINKS),$(src)/$f) +targets += $(SYMLINKS) + +SYMLINKS := $(foreach f,$(SYMLINKS),$(obj)/$f) bitops.c-dir = lib semaphore.c-dir = kernel highmem.c-dir = mm module.c-dir = kernel -define make_link - -rm -f $1 - ln -sf $(srctree)/arch/i386/$($(notdir $1)-dir)/$(notdir $1) $1 -endef - -$(SYMLINKS): - $(call make_link,$@) +$(SYMLINKS): FORCE + $(call if_changed,make_link) subdir- := util
arch/um/scripts/Makefile.rules renamed from arch/um/scripts/Makefile.rules~uml-kbuild-link-cmd +3 -0
@@ -8,3 +8,6 @@ USER_OBJS += $(filter %_user.o,$(obj-y) USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) $(USER_OBJS): c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(notdir $@)) + +quiet_cmd_make_link = SYMLINK $@ +cmd_make_link = rm -f $@; ln -sf $(srctree)/arch/$(SUBARCH)/$($(notdir $@)-dir)/$(notdir $@) $@
_
-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel