diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-12-22 15:32:17 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-12-22 15:32:17 +0200 |
commit | 4d328c0b6982a5782bdd9dc4722ccc5119279b57 (patch) | |
tree | 8f4e4b60a935148faa4908bc292d94201fad2a87 | |
parent | 67601222815391e7739fa8592d0d0de57f5fb316 (diff) | |
download | rpm-4d328c0b6982a5782bdd9dc4722ccc5119279b57.tar.gz rpm-4d328c0b6982a5782bdd9dc4722ccc5119279b57.tar.bz2 rpm-4d328c0b6982a5782bdd9dc4722ccc5119279b57.zip |
Use %{__mkdir_p} macro in build instead of hardwired RPM_MKDIR_P
-rw-r--r-- | build/files.c | 4 | ||||
-rw-r--r-- | build/parsePrep.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/build/files.c b/build/files.c index 7db729a3f..0c95d2571 100644 --- a/build/files.c +++ b/build/files.c @@ -931,12 +931,14 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf, } else { /* XXX FIXME: this is easy to do as macro expansion */ if (! fl->passedSpecialDoc) { + char *mkdocdir = rpmExpand("%{__mkdir_p} $DOCDIR", NULL); pkg->specialDoc = newStringBuf(); appendStringBuf(pkg->specialDoc, "DOCDIR=$RPM_BUILD_ROOT"); appendLineStringBuf(pkg->specialDoc, pkg->specialDocDir); appendLineStringBuf(pkg->specialDoc, "export DOCDIR"); appendLineStringBuf(pkg->specialDoc, "rm -rf $DOCDIR"); - appendLineStringBuf(pkg->specialDoc, RPM_MKDIR_P " $DOCDIR"); + appendLineStringBuf(pkg->specialDoc, mkdocdir); + free(mkdocdir); *fileName = pkg->specialDocDir; fl->passedSpecialDoc = 1; diff --git a/build/parsePrep.c b/build/parsePrep.c index 729bbca1b..670ed709d 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -326,8 +326,8 @@ static int doSetupMacro(rpmSpec spec, const char *line) /* if necessary, create and cd into the proper dir */ if (createDir) { - rasprintf(&buf, RPM_MKDIR_P " %s\ncd '%s'", - spec->buildSubdir, spec->buildSubdir); + buf = rpmExpand("%{__mkdir_p} ", spec->buildSubdir, "\n", + "cd '", spec->buildSubdir, "'", NULL); appendLineStringBuf(spec->prep, buf); free(buf); } |