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'
This commit is contained in:
parent
d5847bf594
commit
368ecfc3a0
2 changed files with 22 additions and 7 deletions
15
gentpl.py
15
gentpl.py
|
@ -834,6 +834,20 @@ def data(defn, platform):
|
||||||
var_add("dist_" + installdir(defn) + "_DATA", platform_sources(defn, platform))
|
var_add("dist_" + installdir(defn) + "_DATA", platform_sources(defn, platform))
|
||||||
gvar_add("dist_noinst_DATA", extra_dist(defn))
|
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):
|
def script(defn, platform):
|
||||||
name = defn['name']
|
name = defn['name']
|
||||||
|
|
||||||
|
@ -881,6 +895,7 @@ rules("library", library)
|
||||||
rules("program", program)
|
rules("program", program)
|
||||||
rules("script", script)
|
rules("script", script)
|
||||||
rules("data", data)
|
rules("data", data)
|
||||||
|
rules("transform_data", transform_data)
|
||||||
|
|
||||||
write_output(section='decl')
|
write_output(section='decl')
|
||||||
write_output()
|
write_output()
|
||||||
|
|
|
@ -1,43 +1,43 @@
|
||||||
AutoGen definitions Makefile.tpl;
|
AutoGen definitions Makefile.tpl;
|
||||||
|
|
||||||
script = {
|
transform_data = {
|
||||||
installdir = noinst;
|
installdir = noinst;
|
||||||
name = gensyminfo.sh;
|
name = gensyminfo.sh;
|
||||||
common = gensyminfo.sh.in;
|
common = gensyminfo.sh.in;
|
||||||
};
|
};
|
||||||
|
|
||||||
script = {
|
transform_data = {
|
||||||
installdir = noinst;
|
installdir = noinst;
|
||||||
name = genmod.sh;
|
name = genmod.sh;
|
||||||
common = genmod.sh.in;
|
common = genmod.sh.in;
|
||||||
};
|
};
|
||||||
|
|
||||||
script = {
|
transform_data = {
|
||||||
installdir = noinst;
|
installdir = noinst;
|
||||||
name = modinfo.sh;
|
name = modinfo.sh;
|
||||||
common = modinfo.sh.in;
|
common = modinfo.sh.in;
|
||||||
};
|
};
|
||||||
|
|
||||||
script = {
|
transform_data = {
|
||||||
installdir = platform;
|
installdir = platform;
|
||||||
name = gmodule.pl;
|
name = gmodule.pl;
|
||||||
common = gmodule.pl.in;
|
common = gmodule.pl.in;
|
||||||
};
|
};
|
||||||
|
|
||||||
script = {
|
transform_data = {
|
||||||
installdir = platform;
|
installdir = platform;
|
||||||
name = gdb_grub;
|
name = gdb_grub;
|
||||||
common = gdb_grub.in;
|
common = gdb_grub.in;
|
||||||
};
|
};
|
||||||
|
|
||||||
script = {
|
transform_data = {
|
||||||
installdir = platform;
|
installdir = platform;
|
||||||
name = grub.chrp;
|
name = grub.chrp;
|
||||||
common = boot/powerpc/grub.chrp.in;
|
common = boot/powerpc/grub.chrp.in;
|
||||||
enable = powerpc_ieee1275;
|
enable = powerpc_ieee1275;
|
||||||
};
|
};
|
||||||
|
|
||||||
script = {
|
transform_data = {
|
||||||
installdir = platform;
|
installdir = platform;
|
||||||
name = bootinfo.txt;
|
name = bootinfo.txt;
|
||||||
common = boot/powerpc/bootinfo.txt.in;
|
common = boot/powerpc/bootinfo.txt.in;
|
||||||
|
|
Loading…
Reference in a new issue