LKML Archive on
help / color / mirror / Atom feed
* cris: build creates links in the source directory
@ 2008-02-27 22:05 Adrian Bunk
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2008-02-27 22:05 UTC (permalink / raw)
  To: starvik, jesper.nilsson; +Cc: dev-etrax, Sam Ravnborg, linux-kernel

Especially when building with a separate object directory the following 
part of arch/cris/Makefile is not so nice since it creates links in the 
source directory:

<--  snip  -->

# Create some links to make all tools happy
        @rm -rf $(SRC_ARCH)/drivers
        @ln -sfn $(SARCH)/drivers $(SRC_ARCH)/drivers
        @rm -rf $(SRC_ARCH)/boot
        @ln -sfn $(SARCH)/boot $(SRC_ARCH)/boot
        @rm -rf $(SRC_ARCH)/lib
        @ln -sfn $(SARCH)/lib $(SRC_ARCH)/lib
        @rm -f $(SRC_ARCH)/arch/mach
        @rm -rf $(SRC_ARCH)/arch
        @ln -sfn $(SARCH) $(SRC_ARCH)/arch
        @ln -sfn ../$(SARCH)/$(MACH) $(SRC_ARCH)/arch/mach
        @rm -rf $(SRC_ARCH)/kernel/
        @ln -sfn ../$(SARCH)/ $(SRC_ARCH)/kernel/
        @rm -rf $(SRC_ARCH)/kernel/asm-offsets.c
        @ln -sfn ../$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c
        @touch $@

# Create link to sub arch includes
$(srctree)/include/asm-$(ARCH)/.arch: $(wildcard 
        @echo '  SYMLINK include/asm-$(ARCH)/arch -> include/asm-$(ARCH)/$(SARCH)'
        @rm -f $(srctree)/include/asm-$(ARCH)/arch/mach
        @rm -f $(srctree)/include/asm-$(ARCH)/arch
        @ln -sf $(SARCH) $(srctree)/include/asm-$(ARCH)/arch
        @ln -sf $(MACH) $(srctree)/include/asm-$(ARCH)/arch/mach
        @touch $@

<--  snip  -->



       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-28  6:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2008-02-28  6:45 ` cris: build creates links in the source directory Mikael Starvik
2008-02-27 22:05 Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).