ICU-1668 support -M argument for pkgdata.

X-SVN-Rev: 7524
This commit is contained in:
Yves Arrouye 2002-01-29 23:33:03 +00:00
parent 5318aa6782
commit d04443c5dc
3 changed files with 35 additions and 10 deletions

View File

@ -35,6 +35,9 @@
.BI "\-r\fP, \fB\-\-revision" " version"
]
[
.BI "\-M" " arg"
]
[
.BI "\-F\fP, \fB\-\-rebuild"
]
[
@ -107,6 +110,12 @@ small packages for distribution with operating systems such as Debian
GNU/Linux for example. Please refer to the packaging documentation in
the ICU source distribution for further information on the use of this
mode.
.PP
.B pkgdata
relies on GNU
.BR make (1)
to do the packaging, and generates a makefile with rules to build
and package the correct data.
.SH OPTIONS
.TP
.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
@ -175,6 +184,12 @@ assumed to be
.IR major .0
for versioning purposes.
.TP
.BI "\-M" " arg"
Pass
.I arg
to
.BR make (1).
.TP
.BI "\-F\fP, \fB\-\-rebuild"
Force the rebuilding of all data and their repackaging.
.TP

View File

@ -72,7 +72,8 @@ static UOption options[]={
/*13*/ UOPTION_DEF( "install", 'I', UOPT_REQUIRES_ARG),
/*14*/ UOPTION_SOURCEDIR ,
/*15*/ UOPTION_DEF( "entrypoint", 'e', UOPT_REQUIRES_ARG),
/*16*/ UOPTION_DEF( "revision", 'r', UOPT_REQUIRES_ARG)
/*16*/ UOPTION_DEF( "revision", 'r', UOPT_REQUIRES_ARG),
/*17*/ UOPTION_DEF( 0, 'M', UOPT_REQUIRES_ARG)
};
const char options_help[][160]={
@ -96,7 +97,8 @@ const char options_help[][160]={
"Install the data (specify target)",
"Specify a custom source directory",
"Specify a custom entrypoint name (default: short name)",
"Specify a version when packaging in DLL mode"
"Specify a version when packaging in DLL mode",
"Pass the next argument to make(1)"
};
int
@ -113,6 +115,7 @@ main(int argc, char* argv[]) {
progname = argv[0];
options[2].value = "common";
options[17].value = "";
/* read command line options */
argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options);
@ -157,10 +160,11 @@ main(int argc, char* argv[]) {
fprintf(stderr, "\n options:\n");
for(i=0;i<(sizeof(options)/sizeof(options[0]));i++) {
fprintf(stderr, "%-5s -%c or --%-10s %s\n",
fprintf(stderr, "%-5s -%c %s%-10s %s\n",
(i<2?"[REQ]":""),
options[i].shortName,
options[i].longName,
options[i].longName ? "or --" : " ",
options[i].longName ? options[i].longName : "",
options_help[i]);
}
@ -182,6 +186,7 @@ main(int argc, char* argv[]) {
o.mode = options[2].value;
o.version = options[16].doesOccur ? options[16].value : 0;
o.makeArgs = options[17].value;
o.fcn = NULL;
@ -338,32 +343,35 @@ static int executeMakefile(const UPKGOptions *o)
/*getcwd(pwd, 1024);*/
#ifdef WIN32
sprintf(cmd, "%s %s%s -f \"%s\" %s %s %s",
sprintf(cmd, "%s %s%s -f \"%s\" %s %s %s %s",
make,
o->install ? "INSTALLTO=" : "",
o->install ? o->install : "",
o->makeFile,
o->clean ? "clean" : "",
o->rebuild ? "rebuild" : "",
o->install ? "install" : "");
o->install ? "install" : "",
o->makeArgs);
#elif OS400
sprintf(cmd, "CALL GNU/GMAKE PARM(%s%s%s '-f' '%s' %s %s %s)",
sprintf(cmd, "CALL GNU/GMAKE PARM(%s%s%s '-f' '%s' %s %s %s %s)",
o->install ? "'INSTALLTO=" : "",
o->install ? o->install : "",
o->install ? "'" : "",
o->makeFile,
o->clean ? "'clean'" : "",
o->rebuild ? "'rebuild'" : "",
o->install ? "'install'" : "");
o->install ? "'install'" : "",
o->makeArgs);
#else
sprintf(cmd, "%s %s%s -f %s %s %s %s",
sprintf(cmd, "%s %s%s -f %s %s %s %s %s",
make,
o->install ? "INSTALLTO=" : "",
o->install ? o->install : "",
o->makeFile,
o->clean ? "clean" : "",
o->rebuild ? "rebuild" : "",
o->install ? "install" : "");
o->install ? "install" : "",
o->makeArgs);
#endif
if(o->verbose) {
puts(cmd);

View File

@ -99,10 +99,12 @@ typedef struct UPKGOptions_
const char *options; /* Options arg */
const char *mode; /* Mode of building */
const char *version; /* Library version */
const char *makeArgs; /* XXX Should be a CharList! */
const char *comment; /* comment string */
const char *makeFile; /* Makefile path */
const char *install; /* Where to install to (NULL = don't install) */
const char *icuroot; /* where does ICU lives */
UBool rebuild;
UBool clean;
UBool nooutput;