Re: [PATCH] add checkstack Makefile target

From: Sam Ravnborg (sam@ravnborg.org)
Date: Tue Mar 04 2003 - 14:08:54 EST


On Tue, Mar 04, 2003 at 11:57:39AM +0100, J??rn Engel wrote:

A few comments to the Makefile changes..

> diff -Naur linux-2.5.63/arch/i386/Makefile linux-2.5.63-checkstack/arch/i386/Makefile
> --- linux-2.5.63/arch/i386/Makefile Mon Feb 24 20:05:15 2003
> +++ linux-2.5.63-checkstack/arch/i386/Makefile Tue Mar 4 11:51:11 2003
> @@ -124,3 +124,12 @@
> echo ' install to $$(INSTALL_PATH) and run lilo'
> endef
>
> +CLEAN_FILES += $(TOPDIR)/scripts/checkstack_i386.pl
Do not use TOPDIR.
> +CLEAN_FILES += scripts/checkstack_i386.pl
Is preferred.

> +
> +$(TOPDIR)/scripts/checkstack_i386.pl: $(TOPDIR)/scripts/checkstack.pl
> + (cd $(TOPDIR)/scripts/ && ln -s checkstack.pl checkstack_i386.pl)
There is no need to use the symlink trick.
Just pass the architecture as first mandatory parameter.
Something like
checkstack: vmlinux FORCE
        $(OBJDUMP) -d vmlinux | scripts/checkstack.pl $(ARCH)

Note that I skipped grep. Perl is good at regular expressions, and
the perl scripts already know the architecture so you can do the job there.
Since the above is now architecture independent, better locate it in
the top level Makefile.

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



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:25 EST