changeset 1406:4d2719ecfec6

jars used during windows build are now saved to distribution image * Makefile.am: (printvars) new target to print out all used variables (printvarsfile) new target to save all variables to file. Those is only way I found to extract jars from configure in without manual enumeration. (uninstall-local) on windows, removes copied dependence. (install-data-local) on windows, copy all used jars. Some selected jars are duplicated in runtime dependeces
author Jiri Vanek <jvanek@redhat.com>
date Wed, 26 Apr 2017 19:28:12 +0200
parents 279d81001d01
children ba53197d6257
files ChangeLog Makefile.am
diffstat 2 files changed, 50 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Apr 26 19:07:31 2017 +0200
+++ b/ChangeLog	Wed Apr 26 19:28:12 2017 +0200
@@ -1,3 +1,13 @@
+2017-04-26  Jiri Vanek <jvanek@redhat.com>
+
+	jars used during windows build are now saved to distribution image
+	* Makefile.am: (printvars) new target to print out all used variables
+	(printvarsfile) new target to save all variables to file. Those is only way
+	I found to extract jars from configure in without manual enumeration.
+	(uninstall-local) on windows, removes copied dependence. (install-data-local)
+	on windows, copy all used jars. Some selected jars are duplicated in runtime
+	dependeces
+
 2017-04-26  Jiri Vanek <jvanek@redhat.com>
 
 	* netx/net/sourceforge/jnlp/runtime/Boot.java: added support for jnlp:other_protocol:// handlig
--- a/Makefile.am	Wed Apr 26 19:07:31 2017 +0200
+++ b/Makefile.am	Wed Apr 26 19:28:12 2017 +0200
@@ -34,6 +34,9 @@
 export ICONS_DEST_DIR=$(DESTDIR)$(datadir)/pixmaps
 export BASH_CMPL_DEST_DIR=$(DESTDIR)$(sysconfdir)/bash_completion.d
 
+export WIN_ALL_DEPS=$(DESTDIR)$(prefix)/win-deps-all
+export WIN_RUN_DEPS=$(DESTDIR)$(prefix)/win-deps-runtime
+
 export REPORT_STYLES_DIRNAME=report-styles
 
 export TESTS_SRCDIR=$(TOP_SRC_DIR)/tests
@@ -318,7 +321,9 @@
 	${INSTALL_PROGRAM} launcher.build/$(policyeditor) $(DESTDIR)$(bindir)
 
 # all generated manpages are installed in swarm
-install-data-local:
+# all windows depndences are copied for windows build, and known one are copied/removed as necessary
+# the makefile variables are used in favor of global variables, but maybe they will need to get mixed together
+install-data-local: printvarsfile
 	${mkinstalldirs} -d $(DESTDIR)$(mandir)
 	cp -r "$(DOCS_DIR)/man/"* $(DESTDIR)$(mandir)/
 if ENABLE_DOCS
@@ -336,6 +341,27 @@
 	 done)
 endif
 endif
+if WINDOWS
+	mkdir $(WIN_ALL_DEPS)
+	mkdir $(WIN_RUN_DEPS)
+	JARSVARS=` ( set -o posix ; set ) | sed "s/.*=//"  | grep \\.jar$$ ` ; \
+	JARSMAKE=` cat $(TOP_BUILD_DIR)/printvarsfile | sed  "s/.*=//"  |  grep \\.jar$$ ` ; \
+	for JAR in $$JARSMAKE ; do \
+	  if [ -f $ $$JAR ] ; then \
+	    cp -v  $$JAR $(WIN_ALL_DEPS)/ ; \
+	  fi ; \
+	done ;
+	rm -f $(WIN_ALL_DEPS)/jar ;
+	for JAR in `ls $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/*.jar` ; do \
+	  rm -v $(WIN_ALL_DEPS)/`basename $$JAR` ; \
+	done;
+if WITH_RHINO
+	cp -v  $(RHINO_JAR) $(WIN_RUN_DEPS)/
+endif
+if HAVE_TAGSOUP
+	cp -v  $(TAGSOUP_JAR)   $(WIN_RUN_DEPS)/
+endif
+endif
 
 # all generated manpages must be removed one by one
 uninstall-local:
@@ -357,6 +383,10 @@
 	rm -f $(DESTDIR)$(bindir)/$(policyeditor)
 	rm -rf $(DESTDIR)$(htmldir)
 	rm -f $(BASH_CMPL_DEST_DIR)/icedteaweb-completion
+if WINDOWS
+	rm -rf $(WIN_ALL_DEPS)
+	rm -rf $(WIN_RUN_DEPS)
+endif
 
 # Plugin
 
@@ -1614,6 +1644,15 @@
 	touch stamps/plugin-tests.stamp
 endif
 
+
+printvarsfile:
+	$(MAKE) printvars > $@
+
+printvars:
+	$(foreach v, $(.VARIABLES), $(info $(v)=$($(v))))
+
+
+
 # Target Aliases
 # ===============