From: blaisorblade@yahoo.it
To: akpm@osdl.org
Cc: jdike@addtoit.com, linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net,
blaisorblade@yahoo.it
Subject: [uml-devel] [patch 09/12] uml - kbuild: link cmd
Date: Tue, 22 Mar 2005 17:21:39 +0100 [thread overview]
Message-ID: <20050322162139.50D4197672@zion> (raw)
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 <blaisorblade@yahoo.it>
---
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(-)
diff -puN arch/um/sys-x86_64/Makefile~uml-kbuild-link-cmd arch/um/sys-x86_64/Makefile
--- linux-2.6.11/arch/um/sys-x86_64/Makefile~uml-kbuild-link-cmd 2005-03-21 19:53:36.000000000 +0100
+++ linux-2.6.11-paolo/arch/um/sys-x86_64/Makefile 2005-03-21 19:53:36.000000000 +0100
@@ -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
diff -puN arch/um/sys-i386/Makefile~uml-kbuild-link-cmd arch/um/sys-i386/Makefile
--- linux-2.6.11/arch/um/sys-i386/Makefile~uml-kbuild-link-cmd 2005-03-21 19:53:36.000000000 +0100
+++ linux-2.6.11-paolo/arch/um/sys-i386/Makefile 2005-03-21 19:53:36.000000000 +0100
@@ -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
diff -puN arch/um/scripts/Makefile.rules~uml-kbuild-link-cmd arch/um/scripts/Makefile.rules
--- linux-2.6.11/arch/um/scripts/Makefile.rules~uml-kbuild-link-cmd 2005-03-21 19:53:36.000000000 +0100
+++ linux-2.6.11-paolo/arch/um/scripts/Makefile.rules 2005-03-21 19:53:36.000000000 +0100
@@ -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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
reply other threads:[~2005-03-22 19:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050322162139.50D4197672@zion \
--to=blaisorblade@yahoo.it \
--cc=akpm@osdl.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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