OLD | NEW |
(Empty) | |
| 1 """Writes the icupkg.inc file pkgdata needs to build an object file.""" |
| 2 |
| 3 from __future__ import print_function |
| 4 |
| 5 import argparse |
| 6 import os |
| 7 import sys |
| 8 |
| 9 |
| 10 def main(): |
| 11 parser = argparse.ArgumentParser( |
| 12 description=('Generates an icupkg.inc file to be used by pkgdata.')) |
| 13 |
| 14 parser.add_argument('--outfile', |
| 15 required=True, |
| 16 help='File that will contain an ICU formatted list.') |
| 17 |
| 18 parser.add_argument('--ver', |
| 19 required=True, |
| 20 help='The ICU version.') |
| 21 |
| 22 parser.add_argument('--icu-dir', |
| 23 required=True, |
| 24 help='The directory where icu can be found.') |
| 25 |
| 26 args = parser.parse_args() |
| 27 |
| 28 with open(args.outfile, "w") as out: |
| 29 out.write("""\ |
| 30 GENCCODE_ASSEMBLY_TYPE=-a gcc |
| 31 SO=so |
| 32 SOBJ=so |
| 33 A=a |
| 34 LIBPREFIX=lib |
| 35 LIB_EXT_ORDER=.%(ver)s.1 |
| 36 COMPILE=gcc -D_REENTRANT -DU_HAVE_ELF_H=1 -DU_HAVE_ATOMIC=1 -DU_ATTRIBUTE_DEPR
ECATED= -O3 -std=c99 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototy
pes -Wwrite-strings -c |
| 37 LIBFLAGS=-I%(icu_dir)s/source/common -DPIC -fPIC |
| 38 GENLIB=gcc -O3 -std=c99 -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prot
otypes -Wwrite-strings -shared -Wl,-Bsymbolic |
| 39 LDICUDTFLAGS=-nodefaultlibs -nostdlib |
| 40 LD_SONAME=-Wl,-soname -Wl, |
| 41 RPATH_FLAGS= |
| 42 BIR_LDFLAGS=-Wl,-Bsymbolic |
| 43 AR=ar |
| 44 ARFLAGS=r |
| 45 RANLIB=ranlib |
| 46 INSTALL_CMD=/usr/bin/install -c |
| 47 """ % { |
| 48 'ver': args.ver, |
| 49 'icu_dir': args.icu_dir, |
| 50 }) |
| 51 |
| 52 if __name__ == '__main__': |
| 53 main() |
OLD | NEW |