All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH] csstoh.sh shell script fixes cross compiling issues
Date: Tue, 04 Dec 2012 23:01:22 +0300	[thread overview]
Message-ID: <20121204200122.GA3874@swordfish> (raw)
In-Reply-To: 1354279587-20606-1-git-send-email-thomas.waldecker@gmail.com

[-- Attachment #1: Type: text/plain, Size: 3388 bytes --]

On (11/30/12 13:46), Thomas Waldecker wrote:
> Date: Fri, 30 Nov 2012 13:46:27 +0100
> From: Thomas Waldecker <thomas.waldecker(a)gmail.com>
> To: powertop(a)lists.01.org
> Cc: Thomas Waldecker <thomas.waldecker(a)tqs.de>
> Subject: [Powertop] [PATCH] csstoh.sh shell script fixes cross compiling
>  issues
> X-Mailer: git-send-email 1.7.11.7
> 
> From: Thomas Waldecker <thomas.waldecker(a)tqs.de>
> 
> Added the csstoh.sh shell script from Igor Zhbanov found here:
> http://lists.01.org/pipermail/powertop/2012-July/000151.html
> also patched the Makefile.am to use the csstoh.sh script.
> The compiled csstoh binary doesn't work for cross compiling,
> however Igors Patch never got applied upstream.
> ---
>  src/Makefile.am |    8 +++-----
>  src/csstoh.sh   |   45 +++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 48 insertions(+), 5 deletions(-)
>  create mode 100755 src/csstoh.sh
> 

looks good to me, thanks.


	-ss




> diff --git a/src/Makefile.am b/src/Makefile.am
> index f60426a..a53d942 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1,9 +1,6 @@
>  AUTOMAKE_OPTIONS = subdir-objects
>  ACLOCAL_AMFLAGS = -I ../m4 
>  
> -noinst_PROGRAMS = csstoh
> -csstoh_SOURCES = csstoh.c 
> -
>  sbin_PROGRAMS = powertop
>  nodist_powertop_SOURCES = css.h
>  
> @@ -48,6 +45,7 @@ AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(LIBNL_LIBS) $(LIBZ_LIBS)
>  
>  BUILT_SOURCES = css.h
>  CLEANFILES = css.h
> -css.h: csstoh powertop.css
> -	./csstoh "$(srcdir)"/powertop.css css.h
> +css.h: powertop.css
> +	chmod +x ./csstoh.sh
> +	./csstoh.sh "$(srcdir)"/powertop.css css.h
>  
> diff --git a/src/csstoh.sh b/src/csstoh.sh
> new file mode 100755
> index 0000000..5918d12
> --- /dev/null
> +++ b/src/csstoh.sh
> @@ -0,0 +1,45 @@
> +#!/bin/bash
> +#
> +# This program file is free software; you can redistribute it and/or modify it
> +# under the terms of the GNU General Public License as published by the
> +# Free Software Foundation; version 2 of the License.
> +#
> +# This program is distributed in the hope that it will be useful, but WITHOUT
> +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
> +# for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program in a file named COPYING; if not, write to the
> +# Free Software Foundation, Inc,
> +# 51 Franklin Street, Fifth Floor,
> +# Boston, MA 02110-1301 USA
> +# or just google for it.
> +#
> +# Written by Igor Zhbanov<i.zhbanov at samsung.com>
> +
> +
> +if [ $# -lt 2 ]; then
> +	echo "Usage: csstoh.sh cssfile header.h"
> +	exit 1
> +fi
> +
> +if [ ! -r $1 ]; then
> +	echo "Can't find file $1"
> +	exit 1
> +fi
> +
> +if ! echo -n>$2; then
> +	echo "Can't open file $2 for writing."
> +	exit 1
> +fi
> +
> +echo "#ifndef __INCLUDE_GUARD_CCS_H">>  $2
> +echo "#define __INCLUDE_GUARD_CCS_H">>  $2
> +echo>>  $2
> +echo "const char css[] = ">>  $2
> +
> +sed -r 's/^(.*)$/\t\"\1\\n\"/' $1>>  $2
> +
> +echo ";">>  $2
> +echo "#endif">>  $2
> -- 
> 1.7.9.5
> 
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
> 

             reply	other threads:[~2012-12-04 20:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 20:01 Sergey Senozhatsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-31 23:05 [Powertop] [PATCH] csstoh.sh shell script fixes cross compiling issues Magnus Fromreide
2013-01-31 22:46 Kristen Carlson Accardi
2012-11-30 12:46 Thomas Waldecker

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=20121204200122.GA3874@swordfish \
    --to=powertop@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.