diff --git a/icu4c/source/common/Makefile.in b/icu4c/source/common/Makefile.in index 621eeacf86f..bb273489510 100644 --- a/icu4c/source/common/Makefile.in +++ b/icu4c/source/common/Makefile.in @@ -69,7 +69,7 @@ endif ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I. -I$(srcdir) -DICU_DATA_DIR=\"$(pkgdatadir)/$(VERSION)/\" -DUDATA_SO_SUFFIX=\".$(SO)\" -DU_COMMON_LIBNAME=\"$(FINAL_SO_TARGET)\" +CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I. -I$(srcdir) -DICU_DATA_DIR=\"$(pkgdatadir)/$(VERSION)/\" -DUDATA_SO_SUFFIX=\".$(SO)\" -DU_COMMON_LIBNAME=\"$(FINAL_SO_TARGET)\" CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ @@ -115,10 +115,10 @@ install-local: install-headers install-library install-library: all-local $(mkinstalldirs) $(DESTDIR)$(libdir) ifneq ($(ENABLE_STATIC),) - $(INSTALL-S) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) endif ifneq ($(ENABLE_SHARED),) - $(INSTALL-S) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) + $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) cd $(DESTDIR)$(libdir) && $(RM) $(MIDDLE_SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) cd $(DESTDIR)$(libdir) && $(RM) $(SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(SO_TARGET) diff --git a/icu4c/source/config/Makefile.inc.in b/icu4c/source/config/Makefile.inc.in index ad51113b213..16e58215a77 100644 --- a/icu4c/source/config/Makefile.inc.in +++ b/icu4c/source/config/Makefile.inc.in @@ -2,7 +2,7 @@ #****************************************************************************** # Copyright (C) 1999, International Business Machines # Corporation and others. All Rights Reserved. -# $Revision: 1.5 $ +# $Revision: 1.6 $ #****************************************************************************** # This Makefile is designed to be included into projects which make use # of the ICU. @@ -10,7 +10,7 @@ SHELL=@SHELL@ CFLAGS=@CFLAGS@ -CPPFLAGS=@CPPFLAGS@ -I$(prefix)/include +CPPFLAGS=@CPPFLAGS@ $(LIBCPPFLAGS) -I$(prefix)/include CXXFLAGS=@CXXFLAGS@ FFLAGS=@FFLAGS@ DEFS=@DEFS@ diff --git a/icu4c/source/config/mh-aix b/icu4c/source/config/mh-aix index d0ace8e1b0e..17e0559db0f 100644 --- a/icu4c/source/config/mh-aix +++ b/icu4c/source/config/mh-aix @@ -37,9 +37,9 @@ LIBICU = libicu- SO= a RMV = rm -rf -## Platform command to remove or move executable target -INSTALL-S = $(INSTALL) - +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-aix-va b/icu4c/source/config/mh-aix-va index bf6c6106a31..9d254d5eb1c 100644 --- a/icu4c/source/config/mh-aix-va +++ b/icu4c/source/config/mh-aix-va @@ -37,8 +37,9 @@ LIBICU = libicu- SO= a RMV = rm -rf -## Platform command to remove or move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs diff --git a/icu4c/source/config/mh-darwin b/icu4c/source/config/mh-darwin index a40ffcf29a5..44e697419e0 100644 --- a/icu4c/source/config/mh-darwin +++ b/icu4c/source/config/mh-darwin @@ -36,8 +36,9 @@ SO= dylib ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-freebsd b/icu4c/source/config/mh-freebsd index 33d3d5cdcd9..00e0d9d74f1 100644 --- a/icu4c/source/config/mh-freebsd +++ b/icu4c/source/config/mh-freebsd @@ -35,8 +35,9 @@ SO= so ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-hpux-acc b/icu4c/source/config/mh-hpux-acc index a82e3cacfd3..764126ca1de 100644 --- a/icu4c/source/config/mh-hpux-acc +++ b/icu4c/source/config/mh-hpux-acc @@ -38,8 +38,9 @@ SO= sl ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-hpux-cc b/icu4c/source/config/mh-hpux-cc index 14dc79538cb..4cb80b50c73 100644 --- a/icu4c/source/config/mh-hpux-cc +++ b/icu4c/source/config/mh-hpux-cc @@ -45,8 +45,9 @@ SO= sl ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-irix b/icu4c/source/config/mh-irix index 8ca65789db2..e9ad6315c8f 100644 --- a/icu4c/source/config/mh-irix +++ b/icu4c/source/config/mh-irix @@ -43,8 +43,9 @@ SO= so ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-linux b/icu4c/source/config/mh-linux index 25672216abe..9493fa3e275 100644 --- a/icu4c/source/config/mh-linux +++ b/icu4c/source/config/mh-linux @@ -47,8 +47,9 @@ SO= so ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-os390 b/icu4c/source/config/mh-os390 index 3a800e0e59d..ac6736eb401 100644 --- a/icu4c/source/config/mh-os390 +++ b/icu4c/source/config/mh-os390 @@ -67,8 +67,9 @@ SO= dll ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= $(top_builddir)/common/libicu-uc.x diff --git a/icu4c/source/config/mh-os400 b/icu4c/source/config/mh-os400 index ac8570fd504..b13c1f32b94 100644 --- a/icu4c/source/config/mh-os400 +++ b/icu4c/source/config/mh-os400 @@ -41,7 +41,9 @@ SO= o ## Platform command to remove or move executable target RMV = del -INSTALL-S = cp -fph +## Platform commands to remove or move executable and library targets +INSTALL-S = cp -fph +INSTALL-L = $(INSTALL-S) ## Link commands to link to ICU service programs LIBICU-UC = $(top_srcdir)/common/libicuuc.o diff --git a/icu4c/source/config/mh-ptx b/icu4c/source/config/mh-ptx index 5e09d17d9e4..386fbde31f2 100644 --- a/icu4c/source/config/mh-ptx +++ b/icu4c/source/config/mh-ptx @@ -36,8 +36,9 @@ SO= so ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-solaris b/icu4c/source/config/mh-solaris index 1322dd17b92..4d87e89b5b9 100644 --- a/icu4c/source/config/mh-solaris +++ b/icu4c/source/config/mh-solaris @@ -37,8 +37,9 @@ SO= so ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-solaris-gcc b/icu4c/source/config/mh-solaris-gcc index 3b809ca4773..b331dbdeb0a 100644 --- a/icu4c/source/config/mh-solaris-gcc +++ b/icu4c/source/config/mh-solaris-gcc @@ -42,8 +42,9 @@ SO= so ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/config/mh-solaris-sparcv9 b/icu4c/source/config/mh-solaris-sparcv9 index b10c25f9556..e5332092050 100644 --- a/icu4c/source/config/mh-solaris-sparcv9 +++ b/icu4c/source/config/mh-solaris-sparcv9 @@ -36,8 +36,9 @@ SO= so ## Force removal [for make clean] RMV = rm -rf -## Platform command to move executable target -INSTALL-S = $(INSTALL) +## Platform commands to remove or move executable and library targets +INSTALL-S = $(INSTALL_PROGRAM) +INSTALL-L = $(INSTALL_DATA) ## Link commands to link to ICU libs LIBICU-UC= -L$(top_builddir)/common -licu-uc diff --git a/icu4c/source/extra/ustdio/Makefile.in b/icu4c/source/extra/ustdio/Makefile.in index 005566f0363..d7f4d139393 100644 --- a/icu4c/source/extra/ustdio/Makefile.in +++ b/icu4c/source/extra/ustdio/Makefile.in @@ -69,11 +69,14 @@ endif ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n +CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ -LDFLAGS = @LDFLAGS@ \ -$(LD_RPATH)$(LD_RPATH_PRE)$(libdir)@ld_rpath_suf@$(LD_RPATH_PRE)$(top_builddir)/common@ld_rpath_suf@$(LD_RPATH_PRE)$(top_builddir)/i18n +ENABLE_RPATH = @ENABLE_RPATH@ +ifeq ($(ENABLE_RPATH),YES) +RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) +endif +LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) LIBS = $(LIBICU-UC) $(LIBICU-I18N) @LIBS@ OBJECTS = locbund.o loccache.o ufile.o ufmt_cmn.o uprintf.o uprntf_p.o \ @@ -105,10 +108,10 @@ install-local: all-local install-headers install-library install-library: all-local $(mkinstalldirs) $(DESTDIR)$(libdir) ifneq ($(ENABLE_STATIC),) - $(INSTALL-S) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) endif ifneq ($(ENABLE_SHARED),) - $(INSTALL-S) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) + $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) cd $(DESTDIR)$(libdir) && $(RM) $(MIDDLE_SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) cd $(DESTDIR)$(libdir) && $(RM) $(SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(SO_TARGET) diff --git a/icu4c/source/i18n/Makefile.in b/icu4c/source/i18n/Makefile.in index 39b6c3526b1..fa29d710f8a 100644 --- a/icu4c/source/i18n/Makefile.in +++ b/icu4c/source/i18n/Makefile.in @@ -63,10 +63,14 @@ endif ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(srcdir) -I$(top_builddir)/common -I$(top_srcdir)/common +CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(srcdir) -I$(top_builddir)/common -I$(top_srcdir)/common CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ -LDFLAGS = @LDFLAGS@ $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) +ENABLE_RPATH = @ENABLE_RPATH@ +ifeq ($(ENABLE_RPATH),YES) +RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) +endif +LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) LIBS = $(LIBICU-UC) @LIBS@ OBJECTS = brkiter.o calendar.o chbkdat.o choicfmt.o colcache.o \ @@ -108,10 +112,10 @@ install-local: install-headers install-library install-library: all-local $(mkinstalldirs) $(DESTDIR)$(libdir) ifneq ($(ENABLE_STATIC),) - $(INSTALL-S) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) endif ifneq ($(ENABLE_SHARED),) - $(INSTALL-S) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) + $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) cd $(DESTDIR)$(libdir) && $(RM) $(MIDDLE_SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) cd $(DESTDIR)$(libdir) && $(RM) $(SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(SO_TARGET) diff --git a/icu4c/source/tools/pkgdata/Makefile.in b/icu4c/source/tools/pkgdata/Makefile.in index 2e1111dbf27..c5824659c67 100644 --- a/icu4c/source/tools/pkgdata/Makefile.in +++ b/icu4c/source/tools/pkgdata/Makefile.in @@ -52,15 +52,16 @@ DEFS = @DEFS@ CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(srcdir)/../toolutil -DUDATA_SO_SUFFIX=\".$(SO)\" CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ -LDFLAGS = @LDFLAGS@ \ -$(LD_RPATH)$(LD_RPATH_PRE)$(top_builddir)/common@ld_rpath_suf@$(LD_RPATH_PRE)$(top_builddir)/tools/toolutil@ld_rpath_suf@$(LD_RPATH_PRE)$(libdir) +ifeq ($(ENABLE_RPATH),YES) +RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) +endif +LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) LIBS = $(LIBICU-TOOLUTIL) $(LIBICU-UC) @LIBS@ @LIB_M@ OBJECTS = pkgdata.o pkgtypes.o gmake.o dllmode.o cmnmode.o DEPS = $(OBJECTS:.o=.d) - ## List of phony targets .PHONY : all all-local install install-local clean clean-local \ distclean distclean-local dist dist-local check \ diff --git a/icu4c/source/tools/pkgdata/cmnmode.c b/icu4c/source/tools/pkgdata/cmnmode.c index 7a6a8a11224..667abf930f2 100644 --- a/icu4c/source/tools/pkgdata/cmnmode.c +++ b/icu4c/source/tools/pkgdata/cmnmode.c @@ -95,7 +95,7 @@ void pkg_mode_common(UPKGOptions *o, FileStream *makefile, UErrorCode *status) T_FileStream_writeLine(makefile, "\n\n"); sprintf(tmp, "install: $(TARGET)\n" - "\t$(INSTALL-S) $(TARGET) $(INSTALLTO)%s$(TARGETNAME)\n\n", + "\t$(INSTALL_DATA) $(TARGET) $(INSTALLTO)%s$(TARGETNAME)\n\n", U_FILE_SEP_STRING); T_FileStream_writeLine(makefile, tmp); diff --git a/icu4c/source/tools/pkgdata/dllmode.c b/icu4c/source/tools/pkgdata/dllmode.c index 38a792ba360..88d4d002941 100644 --- a/icu4c/source/tools/pkgdata/dllmode.c +++ b/icu4c/source/tools/pkgdata/dllmode.c @@ -204,7 +204,7 @@ void pkg_mode_dll(UPKGOptions *o, FileStream *makefile, UErrorCode *status) T_FileStream_writeLine(makefile, "\n\n"); T_FileStream_writeLine(makefile, "install: $(TARGETDIR)/$(TARGET)\n" - "\t$(INSTALL-S) $(TARGETDIR)/$(TARGET) $(INSTALLTO)/$(TARGET)\n\n"); + "\t$(INSTALL-L) $(TARGETDIR)/$(TARGET) $(INSTALLTO)/$(TARGET)\n\n"); *status = U_ZERO_ERROR; diff --git a/icu4c/source/tools/toolutil/Makefile.in b/icu4c/source/tools/toolutil/Makefile.in index 32f96305c78..0799828bc43 100644 --- a/icu4c/source/tools/toolutil/Makefile.in +++ b/icu4c/source/tools/toolutil/Makefile.in @@ -64,10 +64,14 @@ endif ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) DEFS = @DEFS@ -CPPFLAGS = @CPPFLAGS@ -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw +CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ -LDFLAGS = @LDFLAGS@ $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) +ENABLE_RPATH = @ENABLE_RPATH@ +ifeq ($(ENABLE_RPATH),YES) +RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) +endif +LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) LIBS = $(LIBICU-UC) @LIBS@ OBJECTS = toolutil.o unewdata.o ucmpwrit.o uoptions.o uparse.o @@ -96,10 +100,10 @@ install-local: install-library install-library: all-local $(mkinstalldirs) $(DESTDIR)$(libdir) ifneq ($(ENABLE_STATIC),) - $(INSTALL-S) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) + $(INSTALL-D) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) endif ifneq ($(ENABLE_SHARED),) - $(INSTALL-S) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) + $(INSTALL-D) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) cd $(DESTDIR)$(libdir) && $(RM) $(MIDDLE_SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) cd $(DESTDIR)$(libdir) && $(RM) $(SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(SO_TARGET)