diff options
author | jbj <devnull@localhost> | 2005-02-12 14:12:33 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2005-02-12 14:12:33 +0000 |
commit | 4bfb4d6f3fdeab36404947a2a63d88aa70f48760 (patch) | |
tree | efb6ba4dea81a51cf0f6352f9aac1ff61103de37 /build/build.c | |
parent | 704d36f484c546eea1f0c72f7992db223a98ffc0 (diff) | |
download | rpm-4bfb4d6f3fdeab36404947a2a63d88aa70f48760.tar.gz rpm-4bfb4d6f3fdeab36404947a2a63d88aa70f48760.tar.bz2 rpm-4bfb4d6f3fdeab36404947a2a63d88aa70f48760.zip |
- permit build scriptlet interpreters to be individually overridden.
CVS patchset: 7759
CVS date: 2005/02/12 14:12:33
Diffstat (limited to 'build/build.c')
-rw-r--r-- | build/build.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/build/build.c b/build/build.c index 35f84476d..67d3f4efe 100644 --- a/build/build.c +++ b/build/build.c @@ -64,6 +64,7 @@ int doScript(Spec spec, int what, const char *name, StringBuf sb, int test) const char * buildTemplate = NULL; const char * buildPost = NULL; const char * mTemplate = NULL; + const char * mCmd = NULL; const char * mPost = NULL; int argc = 0; const char **argv = NULL; @@ -83,40 +84,47 @@ int doScript(Spec spec, int what, const char *name, StringBuf sb, int test) sb = spec->prep; mTemplate = "%{__spec_prep_template}"; mPost = "%{__spec_prep_post}"; + mCmd = "%{__spec_prep_cmd}"; break; case RPMBUILD_BUILD: name = "%build"; sb = spec->build; mTemplate = "%{__spec_build_template}"; mPost = "%{__spec_build_post}"; + mCmd = "%{__spec_build_cmd}"; break; case RPMBUILD_INSTALL: name = "%install"; sb = spec->install; mTemplate = "%{__spec_install_template}"; mPost = "%{__spec_install_post}"; + mCmd = "%{__spec_install_cmd}"; break; case RPMBUILD_CHECK: name = "%check"; sb = spec->check; mTemplate = "%{__spec_check_template}"; mPost = "%{__spec_check_post}"; + mCmd = "%{__spec_check_cmd}"; break; case RPMBUILD_CLEAN: name = "%clean"; sb = spec->clean; mTemplate = "%{__spec_clean_template}"; mPost = "%{__spec_clean_post}"; + mCmd = "%{__spec_clean_cmd}"; break; case RPMBUILD_RMBUILD: name = "--clean"; mTemplate = "%{__spec_clean_template}"; mPost = "%{__spec_clean_post}"; + mCmd = "%{__spec_clean_cmd}"; break; case RPMBUILD_STRINGBUF: default: mTemplate = "%{___build_template}"; mPost = "%{___build_post}"; + mCmd = "%{___build_cmd}"; break; } if (name == NULL) /* XXX shouldn't happen */ @@ -219,7 +227,7 @@ fprintf(stderr, "*** addMacros\n"); } } - buildCmd = rpmExpand("%{___build_cmd}", " ", buildScript, NULL); + buildCmd = rpmExpand(mCmd, " ", buildScript, NULL); (void) poptParseArgvString(buildCmd, &argc, &argv); rpmMessage(RPMMESS_NORMAL, _("Executing(%s): %s\n"), name, buildCmd); |