# HG changeset patch # User Andrew John Hughes # Date 1296602686 0 # Node ID 8e02f38c3b6aa4501fd61f5502ceae6f278d5c6e # Parent 0db0d2392ef2c0d88348b4193c3cbeb04e76b9b8 Support DESTDIR correctly when installing to an empty directory. 2010-02-01 Andrew John Hughes Fix issues with use of DESTDIR pointing to an empty tree for staging. * Makefile.am: (install-exec-local): Create just bin and jre/lib for the main (NetX) install, creating jre/lib/$(INSTALL_ARCH_DIR) only for the plugin install. Amalgamate the if blocks and test for ${prefix}/jre/bin not ${DESTDIR}${prefix}/jre/bin to ensure we check the installed JDK and not the staging tree. Move plugin installation to the end to avoid mkinstalldirs from failing by trying to create ${DESTDIR}${prefix}/bin a second time. diff -r 0db0d2392ef2 -r 8e02f38c3b6a ChangeLog --- a/ChangeLog Tue Feb 01 21:20:37 2011 +0000 +++ b/ChangeLog Tue Feb 01 23:24:46 2011 +0000 @@ -1,3 +1,18 @@ +2010-02-01 Andrew John Hughes + + Fix issues with use of DESTDIR pointing + to an empty tree for staging. + * Makefile.am: + (install-exec-local): Create just bin and + jre/lib for the main (NetX) install, creating + jre/lib/$(INSTALL_ARCH_DIR) only for the plugin + install. Amalgamate the if blocks and test for + ${prefix}/jre/bin not ${DESTDIR}${prefix}/jre/bin + to ensure we check the installed JDK and not the + staging tree. Move plugin installation to the end + to avoid mkinstalldirs from failing by trying to + create ${DESTDIR}${prefix}/bin a second time. + 2010-02-01 Andrew John Hughes * configure.ac: Call IT_CHECK_JRE_PREFIX macro diff -r 0db0d2392ef2 -r 8e02f38c3b6a Makefile.am --- a/Makefile.am Tue Feb 01 21:20:37 2011 +0000 +++ b/Makefile.am Tue Feb 01 23:24:46 2011 +0000 @@ -102,32 +102,32 @@ clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs install-exec-local: - ${mkinstalldirs} $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR) -if ENABLE_PLUGIN - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR)/ - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) - ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar -endif + ${mkinstalldirs} $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/netx.jar ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(prefix)/bin - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ + ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib + ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(prefix)/bin + if [ -d $(prefix)/jre/bin ] ; then \ + ${mkinstalldirs} $(DESTDIR)$(prefix)/jre/bin ; \ if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ fi ; \ + if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ + rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ + fi ; \ if [ ! -e $(prefix)/jre/bin/javaws ] ; then \ ln -s ../../bin/javaws $(DESTDIR)$(prefix)/jre/bin ; \ fi ; \ - fi - ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib - ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(prefix)/bin - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ - fi ; \ if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \ ln -s ../../bin/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \ fi ; \ fi +if ENABLE_PLUGIN + ${mkinstalldirs} $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR) + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR)/ + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) + ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar +endif install-data-local: ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1