mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 03:08:13 +02:00
[script] drop stringify, .script.h instead of .string
stringify.py is written in perl, but doesn't do much to justify the dependency. We now just do sed in the Makefile. Also, rename .string to .script.h since that's a little more conventional.
This commit is contained in:
parent
ce77a0e8d3
commit
93a16e060c
6 changed files with 13 additions and 35 deletions
|
|
@ -45,16 +45,14 @@ script_la_SOURCES = $(srcdir)/plugin.c \
|
|||
$(srcdir)/script-lib-math.script
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
CLEANFILES = *.string
|
||||
CLEANFILES = *.script.h
|
||||
|
||||
BUILT_SOURCES = script-lib-image.string script-lib-sprite.string script-lib-math.string script-lib-plymouth.string
|
||||
BUILT_SOURCES = script-lib-image.script.h script-lib-sprite.script.h script-lib-math.script.h script-lib-plymouth.script.h
|
||||
|
||||
EXTRA_DIST = stringify.pl
|
||||
|
||||
%.string: %.script stringify.pl
|
||||
$(srcdir)/stringify.pl < $< > $@
|
||||
|
||||
script-lib-image.c : script-lib-image.string
|
||||
script-lib-sprite.c : script-lib-sprite.string
|
||||
script-lib-math.c : script-lib-math.string
|
||||
script-lib-plymouth.c : script-lib-plymouth.string
|
||||
%.script.h: %.script
|
||||
sed -e 's/\\/\\\\/g' \
|
||||
-e 's/"/\\"/g' \
|
||||
-e 's/\(.*\)/ "\1\\n"/g' \
|
||||
-e '1istatic const char* $(subst -,_,$(@:.script.h=_string)) =' \
|
||||
-e '$$a;' \
|
||||
$< > $@
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#define STRINGIFY_VAR script_lib_image_string
|
||||
#include "script-lib-image.string"
|
||||
#include "script-lib-image.script.h"
|
||||
|
||||
static void image_free (script_obj_t *obj)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,9 +34,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#define STRINGIFY_VAR script_lib_math_string
|
||||
|
||||
#include "script-lib-math.string"
|
||||
#include "script-lib-math.script.h"
|
||||
|
||||
static script_return_t script_lib_math_float_from_float_function (script_state_t *state,
|
||||
void *user_data)
|
||||
|
|
|
|||
|
|
@ -33,9 +33,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#define STRINGIFY_VAR script_lib_plymouth_string
|
||||
|
||||
#include "script-lib-plymouth.string"
|
||||
#include "script-lib-plymouth.script.h"
|
||||
|
||||
static script_return_t plymouth_set_function (script_state_t *state,
|
||||
void *user_data)
|
||||
|
|
|
|||
|
|
@ -35,8 +35,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#define STRINGIFY_VAR script_lib_sprite_string
|
||||
#include "script-lib-sprite.string"
|
||||
#include "script-lib-sprite.script.h"
|
||||
|
||||
static void sprite_free (script_obj_t *obj)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
#! /bin/sh
|
||||
exec perl -x $0 ${1+"$@"}
|
||||
if 0;
|
||||
#!perl
|
||||
|
||||
print "static const char* STRINGIFY_VAR = ";
|
||||
while (<>)
|
||||
{
|
||||
chomp;
|
||||
s/\\/\\\\/g;
|
||||
s/"/\\"/g;
|
||||
print "\"$_\\n\"\n";
|
||||
}
|
||||
print ";";
|
||||
Loading…
Add table
Reference in a new issue