Commit 368ecfc3 authored by Vladimir Serbinenko's avatar Vladimir Serbinenko

Add transform_data as a variant of data with substitutions.

This fixrs name mismatch for grub.chrp with
transform_program_name='s,grub,grub2,g'
parent d5847bf5
......@@ -834,6 +834,20 @@ def data(defn, platform):
var_add("dist_" + installdir(defn) + "_DATA", platform_sources(defn, platform))
gvar_add("dist_noinst_DATA", extra_dist(defn))
def transform_data(defn, platform):
name = defn['name']
var_add(installdir(defn) + "_DATA", name)
rule(name, "$(top_builddir)/config.status " + platform_sources(defn, platform) + platform_dependencies(defn, platform), """
(for x in """ + platform_sources(defn, platform) + """; do cat $(srcdir)/"$$x"; done) | $(top_builddir)/config.status --file=$@:-
chmod a+x """ + name + """
""")
gvar_add("CLEANFILES", name)
gvar_add("EXTRA_DIST", extra_dist(defn))
gvar_add("dist_noinst_DATA", platform_sources(defn, platform))
def script(defn, platform):
name = defn['name']
......@@ -881,6 +895,7 @@ rules("library", library)
rules("program", program)
rules("script", script)
rules("data", data)
rules("transform_data", transform_data)
write_output(section='decl')
write_output()
AutoGen definitions Makefile.tpl;
script = {
transform_data = {
installdir = noinst;
name = gensyminfo.sh;
common = gensyminfo.sh.in;
};
script = {
transform_data = {
installdir = noinst;
name = genmod.sh;
common = genmod.sh.in;
};
script = {
transform_data = {
installdir = noinst;
name = modinfo.sh;
common = modinfo.sh.in;
};
script = {
transform_data = {
installdir = platform;
name = gmodule.pl;
common = gmodule.pl.in;
};
script = {
transform_data = {
installdir = platform;
name = gdb_grub;
common = gdb_grub.in;
};
script = {
transform_data = {
installdir = platform;
name = grub.chrp;
common = boot/powerpc/grub.chrp.in;
enable = powerpc_ieee1275;
};
script = {
transform_data = {
installdir = platform;
name = bootinfo.txt;
common = boot/powerpc/bootinfo.txt.in;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment