summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-28 22:02:53 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-28 22:02:53 +0000
commitacbbf9361538bb1fc2738a5994359aacdc9d2f43 (patch)
tree72494e82a8c4a37661aab09611997998cf9a64f3
parenta96f2373db547c4ed482dffe1b4037013a1171ea (diff)
downloadrockbox-acbbf9361538bb1fc2738a5994359aacdc9d2f43.tar.gz
rockbox-acbbf9361538bb1fc2738a5994359aacdc9d2f43.zip
Lua: make sure action.h gets C preprocessed before processing it
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21123 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xapps/plugins/lua/action_helper.pl8
-rw-r--r--apps/plugins/lua/lua.make2
2 files changed, 2 insertions, 8 deletions
diff --git a/apps/plugins/lua/action_helper.pl b/apps/plugins/lua/action_helper.pl
index b681951588..eb66c2b01e 100755
--- a/apps/plugins/lua/action_helper.pl
+++ b/apps/plugins/lua/action_helper.pl
@@ -18,13 +18,9 @@
18# 18#
19############################################################################ 19############################################################################
20 20
21$input = $ARGV[0] . "/../../action.h";
22
23open(ACTION, "<$input") or die "Can't open $input!";
24
25$i = 0; 21$i = 0;
26$j = 0; 22$j = 0;
27while(my $line = <ACTION>) 23while(my $line = <STDIN>)
28{ 24{
29 chomp($line); 25 chomp($line);
30 if($line =~ /^\s*(ACTION_[^\s]+)(\s*=.*)?,\s*$/) 26 if($line =~ /^\s*(ACTION_[^\s]+)(\s*=.*)?,\s*$/)
@@ -39,8 +35,6 @@ while(my $line = <ACTION>)
39 } 35 }
40} 36}
41 37
42close(ACTION);
43
44print "-- Don't change this file!\n"; 38print "-- Don't change this file!\n";
45printf "-- It is automatically generated of action.h %s\n", '$Revision$'; 39printf "-- It is automatically generated of action.h %s\n", '$Revision$';
46 40
diff --git a/apps/plugins/lua/lua.make b/apps/plugins/lua/lua.make
index 45d6739f25..596e32045f 100644
--- a/apps/plugins/lua/lua.make
+++ b/apps/plugins/lua/lua.make
@@ -33,7 +33,7 @@ endif
33$(LUA_BUILDDIR)/lua.rock: $(LUA_OBJ) $(LUA_BUILDDIR)/actions.lua 33$(LUA_BUILDDIR)/lua.rock: $(LUA_OBJ) $(LUA_BUILDDIR)/actions.lua
34 34
35$(LUA_BUILDDIR)/actions.lua: $(LUA_OBJ) 35$(LUA_BUILDDIR)/actions.lua: $(LUA_OBJ)
36 $(call PRINTS,GEN $(@F))$(LUA_SRCDIR)/action_helper.pl $(LUA_SRCDIR) > $@ 36 $(call PRINTS,GEN $(@F))$(CC) $(PLUGINFLAGS) -E $(APPSDIR)/action.h | $(LUA_SRCDIR)/action_helper.pl > $(LUA_BUILDDIR)/actions.lua
37 37
38$(LUA_BUILDDIR)/lua.refmap: $(LUA_OBJ) 38$(LUA_BUILDDIR)/lua.refmap: $(LUA_OBJ)
39 39