ICU-4148 Allow pkgdata to run with GNU make on Windows when WIN32 is defined.
X-SVN-Rev: 16713
This commit is contained in:
parent
0232219444
commit
716599aa07
@ -252,4 +252,7 @@ typedef unsigned int uint32_t;
|
||||
/* Programs used by ICU code */
|
||||
/*===========================================================================*/
|
||||
|
||||
#ifndef U_MAKE
|
||||
#define U_MAKE "nmake"
|
||||
#define U_MAKE_IS_NMAKE 1
|
||||
#endif
|
||||
|
@ -121,9 +121,8 @@ LDLIBRARYPATH_ENVVAR = PATH
|
||||
# The type of assembly to write for generating an object file
|
||||
GENCCODE_ASSEMBLY=-a gcc-cygwin
|
||||
|
||||
# These are needed to allow the pkgdata nmake files to work
|
||||
PKGDATA_OPTS = -v
|
||||
PKGDATA_INVOKE_OPTS = MAKEFLAGS=
|
||||
# These are needed to allow the pkgdata GNU make files to work
|
||||
CPPFLAGS +=-DU_MAKE=\"$(MAKE)\"
|
||||
|
||||
## End Cygwin/MinGW specific setup
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/putil.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef U_MAKE_IS_NMAKE
|
||||
#include "cmemory.h"
|
||||
#include "cstring.h"
|
||||
#include "filestrm.h"
|
||||
@ -285,5 +285,5 @@ void pkg_mode_dll(UPKGOptions *o, FileStream *makefile, UErrorCode *status)
|
||||
|
||||
}
|
||||
|
||||
#endif /* #ifndef WIN32 */
|
||||
#endif /* #ifndef U_MAKE_IS_NMAKE */
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "cstring.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef U_MAKE_IS_NMAKE
|
||||
|
||||
char linebuf[2048];
|
||||
|
||||
|
@ -41,9 +41,9 @@ pkg_mak_writeFooter(FileStream *f, const UPKGOptions *o);
|
||||
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef U_MAKE_IS_NMAKE
|
||||
extern void pkg_mode_windows(UPKGOptions *o, FileStream *makefile, UErrorCode *status);
|
||||
#else /*#ifdef WIN32*/
|
||||
#else /*#ifdef U_MAKE_IS_NMAKE*/
|
||||
/**
|
||||
* Write stanzas for generating .o (and .c) files for each data file in 'o->filePaths'.
|
||||
* @param o Package options struct
|
||||
|
@ -59,17 +59,17 @@ static struct
|
||||
} modes[] =
|
||||
{
|
||||
{ "files", 0, pkg_mode_files, "Uses raw data files (no effect). Installation copies all files to the target location." },
|
||||
#ifdef WIN32
|
||||
#ifdef U_MAKE_IS_NMAKE
|
||||
{ "dll", "library", pkg_mode_windows, "Generates one common data file and one shared library, <package>.dll"},
|
||||
{ "common", "archive", pkg_mode_windows, "Generates just the common file, <package>.dat"},
|
||||
{ "static", "static", pkg_mode_windows, "Generates one statically linked library, " LIB_PREFIX "<package>" UDATA_LIB_SUFFIX }
|
||||
#else /*#ifdef WIN32*/
|
||||
#else /*#ifdef U_MAKE_IS_NMAKE*/
|
||||
#ifdef UDATA_SO_SUFFIX
|
||||
{ "dll", "library", pkg_mode_dll, "Generates one shared library, <package>" UDATA_SO_SUFFIX },
|
||||
#endif
|
||||
{ "common", "archive", pkg_mode_common, "Generates one common data file, <package>.dat" },
|
||||
{ "static", "static", pkg_mode_static, "Generates one statically linked library, " LIB_PREFIX "<package>" UDATA_LIB_SUFFIX }
|
||||
#endif /*#ifdef WIN32*/
|
||||
#endif /*#ifdef U_MAKE_IS_NMAKE*/
|
||||
};
|
||||
|
||||
static UOption options[]={
|
||||
@ -100,7 +100,7 @@ static UOption options[]={
|
||||
|
||||
const char options_help[][320]={
|
||||
"Set the data name",
|
||||
#ifdef WIN32
|
||||
#ifdef U_MAKE_IS_NMAKE
|
||||
"The directory where the ICU is located (e.g. <ICUROOT> which contains the bin directory)",
|
||||
#else
|
||||
"Specify options for the builder. (Autdetected if icu-config is available)",
|
||||
@ -171,7 +171,7 @@ main(int argc, char* argv[]) {
|
||||
/* Try to fill in from icu-config or equivalent */
|
||||
fillInMakefileFromICUConfig(&options[1]);
|
||||
}
|
||||
#ifdef WIN32
|
||||
#ifdef U_MAKE_IS_NMAKE
|
||||
else {
|
||||
fprintf(stderr, "Warning: You are using the deprecated -O option\n"
|
||||
"\tYou can fix this warning by installing pkgdata, gencmn and genccode\n"
|
||||
@ -287,7 +287,7 @@ main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
o.verbose = options[5].doesOccur;
|
||||
#ifdef WIN32 /* format is R:pathtoICU or D:pathtoICU */
|
||||
#ifdef U_MAKE_IS_NMAKE /* format is R:pathtoICU or D:pathtoICU */
|
||||
{
|
||||
char *pathstuff = (char *)options[1].value;
|
||||
if(options[1].value[uprv_strlen(options[1].value)-1] == '\\') {
|
||||
|
@ -105,7 +105,7 @@ void pkg_sttc_writeReadme(struct UPKGOptions_ *o, const char *libName, UErrorCod
|
||||
}
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef U_MAKE_IS_NMAKE
|
||||
|
||||
|
||||
#include "makefile.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "unicode/utypes.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef U_MAKE_IS_NMAKE
|
||||
|
||||
#include "unicode/putil.h"
|
||||
#include "cmemory.h"
|
||||
|
Loading…
Reference in New Issue
Block a user