All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Zhbanov <i.zhbanov at samsung.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] csstoh shell-script for cross-compiling PowerTOP
Date: Wed, 11 Jul 2012 12:47:21 +0400	[thread overview]
Message-ID: <4FFD3D99.5030400@samsung.com> (raw)
In-Reply-To: 1341993257.4108.9.camel@mattotaupa

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

Here is the formatted version of the patch:

 From 06ee265b637bd75e2147631f49454c2c82be827e Mon Sep 17 00:00:00 2001
From: Igor Zhbanov<i.zhbanov(a)samsung.com>
Date: Wed, 11 Jul 2012 12:44:39 +0400
Subject: [PATCH] csstoh shell-script for cross-compiling PowerTOP

I have tried to build PowerTOP for ARM with a cross-compiler. But PowerTOP
uses internal csstoh utility that converts powertop.css to powertoh.h
for inclusion in *.cpp source files.

When you use the cross-compiler (without making complicated rules
in the Makefile) this utility will be compiled for ARM platform too.
And you cannot run it on x86 build host.

To solve this issue (and because of simplicity of the utility)
I have rewritten it in a shell script.
---
  .gitignore      |    1 -
  src/Makefile.am |    7 ++-----
  2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/.gitignore b/.gitignore
index 5534072..35f0df6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,7 +39,6 @@ po/*.gmo
  po/stamp-po
  src/powertop
  src/css.h
-src/csstoh
  src/Makefile.in
  src/.deps/
  src/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index c77b2aa..15e5feb 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

@@ -44,6 +41,6 @@ AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(LIBNL_LIBS) $(LIBZ_LIBS)

  BUILT_SOURCES = css.h
  CLEANFILES = css.h
-css.h: csstoh powertop.css
-	./csstoh powertop.css css.h
+css.h: powertop.css
+	$(SHELL) ./csstoh.sh powertop.css css.h

-- 
1.7.5.4

Paul Menzel wrote:

> Dear Igor, dear Sergey,
>
>
> Am Mittwoch, den 11.07.2012, 10:36 +0300 schrieb Sergey Senozhatsky:
>> On (07/11/12 11:15), Igor Zhbanov wrote:
>>> Here is the new version:
>>>
>>> --8<--Cut-here----------------------------------------------------------------
>> Igor, could you please inline patch as "git diff -u -p" output, not as attachment.
>          $ git commit -a
>          $ git format-patch -1
>
> is the preferred way as far as I know. Please see my other message, I
> sent in reply to »[Powertop] Device list sort function bug«.
>
>
> Thanks,
>
> Paul


-- 
Best regards,
Igor Zhbanov,
Expert Software Engineer,
phone: +7 (495) 797 25 00 ext 3806
e-mail: i.zhbanov(a)samsung.com

ASWG, Moscow R&D center, Samsung Electronics
12 Dvintsev street, building 1
127018, Moscow, Russian Federation


             reply	other threads:[~2012-07-11  8:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11  8:47 Igor Zhbanov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-07-11 11:46 [Powertop] csstoh shell-script for cross-compiling PowerTOP Paul Menzel
2012-07-11  7:54 Paul Menzel
2012-07-11  7:36 Sergey Senozhatsky
2012-07-11  7:15 Igor Zhbanov
2012-07-11  6:56 Magnus Fromreide
2012-07-11  6:17 Igor Zhbanov

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=4FFD3D99.5030400@samsung.com \
    --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.