Re: asm-offsets.h is generated in the source tree

From: Al Viro
Date: Tue Sep 13 2005 - 16:55:46 EST


On Tue, Sep 13, 2005 at 07:30:28AM +0100, Al Viro wrote:
> * Provide a function that would
> take target of form <directory>/.<link>
> create a symlink at <directory>/<link> to argument of function,
> doing obvious changes for O=
> touch the target

ifneq ($(KBUILD_SRC),)
define symlink
$(Q)mkdir -p $(dir $@)
$(Q)ln -sn $(srctree)/$(dir $@)/$1 $(dir $@)$(patsubst .%,%,$(notdir $@))
$(Q)touch $@
endef
else
define symlink
$(Q)ln -sn $1 $(dir $@)$(patsubst .%,%,$(notdir $@))
$(Q)touch $@
endef
endif

would do it, AFAICS. Objections?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/