Makefile.in 114 KB
Newer Older
1
# Makefile.in generated by automake 1.16.1 from Makefile.am.
2 3
# @configure_input@

4
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
90
@ENABLE_DOCS_TRUE@@HAVE_JAVA9_TRUE@am__append_1 = -source $(IT_LANGUAGE_SOURCE_VERSION)
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
	$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = netx.manifest jrunscript build.properties
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/build.properties.in \
	$(srcdir)/jrunscript.in $(srcdir)/netx.manifest.in AUTHORS \
	COPYING ChangeLog INSTALL NEWS README compile config.guess \
	config.sub install-sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
  if test -d "$(distdir)"; then \
    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
      && rm -rf "$(distdir)" \
      || { sleep 5 && rm -rf "$(distdir)"; }; \
  else :; fi
am__post_remove_distdir = $(am__remove_distdir)
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
ARCHFLAG = @ARCHFLAG@
ARCH_PREFIX = @ARCH_PREFIX@
ASM_AVAILABLE = @ASM_AVAILABLE@
ASM_JAR = @ASM_JAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BIN_BASH = @BIN_BASH@
BROWSER_TESTS_MODIFICATION = @BROWSER_TESTS_MODIFICATION@
BUILD_ARCH_DIR = @BUILD_ARCH_DIR@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CHROME = @CHROME@
CHROMIUM = @CHROMIUM@
164 165
COM_SUN_JNDI_TOOLKIT_URL_URLUTIL = @COM_SUN_JNDI_TOOLKIT_URL_URLUTIL@
COM_SUN_NET_SSL_INTERNAL_SSL_X509EXTENDEDTRUSTMANAGER = @COM_SUN_NET_SSL_INTERNAL_SSL_X509EXTENDEDTRUSTMANAGER@
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ECJ = @ECJ@
ECJ_JAR = @ECJ_JAR@
EPIPHANY = @EPIPHANY@
EXEEXT = @EXEEXT@
FIREFOX = @FIREFOX@
FULL_VERSION = @FULL_VERSION@
GCJ = @GCJ@
GLIB2_V_216_CFLAGS = @GLIB2_V_216_CFLAGS@
GLIB2_V_216_LIBS = @GLIB2_V_216_LIBS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
HAMCREST_AVAILABLE = @HAMCREST_AVAILABLE@
HAMCREST_JAR = @HAMCREST_JAR@
189
HEXDUMPENCODER = @HEXDUMPENCODER@
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
HG = @HG@
ICEDTEA_REVISION = @ICEDTEA_REVISION@
INSTALL = @INSTALL@
INSTALL_ARCH_DIR = @INSTALL_ARCH_DIR@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JACOCO_AVAILABLE = @JACOCO_AVAILABLE@
JACOCO_JAR = @JACOCO_JAR@
JAR = @JAR@
JARSIGNER = @JARSIGNER@
JAR_ACCEPTS_STDIN_LIST = @JAR_ACCEPTS_STDIN_LIST@
JAR_KNOWS_ATFILE = @JAR_KNOWS_ATFILE@
JAR_KNOWS_J_OPTIONS = @JAR_KNOWS_J_OPTIONS@
JAVA = @JAVA@
JAVAC = @JAVAC@
JAVADOC = @JAVADOC@
JAVADOC_KNOWS_J_OPTIONS = @JAVADOC_KNOWS_J_OPTIONS@
209 210 211 212
JAVA_NET_COOKIEHANDLER = @JAVA_NET_COOKIEHANDLER@
JAVA_NET_COOKIEMANAGER = @JAVA_NET_COOKIEMANAGER@
JAVA_NET_HTTPCOOKIE = @JAVA_NET_HTTPCOOKIE@
JAVA_UTIL_JAR_PACK200 = @JAVA_UTIL_JAR_PACK200@
213 214 215 216 217 218 219 220 221 222 223 224
JRE_ARCH_DIR = @JRE_ARCH_DIR@
JUNIT_AVAILABLE = @JUNIT_AVAILABLE@
JUNIT_JAR = @JUNIT_JAR@
KEYTOOL = @KEYTOOL@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MIDORI = @MIDORI@
MKDIR_P = @MKDIR_P@
225
MODULARJDK_ARGS_DIR = @MODULARJDK_ARGS_DIR@
226 227 228
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
MOZILLA_VERSION_COLLAPSED = @MOZILLA_VERSION_COLLAPSED@
229
MSLINKS_JAR = @MSLINKS_JAR@
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
OBJEXT = @OBJEXT@
OPERA = @OPERA@
PACK200 = @PACK200@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKGVERSION = @PKGVERSION@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RHINO_AVAILABLE = @RHINO_AVAILABLE@
RHINO_JAR = @RHINO_JAR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
250 251 252 253 254 255 256 257 258 259 260 261 262
SUN_APPLET_APPLETIMAGEREF = @SUN_APPLET_APPLETIMAGEREF@
SUN_AWT_WEMBEDDEDFRAME = @SUN_AWT_WEMBEDDEDFRAME@
SUN_AWT_X11_XEMBEDDEDFRAME = @SUN_AWT_X11_XEMBEDDEDFRAME@
SUN_MISC_JARINDEX = @SUN_MISC_JARINDEX@
SUN_MISC_LAUNCHER = @SUN_MISC_LAUNCHER@
SUN_NET_WWW_PROTOCOL_HTTP_HANDLER = @SUN_NET_WWW_PROTOCOL_HTTP_HANDLER@
SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE = @SUN_NET_WWW_PROTOCOL_JAR_URLJARFILE@
SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK = @SUN_NET_WWW_PROTOCOL_JAR_URLJARFILECALLBACK@
SUN_SECURITY_ACTION_GETPROPERTYACTION = @SUN_SECURITY_ACTION_GETPROPERTYACTION@
SUN_SECURITY_UTIL_HOSTNAMECHECKER = @SUN_SECURITY_UTIL_HOSTNAMECHECKER@
SUN_SECURITY_UTIL_SECURITYCONSTANTS = @SUN_SECURITY_UTIL_SECURITYCONSTANTS@
SUN_SECURITY_VALIDATOR_VALIDATOREXCEPTION = @SUN_SECURITY_VALIDATOR_VALIDATOREXCEPTION@
SUN_SECURITY_X509_X500NAME = @SUN_SECURITY_X509_X500NAME@
263 264 265 266 267 268
SYSTEM_JDK_DIR = @SYSTEM_JDK_DIR@
SYSTEM_JRE_DIR = @SYSTEM_JRE_DIR@
TAGSOUP_JAR = @TAGSOUP_JAR@
USING_ECJ = @USING_ECJ@
VERSION = @VERSION@
VERSION_DEFS = @VERSION_DEFS@
269 270 271
WIXGEN_AVAILABLE = @WIXGEN_AVAILABLE@
WIXGEN_JAR = @WIXGEN_JAR@
WIX_TOOLSET_DIR = @WIX_TOOLSET_DIR@
272 273 274 275 276 277 278 279 280 281 282 283 284
XSLTPROC = @XSLTPROC@
ZIP = @ZIP@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
285
bashcompdir = @bashcompdir@
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
326 327

# Functions to compose path/classpath
328 329
EMPTY := 
SPACE := $(EMPTY) $(EMPTY)
330 331 332 333 334 335 336 337 338 339
MODULARJDK_ARGS_FILE = itw-modularjdk.args

# javaws is program name, JAVAWS is used executable name.
# ITW 1.7 always do javaws and javaws.sh
JAVAWS = $(javaws)$(DESKTOP_SUFFIX)
ITWEB_SETTINGS = $(itweb_settings)$(DESKTOP_SUFFIX)
POLICYEDITOR = $(policyeditor)$(DESKTOP_SUFFIX)
LAUNCHERS = $(NATIVE_LAUNCHERS) $(SHELL_LAUNCHERS)
DESKTOP_FILES = javaws.desktop itweb-settings.desktop policyeditor.desktop
DESKTOP_IN_FILES = javaws.desktop.in itweb-settings.desktop.in policyeditor.desktop.in
340 341 342 343 344 345 346 347
# end of linking variables

# Build directories

# note this is *space* separated list, as composeclasspath is called on them in classpath usage
JUNIT_RUNTIME := $(JUNIT_JAR) $(HAMCREST_JAR)

# support for javaws -html needs plugin.jar on classpath. rest of javaws works of course without it.
348 349 350
# plugin jar is split into plugin.jar and jsobject.jar so it can run with modular (9+) jdk
@ENABLE_PLUGINJAR_TRUE@PLUGIN_JAR = $(datadir)/$(PACKAGE_NAME)/plugin.jar
@ENABLE_PLUGINJAR_TRUE@JSOBJECT_JAR = $(datadir)/$(PACKAGE_NAME)/jsobject.jar
351 352 353 354 355 356
NETX_JAR = $(datadir)/$(PACKAGE_NAME)/netx.jar
SPLASH_PNG = $(datadir)/$(PACKAGE_NAME)/javaws_splash.png
MODULARJDK_ARGS_LOCATION = $(DESTDIR)$(MODULARJDK_ARGS_DIR)/$(MODULARJDK_ARGS_FILE)
@HAVE_MSLINKS_FALSE@@HAVE_TAGSOUP_FALSE@NETX_EXCLUDE_SRCS = net.sourceforge.jnlp.MalformedXMLParser.java net.sourceforge.jnlp.util.WindowsDesktopEntry.java
@HAVE_MSLINKS_FALSE@@HAVE_TAGSOUP_TRUE@NETX_EXCLUDE_SRCS = net.sourceforge.jnlp.util.WindowsDesktopEntry.java
@HAVE_MSLINKS_TRUE@@HAVE_TAGSOUP_FALSE@NETX_EXCLUDE_SRCS = net.sourceforge.jnlp.MalformedXMLParser.java
357 358

# Conditional defintions
359 360 361 362 363 364 365
@HAVE_MSLINKS_TRUE@@HAVE_TAGSOUP_TRUE@NETX_EXCLUDE_SRCS = 
@ENABLE_NATIVE_PLUGIN_FALSE@CPPUNIT_IMPL = run-cpp-unit-tests-impl-placeholder
@ENABLE_NATIVE_PLUGIN_TRUE@CPPUNIT_IMPL = run-cpp-unit-tests-impl
@ENABLE_NATIVE_PLUGIN_FALSE@CPPUNIT_CLEAN_IMPL = clean-cpp-unit-tests-placeholder
@ENABLE_NATIVE_PLUGIN_TRUE@CPPUNIT_CLEAN_IMPL = clean-cpp-unit-tests-impl
@ENABLE_NATIVE_PLUGIN_FALSE@CPPUNIT_FRAMEWORK_CLEAN_IMPL = clean-unittest++-placeholder
@ENABLE_NATIVE_PLUGIN_TRUE@CPPUNIT_FRAMEWORK_CLEAN_IMPL = clean-unittest++-impl
366 367 368
@CP_SUPPORTS_REFLINK_TRUE@REFLINK = --reflink=auto
@SRC_DIR_HARDLINKABLE_FALSE@SRC_DIR_LINK = $(REFLINK)
@SRC_DIR_HARDLINKABLE_TRUE@SRC_DIR_LINK = -l
369 370 371 372
@ENABLE_DOCS_TRUE@JAVADOC_OPTS = -use -keywords -encoding UTF-8 \
@ENABLE_DOCS_TRUE@	-splitIndex -bottom '<font size="-1"> <a \
@ENABLE_DOCS_TRUE@	href="http://icedtea.classpath.org/bugzilla">Submit \
@ENABLE_DOCS_TRUE@	a bug or feature</a></font>' $(am__append_1)
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
@ENABLE_DOCS_TRUE@@JAVADOC_SUPPORTS_J_OPTIONS_TRUE@JAVADOC_MEM_OPTS = -J-Xmx1024m -J-Xms128m

# if you create netx-dist-tests-whitelist in top directory, and place "expr match" regexes
# (separate by one of IFS's values (most commonly space)) into it, you can control reproducers which compile or/xor run.
# if you need declare space in your regex, use \s as described in "expr match" documentation
ECHO_WHITELIST = if [ -f $(REPRODUCERS_CLASS_WHITELIST) ] ; then cat $(REPRODUCERS_CLASS_WHITELIST) ; else echo ".*" ; fi
@ENABLE_WHITELIST_FALSE@COMPILE_WHITELIST_FILTER = .*
@ENABLE_WHITELIST_TRUE@COMPILE_WHITELIST_FILTER = `$(ECHO_WHITELIST)`
@ENABLE_WHITELIST_FALSE@RUN_WHITELIST_FILTER = `$(ECHO_WHITELIST)`
@ENABLE_WHITELIST_TRUE@RUN_WHITELIST_FILTER = .*
@WITH_RHINO_FALSE@RHINO_TESTS = 
@WITH_RHINO_TRUE@RHINO_TESTS = stamps/check-pac-functions.stamp
@WITH_JUNIT_FALSE@JUNIT_TESTS = 
@WITH_JUNIT_TRUE@JUNIT_TESTS = stamps/run-netx-unit-tests.stamp
#end of exported autoconf copies

# binary names
javaws := $(shell echo javaws | sed '@program_transform_name@')
itweb_settings := $(shell echo itweb-settings | sed '@program_transform_name@')
policyeditor := $(shell echo policyeditor | sed '@program_transform_name@')
393 394 395 396
@WINDOWS_OR_INCLUDE_BATS_FALSE@fix_CRLF = 

# convert Unix newlines (LF) to DOS format:
@WINDOWS_OR_INCLUDE_BATS_TRUE@fix_CRLF = -e "s/\$$/\r/"
397 398 399 400 401

# the launcher needs to know $(bindir) and $(datadir) which can be different at
# make-time from configure-time
edit_launcher_script = sed \
  -e "s|[@]LAUNCHER_BOOTCLASSPATH[@]|$(LAUNCHER_BOOTCLASSPATH)|g" \
402
  -e "s|[@]JAVAWS_SPLASH_LOCATION[@]|$(SPLASH_PNG)|g" \
403 404 405 406
  -e "s|[@]JAVA[@]|$(JAVA)|g" \
  -e "s|[@]JRE[@]|$(SYSTEM_JRE_DIR)|g" \
  -e "s|[@]MAIN_CLASS[@]|$${MAIN_CLASS}|g" \
  -e "s|[@]BIN_LOCATION[@]|$${BIN_LOCATION}|g" \
407
  -e "s|[@]NETX_JAR[@]|$(NETX_JAR)|g" \
408 409
  -e "s|[@]PLUGIN_JAR[@]|$(PLUGIN_JAR)|g" \
  -e "s|[@]JSOBJECT_JAR[@]|$(JSOBJECT_JAR)|g" \
410 411 412 413 414
  -e "s|[@]MSLINKS_JAR[@]|$(MSLINKS_JAR)|g" \
  -e "s|[@]TAGSOUP_JAR[@]|$(TAGSOUP_JAR)|g" \
  -e "s|[@]RHINO_JAR[@]|$(RHINO_JAR)|g" \
  -e "s|[@]PROGRAM_NAME[@]|$${PROGRAM_NAME}|g" \
  -e "s|[@]MODULARJDK_ARGS_LOCATION[@]|$(MODULARJDK_ARGS_LOCATION)|g"
415 416 417 418 419 420 421 422


# Plugin

# IcedTeaPlugin.so.
# Separate compile and link invocations to ensure intermediate object
# is listed before -l options.  See:
# http://developer.mozilla.org/en/docs/XPCOM_Glue
423 424 425
@ENABLE_NATIVE_PLUGIN_TRUE@PLUGIN_SRC = IcedTeaNPPlugin.cc IcedTeaScriptablePluginObject.cc \
@ENABLE_NATIVE_PLUGIN_TRUE@        IcedTeaJavaRequestProcessor.cc IcedTeaPluginRequestProcessor.cc \
@ENABLE_NATIVE_PLUGIN_TRUE@		IcedTeaPluginUtils.cc IcedTeaParseProperties.cc
426

427 428 429
@ENABLE_NATIVE_PLUGIN_TRUE@PLUGIN_OBJECTS = IcedTeaNPPlugin.o IcedTeaScriptablePluginObject.o \
@ENABLE_NATIVE_PLUGIN_TRUE@        IcedTeaJavaRequestProcessor.o IcedTeaPluginRequestProcessor.o \
@ENABLE_NATIVE_PLUGIN_TRUE@		IcedTeaPluginUtils.o IcedTeaParseProperties.o
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454

all: all-am

.SUFFIXES:
am--refresh: Makefile
	@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    echo ' $(SHELL) ./config.status'; \
	    $(SHELL) ./config.status;; \
	  *) \
455 456
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	$(SHELL) ./config.status --recheck

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
netx.manifest: $(top_builddir)/config.status $(srcdir)/netx.manifest.in
	cd $(top_builddir) && $(SHELL) ./config.status $@
jrunscript: $(top_builddir)/config.status $(srcdir)/jrunscript.in
	cd $(top_builddir) && $(SHELL) ./config.status $@
build.properties: $(top_builddir)/config.status $(srcdir)/build.properties.in
	cd $(top_builddir) && $(SHELL) ./config.status $@
tags TAGS:

ctags CTAGS:

cscope cscopelist:


480 481 482 483
distdir: $(BUILT_SOURCES)
	$(MAKE) $(AM_MAKEFLAGS) distdir-am

distdir-am: $(DISTFILES)
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522
	$(am__remove_distdir)
	test -d "$(distdir)" || mkdir "$(distdir)"
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
	-test -n "$(am__skip_mode_fix)" \
	|| find "$(distdir)" -type d ! -perm -755 \
		-exec chmod u+rwx,go+rx {} \; -o \
	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
	|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
523
	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548
	$(am__post_remove_distdir)

dist-bzip2: distdir
	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
	$(am__post_remove_distdir)

dist-lzip: distdir
	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
	$(am__post_remove_distdir)

dist-xz: distdir
	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
	$(am__post_remove_distdir)

dist-tarZ: distdir
	@echo WARNING: "Support for distribution archives compressed with" \
		       "legacy program 'compress' is deprecated." >&2
	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
	$(am__post_remove_distdir)

dist-shar: distdir
	@echo WARNING: "Support for shar distribution archives is" \
	               "deprecated." >&2
	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
549
	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
	$(am__post_remove_distdir)

dist-zip: distdir
	-rm -f $(distdir).zip
	zip -rq $(distdir).zip $(distdir)
	$(am__post_remove_distdir)

dist dist-all:
	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
	$(am__post_remove_distdir)

# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
	case '$(DIST_ARCHIVES)' in \
	*.tar.gz*) \
567
	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
568 569 570 571 572 573 574 575 576
	*.tar.bz2*) \
	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
	*.tar.lz*) \
	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
	*.tar.xz*) \
	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
	*.tar.Z*) \
	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
	*.shar.gz*) \
577
	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768
	*.zip*) \
	  unzip $(distdir).zip ;;\
	esac
	chmod -R a-w $(distdir)
	chmod u+w $(distdir)
	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
	chmod a-w $(distdir)
	test -d $(distdir)/_build || exit 0; \
	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
	  && am__cwd=`pwd` \
	  && $(am__cd) $(distdir)/_build/sub \
	  && ../../configure \
	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
	    $(DISTCHECK_CONFIGURE_FLAGS) \
	    --srcdir=../.. --prefix="$$dc_install_base" \
	  && $(MAKE) $(AM_MAKEFLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
	  && $(MAKE) $(AM_MAKEFLAGS) check \
	  && $(MAKE) $(AM_MAKEFLAGS) install \
	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
	        distuninstallcheck \
	  && chmod -R a-w "$$dc_install_base" \
	  && ({ \
	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
	  && rm -rf "$$dc_destdir" \
	  && $(MAKE) $(AM_MAKEFLAGS) dist \
	  && rm -rf $(DIST_ARCHIVES) \
	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
	  && cd "$$am__cwd" \
	  || exit 1
	$(am__post_remove_distdir)
	@(echo "$(distdir) archives ready for distribution: "; \
	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
	@test -n '$(distuninstallcheck_dir)' || { \
	  echo 'ERROR: trying to run $@ with an empty' \
	       '$$(distuninstallcheck_dir)' >&2; \
	  exit 1; \
	}; \
	$(am__cd) '$(distuninstallcheck_dir)' || { \
	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
	  exit 1; \
	}; \
	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
	   || { echo "ERROR: files left after uninstall:" ; \
	        if test -n "$(DESTDIR)"; then \
	          echo "  (check DESTDIR support)"; \
	        fi ; \
	        $(distuninstallcheck_listfiles) ; \
	        exit 1; } >&2
distcleancheck: distclean
	@if test '$(srcdir)' = . ; then \
	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
	  exit 1 ; \
	fi
	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
	  || { echo "ERROR: files left in build directory after distclean:" ; \
	       $(distcleancheck_listfiles) ; \
	       exit 1; } >&2
check-am: all-am
	$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
all-am: Makefile all-local
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-local mostlyclean-am

distclean: distclean-am
	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am: install-data-local

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am: install-exec-local

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
	-rm -rf $(top_srcdir)/autom4te.cache
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am: uninstall-local

.MAKE: check-am install-am install-strip

.PHONY: all all-am all-local am--refresh check check-am check-local \
	clean clean-generic clean-local cscopelist-am ctags-am dist \
	dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
	dist-xz dist-zip distcheck distclean distclean-generic \
	distcleancheck distdir distuninstallcheck dvi dvi-am html \
	html-am info info-am install install-am install-data \
	install-data-am install-data-local install-dvi install-dvi-am \
	install-exec install-exec-am install-exec-local install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
	uninstall-am uninstall-local

.PRECIOUS: Makefile

769 770
@WINDOWS_TRUE@    export CLASSPATH_SEPARATOR = ;
@WINDOWS_FALSE@    export CLASSPATH_SEPARATOR = :
771
define joinsegments
772
$(subst $(SPACE),$(CLASSPATH_SEPARATOR),$(strip $1))
773 774
endef
define composeclasspath
775
$(if $(call joinsegments,$1),-classpath "$(call joinsegments,$1)",)
776 777 778
endef

# Source directories
779 780 781 782 783 784 785 786 787
@WINDOWS_TRUE@	export TOP_BUILD_DIR := $(shell cygpath -p -m "$(abs_top_builddir)")
@WINDOWS_TRUE@	export TOP_SRC_DIR := $(shell cygpath -p -m "$(abs_top_srcdir)")
@WINDOWS_TRUE@	export prefix := $(shell cygpath -p -m "$(prefix)")
@WINDOWS_TRUE@	export CPA="-v"
@WINDOWS_FALSE@	export TOP_BUILD_DIR = $(abs_top_builddir)
@WINDOWS_FALSE@	export TOP_SRC_DIR = $(abs_top_srcdir)
@WINDOWS_FALSE@	export CPA="-av"
@WINDOWS_FALSE@	WIN_LAUNCHERS=

788 789 790 791 792 793 794 795 796 797 798
@WINDOWS_OR_INCLUDE_BATS_TRUE@	WIN_LAUNCHERS=launcher.build/$(javaws).bat launcher.build/$(itweb_settings).bat  launcher.build/$(policyeditor).bat
@WINDOWS_OR_INCLUDE_BATS_FALSE@	WIN_LAUNCHERS=

@ENABLE_SHELL_LAUNCHERS_TRUE@	SHELL_LAUNCHERS=$(WIN_LAUNCHERS) launcher.build/$(MODULARJDK_ARGS_FILE) launcher.build/$(javaws).sh launcher.build/$(itweb_settings).sh launcher.build/$(policyeditor).sh
@ENABLE_SHELL_LAUNCHERS_FALSE@	SHELL_LAUNCHERS=

@ENABLE_NATIVE_LAUNCHERS_TRUE@	NATIVE_LAUNCHERS=launcher.build/$(MODULARJDK_ARGS_FILE) launcher.build/$(javaws) launcher.build/$(itweb_settings) launcher.build/$(policyeditor)
@ENABLE_NATIVE_LAUNCHERS_TRUE@	DESKTOP_SUFFIX=
@ENABLE_NATIVE_LAUNCHERS_FALSE@	NATIVE_LAUNCHERS=
@ENABLE_NATIVE_LAUNCHERS_FALSE@	DESKTOP_SUFFIX=.sh

799 800 801
export WIN_INSTALLER_DIR = $(TOP_BUILD_DIR)/win-installer.build
export WIN_INSTALLER_SRC_DIR = $(TOP_SRC_DIR)/win-installer
export NETX_DIR = $(TOP_BUILD_DIR)/netx.build
802
export DOCS_DIR=$(TOP_BUILD_DIR)/icedtea-web-docs/$(FULL_VERSION)
803
export NETX_SRCDIR = $(TOP_SRC_DIR)/netx
804 805
export NETX_RESOURCE_DIR=$(NETX_SRCDIR)/net/sourceforge/jnlp/resources
export ICONS_DEST_DIR=$(DESTDIR)$(datadir)/pixmaps
806 807 808 809
export BASH_CMPL_DEST_DIR=$(DESTDIR)@bashcompdir@

export WIN_ALL_DEPS=$(DESTDIR)$(prefix)/win-deps-all
export WIN_RUN_DEPS=$(DESTDIR)$(prefix)/win-deps-runtime
810
export LINUX_BIN_DIST_DEPS=$(DESTDIR)$(prefix)/linux-deps-runtime
811 812 813

export REPORT_STYLES_DIRNAME=report-styles

814 815
export TESTS_SRCDIR=$(TOP_SRC_DIR)/tests
export TESTS_DIR=$(TOP_BUILD_DIR)/tests.build
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845

export NETX_UNIT_TEST_SRCDIR=$(TESTS_SRCDIR)/netx/unit
export NETX_TEST_DIR=$(TESTS_DIR)/netx
export NETX_UNIT_TEST_DIR=$(NETX_TEST_DIR)/unit

export JUNIT_RUNNER_DIR=$(TESTS_DIR)/junit-runner
export JUNIT_RUNNER_SRCDIR=$(TESTS_SRCDIR)/junit-runner

export JACOCO_OPERATOR_DIR=$(TESTS_DIR)/jacoco-operator
export JACOCO_OPERATOR_SRCDIR=$(TESTS_SRCDIR)/jacoco-operator

export TEST_EXTENSIONS_SRCDIR=$(TESTS_SRCDIR)/test-extensions
export TEST_EXTENSIONS_TESTS_SRCDIR=$(TESTS_SRCDIR)/test-extensions-tests
export REPRODUCERS_TESTS_SRCDIR=$(TESTS_SRCDIR)/reproducers
export TEST_EXTENSIONS_DIR=$(TESTS_DIR)/test-extensions
export CPP_UNITTEST_FRAMEWORK_SRCDIR=$(TESTS_SRCDIR)/UnitTest++
export CPP_UNITTEST_SRCDIR=$(TESTS_SRCDIR)/cpp-unit-tests
export CPP_UNITTEST_DIR=$(TESTS_DIR)/cpp-unit-tests
export TEST_EXTENSIONS_COMPATIBILITY_SYMLINK=$(TESTS_DIR)/netx/jnlp_testsengine
export TEST_EXTENSIONS_TESTS_DIR=$(TESTS_DIR)/test-extensions-tests
export REPRODUCERS_TESTS_SERVER_DEPLOYDIR=$(TESTS_DIR)/reproducers_test_server_deploydir
export REPRODUCERS_BUILD_DIR=$(TESTS_DIR)/reproducers.classes
export PRIVATE_KEYSTORE_NAME=teststore.ks
export PRIVATE_KEYSTORE_PASS=123456789
export EXPORTED_TEST_CERT_PREFIX=icedteatests
export EXPORTED_TEST_CERT_SUFFIX=crt
export TEST_CERT_ALIAS=icedteaweb
export PUBLIC_KEYSTORE_STUB=icedtea-web/security/trusted.certs
export PUBLIC_KEYSTORE_PASS=changeit

846 847 848 849
export JUNIT_RUNNER_JAR=$(TOP_BUILD_DIR)/junit-runner.jar
export UNIT_CLASS_NAMES = $(TOP_BUILD_DIR)/unit_class_names
export REPRODUCERS_CLASS_NAMES = $(TOP_BUILD_DIR)/reproducers_class_names
export REPRODUCERS_CLASS_WHITELIST = $(TOP_SRC_DIR)/netx-dist-tests-whitelist
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872
export COVERAGE_JAVA_ARGS=-Xmx2G
export COVERAGE_MODIFIED_FILES=tests-output.xml ServerAccess-logs.xml stdout.log stderr.log all.log
export EMMA_BACKUP_SUFFIX=_noEmma
export EMMA_SUFFIX=_withEmma
export META_MANIFEST = META-INF/MANIFEST.MF
export SIGNED_REPRODUCERS=signed signed2
export SIMPLE_REPRODUCERS=simple
export CUSTOM_REPRODUCERS=custom
export ALL_NONCUSTOM_REPRODUCERS=$(SIMPLE_REPRODUCERS) $(SIGNED_REPRODUCERS)
export ALL_REPRODUCERS=$(ALL_NONCUSTOM_REPRODUCERS) $(CUSTOM_REPRODUCERS)

export JACOCO_PATH:=$(shell dirname "$(JACOCO_JAR)")
export JACOCO_AGENT=org.jacoco.agent.jar
export JACOCO_ANT=org.jacoco.ant.jar
export JACOCO_REPORT=org.jacoco.report.jar
export JACOCO_AGENTRT=org.jacoco.agent.rt.jar
export JACOCO_CORE=org.jacoco.core.jar
export JACOCO_JAVAWS_RESULTS=$(TEST_EXTENSIONS_DIR)/jacoco_javaws.exec
export JACOCO_PLUGIN_RESULTS=$(TEST_EXTENSIONS_DIR)/jacoco_plugin.exec
# space separated fragments for composeclasspath
export JACOCO_CLASSPATH=$(JACOCO_PATH)/$(JACOCO_CORE) $(JACOCO_PATH)/$(JACOCO_AGENT) $(JACOCO_PATH)/$(JACOCO_REPORT) $(JACOCO_PATH)/$(JACOCO_AGENTRT) $(JACOCO_PATH)/$(JACOCO_ANT) $(ASM_JAR)
export JACOCO_AGENT_SWITCH_BODY=-javaagent:$(JACOCO_PATH)/$(JACOCO_AGENTRT)
export JACOCO_BASE_EXCLUDE=org.junit.*:junit.*
873
export JACOCO_ADVANCED_EXCLUDE=:*jacoco*:java.lang.*:java.reflect.*:java.util.*:sun.reflect.*:javax.swing.*
874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898
export JACOCO_AGENT_SWITCH="$(JACOCO_AGENT_SWITCH_BODY)=excludes=$(JACOCO_BASE_EXCLUDE)$(JACOCO_ADVANCED_EXCLUDE),inclbootstrapclasses=true"
export JACOCO_AGENT_JAVAWS_SWITCH=\"$(JACOCO_AGENT_SWITCH),destfile=$(JACOCO_JAVAWS_RESULTS)\"
export JACOCO_AGENT_PLUGIN_SWITCH=\"$(JACOCO_AGENT_SWITCH),destfile=$(JACOCO_PLUGIN_RESULTS)\"
export JACOCO_OPERATOR_EXEC=$(SYSTEM_JRE_DIR)/bin/java $(COVERAGE_JAVA_ARGS) -cp $(call joinsegments, $(JACOCO_OPERATOR_DIR) $(JACOCO_CLASSPATH) .) org.jacoco.operator.Main

# linking variables
export PLUGIN_LINK_NAME=libjavaplugin.so
export MOZILLA_LOCAL_PLUGINDIR=${HOME}/.mozilla/plugins
export MOZILLA_GLOBAL64_PLUGINDIR=/usr/lib64/mozilla/plugins
export MOZILLA_GLOBAL32_PLUGINDIR=/usr/lib/mozilla/plugins
export OPERA_GLOBAL64_PLUGINDIR=/usr/lib64/opera/plugins
export OPERA_GLOBAL32_PLUGINDIR=/usr/lib/opera/plugins
export BUILT_PLUGIN_LIBRARY=IcedTeaPlugin.so
export CPP_UNITTEST_FRAMEWORK_BUILDDIR=$(CPP_UNITTEST_DIR)/UnitTest++
export CPP_UNITTEST_FRAMEWORK_LIB_NAME=libUnitTest++.a
export CPP_UNITTEST_FRAMEWORK_LIB=$(CPP_UNITTEST_FRAMEWORK_BUILDDIR)/$(CPP_UNITTEST_FRAMEWORK_LIB_NAME)
export CPP_UNITTEST_EXECUTABLE=$(CPP_UNITTEST_DIR)/IcedTeaPluginUnitTests
export MOZILLA_LOCAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origU
export MOZILLA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origMG
export OPERA_GLOBAL_BACKUP_FILE=${HOME}/$(PLUGIN_LINK_NAME).origOG
export MOZILLA_FAMILY_TEST= "$(FIREFOX)" != "" -o "$(CHROMIUM)" != "" -o "$(CHROME)" != "" -o "$(MIDORI)" != "" -o "$(EPIPHANY)" != "" 

# Flags
export IT_CFLAGS=$(CFLAGS) $(ARCHFLAG)
export IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
899 900
export IT_LANGUAGE_SOURCE_VERSION=8
export IT_CLASS_TARGET_VERSION=8
901 902 903 904 905 906 907 908 909
export IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)

#
# We need the jars in bootclasspath for a couple of reasons
#  - we use classes (in the sun.applet package) loaded by the bootclassloader
#    using another classloader to load classes from the same package causes an
#    IllegalAccessException
#  - we want full privileges
#
910
export UNIFIED_CLASSPATH_SEGMENTS=$(NETX_JAR) $(PLUGIN_JAR) $(JSOBJECT_JAR) $(RHINO_JAR) $(TAGSOUP_JAR) $(MSLINKS_JAR)
911 912 913 914 915
export UNIFIED_JACOCO_CLASSPATH_SEGMENTS=$(UNIFIED_CLASSPATH_SEGMENTS) $(JACOCO_CLASSPATH)
export UNIFIED_CLASSPATH=$(call joinsegments, $(UNIFIED_CLASSPATH_SEGMENTS))
export UNIFIED_JACOCO_CLASSPATH=$(call joinsegments, $(UNIFIED_JACOCO_CLASSPATH_SEGMENTS))
export UNIFIED_BOOTCLASSPATH=-Xbootclasspath/a:$(UNIFIED_CLASSPATH)
# note javaws, itwebsettings and policyeditor (== LAUNCHER_BOOTCLASSPATH) must be always able to compile and run *without* plugin
916
export LAUNCHER_BOOTCLASSPATH=$(UNIFIED_BOOTCLASSPATH)
917 918 919 920 921 922 923 924 925
export PLUGIN_BOOTCLASSPATH='"$(UNIFIED_BOOTCLASSPATH)"'
export PLUGIN_COVERAGE_BOOTCLASSPATH='"-Xbootclasspath/a:$(UNIFIED_JACOCO_CLASSPATH)"'

# Fake update version to work with the Deployment Toolkit script used by Oracle
# http://download.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html
export JDK_UPDATE_VERSION=50

# Sources list

926
export PLUGIN_TEST_SRCS = $(TOP_SRC_DIR)/plugin/tests/LiveConnect/*.java
927 928 929 930 931 932 933 934 935 936

export NETX_PKGS = javax.jnlp net.sourceforge.nanoxml net.sourceforge.jnlp \
	net.sourceforge.jnlp.about \
	net.sourceforge.jnlp.cache net.sourceforge.jnlp.config \
	net.sourceforge.jnlp.controlpanel net.sourceforge.jnlp.event \
	net.sourceforge.jnlp.runtime net.sourceforge.jnlp.security \
	net.sourceforge.jnlp.security.viewer net.sourceforge.jnlp.services \
	net.sourceforge.jnlp.tools net.sourceforge.jnlp.util \
	sun.applet

937 938 939 940 941 942 943 944 945 946 947
@ENABLE_PLUGINJAR_TRUE@export ICEDTEAPLUGIN_TARGET = stamps/liveconnect-dist.stamp
@ENABLE_PLUGINJAR_TRUE@export PLUGIN_DIR=$(TOP_BUILD_DIR)/plugin/icedteanp
@ENABLE_PLUGINJAR_TRUE@export PLUGIN_SRCDIR=$(TOP_SRC_DIR)/plugin/icedteanp
@ENABLE_PLUGINJAR_TRUE@export JSOBJECT_DIRS = netscape
@ENABLE_PLUGINJAR_TRUE@export SUN_APPLET_DIRS = sun/applet
@ENABLE_PLUGINJAR_TRUE@export PLUGIN_PKGS = sun.applet netscape.security netscape.javascript
@ENABLE_PLUGINJAR_TRUE@export LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java
@ENABLE_PLUGINJAR_TRUE@export LIVECONNECT_DIR = $(JSOBJECT_DIRS) $(SUN_APPLET_DIRS)
#overriding ICEDTEAPLUGIN_TARGET
@ENABLE_NATIVE_PLUGIN_TRUE@export ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) stamps/liveconnect-dist.stamp
@ENABLE_NATIVE_PLUGIN_TRUE@export ICEDTEAPLUGIN_CLEAN = clean-IcedTeaPlugin
948
#this is for plugin testcoverage
949
@ENABLE_NATIVE_PLUGIN_TRUE@export COVERABLE_PLUGIN_DIR=$(TESTS_DIR)/icedteanp-build-with-jacoco
950 951 952

export PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)

953 954
export EXTRA_DIST = $(MODULARJDK_ARGS_FILE) $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png $(DESKTOP_IN_FILES) $(top_srcdir)/completion \
 launcher $(top_srcdir)/tests html-gen.sh NEW_LINE_IFS $(top_srcdir)/metadata.in $(top_srcdir)/win-installer
955 956 957

# reproducers `D`shortcuts
export DTEST_SERVER=-Dtest.server.dir=$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)
958
export DJAVAWS_BUILD=-Djavaws.build.bin=$(DESTDIR)$(bindir)/$(JAVAWS)
959 960 961 962 963 964 965 966 967 968 969 970 971 972
export DBROWSERS=-Dused.browsers=$(FIREFOX):$(CHROMIUM):$(CHROME):$(OPERA):$(MIDORI):$(EPIPHANY)
export REPRODUCERS_DPARAMETERS= $(DTEST_SERVER) $(DJAVAWS_BUILD) $(DBROWSERS) $(BROWSER_TESTS_MODIFICATION)
# end of `D`shortcuts

#exported autoconf copies
export EXPORTED_JAVAC=$(SYSTEM_JDK_DIR)/bin/javac
export EXPORTED_JAR=$(SYSTEM_JDK_DIR)/bin/jar
export EXPORTED_KEYTOOL=$(SYSTEM_JDK_DIR)/bin/keytool
export EXPORTED_JARSIGNER=$(SYSTEM_JDK_DIR)/bin/jarsigner
export EXPORTED_PACK200=$(SYSTEM_JDK_DIR)/bin/pack200

# Top-Level Targets
# =================

973
all-local: stamps/netx-dist.stamp stamps/plugin.stamp stamps/docs.stamp \
974
 $(LAUNCHERS) $(DESKTOP_FILES)
975 976 977 978

check-local: $(RHINO_TESTS) $(JUNIT_TESTS)

clean-local: clean-netx clean-plugin clean-liveconnect \
979
 clean-native-ecj clean-launchers clean-desktop-files clean-docs clean-generated-docs clean-metadata  clean-icedteaweb-completion clean-tests clean-bootstrap-directory clean-win-installer
980 981 982 983 984
	if [ -e stamps ] ; then \
	  rmdir stamps ; \
	fi

.PHONY: clean-IcedTeaPlugin clean-add-netx clean-add-netx-debug clean-add-plugin clean-add-plugin-debug \
985
 clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs clean-generated-docs clean-icedteaweb-completion\
986
 clean-tests check-local clean-launchers stamps/check-pac-functions.stamp stamps/run-netx-unit-tests.stamp clean-netx-tests \
987
 clean-junit-runner clean-netx-unit-tests clean-metadata win-installer clean-win-installer
988 989

install-exec-local:
990 991
	${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ $(DESTDIR)$(libdir) $(ICONS_DEST_DIR) $(BASH_CMPL_DEST_DIR)
@ENABLE_NATIVE_PLUGIN_TRUE@	${INSTALL_PROGRAM} $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) $(DESTDIR)$(libdir)
992 993 994 995
@ENABLE_PLUGINJAR_TRUE@	${INSTALL_DATA} $(TOP_BUILD_DIR)/liveconnect/lib/classes-applet.jar   $(DESTDIR)$(PLUGIN_JAR)
@ENABLE_PLUGINJAR_TRUE@	${INSTALL_DATA} $(TOP_BUILD_DIR)/liveconnect/lib/classes-jsobject.jar $(DESTDIR)$(JSOBJECT_JAR)
	${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(NETX_JAR)
	${INSTALL_DATA} $(NETX_SRCDIR)/javaws_splash.png $(DESTDIR)$(SPLASH_PNG)
996
	${INSTALL_DATA} $(TOP_SRC_DIR)/javaws.png $(ICONS_DEST_DIR)/
997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
	mkdir -p $(DESTDIR)$(MODULARJDK_ARGS_DIR)
	cp launcher.build/$(MODULARJDK_ARGS_FILE) $(MODULARJDK_ARGS_LOCATION)
@ENABLE_NATIVE_LAUNCHERS_TRUE@	${INSTALL_PROGRAM} launcher.build/$(javaws) $(DESTDIR)$(bindir)
@ENABLE_NATIVE_LAUNCHERS_TRUE@	${INSTALL_PROGRAM} launcher.build/$(itweb_settings) $(DESTDIR)$(bindir)
@ENABLE_NATIVE_LAUNCHERS_TRUE@	${INSTALL_PROGRAM} launcher.build/$(policyeditor) $(DESTDIR)$(bindir)
@ENABLE_SHELL_LAUNCHERS_TRUE@	${INSTALL_PROGRAM} launcher.build/$(javaws).sh $(DESTDIR)$(bindir)
@ENABLE_SHELL_LAUNCHERS_TRUE@	${INSTALL_PROGRAM} launcher.build/$(itweb_settings).sh $(DESTDIR)$(bindir)
@ENABLE_SHELL_LAUNCHERS_TRUE@	${INSTALL_PROGRAM} launcher.build/$(policyeditor).sh $(DESTDIR)$(bindir)
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	${INSTALL_PROGRAM} launcher.build/$(javaws).bat $(DESTDIR)$(bindir)
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	${INSTALL_PROGRAM} launcher.build/$(itweb_settings).bat $(DESTDIR)$(bindir)
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	${INSTALL_PROGRAM} launcher.build/$(policyeditor).bat $(DESTDIR)$(bindir)
1008 1009 1010
	${INSTALL_DATA} $(TOP_BUILD_DIR)/completion/itweb-settings.bash $(BASH_CMPL_DEST_DIR)/
	${INSTALL_DATA} $(TOP_BUILD_DIR)/completion/javaws.bash $(BASH_CMPL_DEST_DIR)/
	${INSTALL_DATA} $(TOP_BUILD_DIR)/completion/policyeditor.bash $(BASH_CMPL_DEST_DIR)/
1011 1012

# all generated manpages are installed in swarm
1013 1014 1015
# 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
1016 1017 1018
	${mkinstalldirs} -d $(DESTDIR)$(mandir)
	cp -r "$(DOCS_DIR)/man/"* $(DESTDIR)$(mandir)/
@ENABLE_DOCS_TRUE@	${mkinstalldirs} $(DESTDIR)$(htmldir)
1019
@ENABLE_DOCS_TRUE@	(cd ${TOP_BUILD_DIR}/docs/netx; \
1020 1021 1022 1023
@ENABLE_DOCS_TRUE@	 for files in $$(find . -type f); \
@ENABLE_DOCS_TRUE@	 do \
@ENABLE_DOCS_TRUE@	   ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/netx/$${files}; \
@ENABLE_DOCS_TRUE@	 done)
1024 1025 1026 1027 1028
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	(cd ${TOP_BUILD_DIR}/docs/plugin; \
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	 for files in $$(find . -type f); \
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	 do \
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	   ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/plugin/$${files}; \
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	 done)
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061
@WINDOWS_OR_INCLUDE_BATS_TRUE@	mkdir -p $(WIN_ALL_DEPS)
@WINDOWS_OR_INCLUDE_BATS_TRUE@	mkdir -p $(WIN_RUN_DEPS)
@WINDOWS_OR_INCLUDE_BATS_TRUE@	JARSVARS=` ( set -o posix ; set ) | sed "s/.*=//"  | grep \\.jar$$ | grep \\.jar.exe$$ ` ; \
@WINDOWS_OR_INCLUDE_BATS_TRUE@	JARSMAKE=` cat $(TOP_BUILD_DIR)/printvarsfile | sed  "s/.*=//"  |  grep \\.jar$$ ` ; \
@WINDOWS_OR_INCLUDE_BATS_TRUE@	for JAR in $$JARSMAKE ; do \
@WINDOWS_OR_INCLUDE_BATS_TRUE@	  if [ -f $ $$JAR ] ; then \
@WINDOWS_OR_INCLUDE_BATS_TRUE@	    cp -v  $$JAR $(WIN_ALL_DEPS)/ ; \
@WINDOWS_OR_INCLUDE_BATS_TRUE@	  fi ; \
@WINDOWS_OR_INCLUDE_BATS_TRUE@	done ;
@WINDOWS_OR_INCLUDE_BATS_TRUE@	rm -f $(WIN_ALL_DEPS)/jar ;
@WINDOWS_OR_INCLUDE_BATS_TRUE@	for JAR in `ls $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/*.jar` ; do \
@WINDOWS_OR_INCLUDE_BATS_TRUE@	  rm -fv $(WIN_ALL_DEPS)/`basename $$JAR` ; \
@WINDOWS_OR_INCLUDE_BATS_TRUE@	done;
@WINDOWS_OR_INCLUDE_BATS_TRUE@@WITH_RHINO_TRUE@	filteredName=`basename $(RHINO_JAR) | sed "s/[^a-zA-Z]//g" | sed "s/jar$$/.jar/"` ; \
@WINDOWS_OR_INCLUDE_BATS_TRUE@@WITH_RHINO_TRUE@	cp -v $(RHINO_JAR) $(WIN_RUN_DEPS)/$$filteredName
@HAVE_TAGSOUP_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	filteredName=`basename $(TAGSOUP_JAR) | sed "s/[^a-zA-Z]//g" | sed "s/jar$$/.jar/"` ; \
@HAVE_TAGSOUP_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	cp -v $(TAGSOUP_JAR) $(WIN_RUN_DEPS)/$$filteredName
@HAVE_MSLINKS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	filteredName=`basename $(MSLINKS_JAR) | sed "s/[^a-zA-Z]//g" | sed "s/jar$$/.jar/"` ; \
@HAVE_MSLINKS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	cp -v $(MSLINKS_JAR) $(WIN_RUN_DEPS)/$$filteredName

#no npapi plugin at all!
linux-bin-dist: install
	rm -f $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
	mkdir -p $(LINUX_BIN_DIST_DEPS)
@WITH_RHINO_TRUE@	filteredName=`basename $(RHINO_JAR) | sed "s/[^a-zA-Z]//g" | sed "s/jar$$/.jar/"` ; \
@WITH_RHINO_TRUE@	cp -v $(RHINO_JAR) $(LINUX_BIN_DIST_DEPS)/$$filteredName
@HAVE_TAGSOUP_TRUE@	filteredName=`basename $(TAGSOUP_JAR) | sed "s/[^a-zA-Z]//g" | sed "s/jar$$/.jar/"` ; \
@HAVE_TAGSOUP_TRUE@	cp -v $(TAGSOUP_JAR) $(LINUX_BIN_DIST_DEPS)/$$filteredName
	cp $(NETX_DIR)/lib/src.zip $(DESTDIR)$(prefix)/netx.src.zip
@ENABLE_PLUGINJAR_TRUE@	cp $(TOP_BUILD_DIR)/liveconnect/lib/src.zip $(DESTDIR)$(prefix)/plugin.src.zip
@ENABLE_DOCS_TRUE@	cp -r $(DOCS_DIR)/html $(DESTDIR)$(prefix)/icedtea-web-docs
	if [ ! -e $(DESTDIR)$(bindir)/$(MODULARJDK_ARGS_FILE) ] ; then cp $(MODULARJDK_ARGS_LOCATION) $(DESTDIR)$(bindir)/$(MODULARJDK_ARGS_FILE) ; fi
	(cd $(DESTDIR)$(prefix)/.. && $(ZIP) -qr $(TOP_BUILD_DIR)/$(distdir).linux.bin.zip `basename $(DESTDIR)$(prefix)` );
1062 1063 1064 1065 1066 1067 1068

win-bin-dist: win-only-image
	(cd $(DESTDIR)$(prefix)/.. && $(ZIP) -qr $(TOP_BUILD_DIR)/$(distdir).win.bin.zip `basename $(DESTDIR)$(prefix)` );

# strips cygwin and other linux-like blobs. keeping only windows-usefull stuff
@WINDOWS_TRUE@win-only-image: install uninstall-linux-only remove-empty-linux-only-dirs
@WINDOWS_TRUE@	rm -rf $(WIN_ALL_DEPS)
1069
@WINDOWS_TRUE@	if [ ! -e $(DESTDIR)$(bindir)/$(MODULARJDK_ARGS_FILE) ] ; then cp $(MODULARJDK_ARGS_LOCATION) $(DESTDIR)$(bindir)/$(MODULARJDK_ARGS_FILE) ; fi
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106
@ENABLE_DOCS_TRUE@@WINDOWS_TRUE@	cp -r $(DOCS_DIR)/html $(DESTDIR)$(prefix)/icedtea-web-docs
@WINDOWS_TRUE@	cp $(NETX_DIR)/lib/src.zip $(DESTDIR)$(prefix)/netx.src.zip
@ENABLE_PLUGINJAR_TRUE@@WINDOWS_TRUE@	cp $(TOP_BUILD_DIR)/liveconnect/lib/src.zip $(DESTDIR)$(prefix)/plugin.src.zip

@WINDOWS_TRUE@clean-win-installer:
@WINDOWS_TRUE@	rm -rf $(WIN_INSTALLER_DIR)

@WINDOWS_TRUE@$(WIN_INSTALLER_DIR)/itw-installer.json: clean-win-installer
@WINDOWS_TRUE@	mkdir $(WIN_INSTALLER_DIR)
@WINDOWS_TRUE@	sed \
@WINDOWS_TRUE@	-e "s|../win-installer|$(WIN_INSTALLER_SRC_DIR)|g" \
@WINDOWS_TRUE@	-e s/[@]PACKAGE_VERSION[@]/$(PACKAGE_VERSION)/g $(WIN_INSTALLER_SRC_DIR)/installer.json.in > $@

@WINDOWS_TRUE@win-installer: win-only-image $(WIN_INSTALLER_DIR)/itw-installer.json
@WINDOWS_TRUE@	"$(JAVA)" -jar "$(WIXGEN_JAR)" "$(DESTDIR)$(prefix)" -c $(WIN_INSTALLER_DIR)/itw-installer.json -o $(WIN_INSTALLER_DIR)/itw-installer.wxs
@WINDOWS_TRUE@	cd $(WIN_INSTALLER_DIR) && "$(WIX_TOOLSET_DIR)"/candle.exe /nologo itw-installer.wxs
@WINDOWS_TRUE@	cd $(WIN_INSTALLER_DIR) && "$(WIX_TOOLSET_DIR)"/light.exe /nologo -ext WixUIExtension itw-installer.wixobj

# note that this is called only from windows specific target (hidden otherwise)
remove-empty-linux-only-dirs:
	echo "*************************************************************************" ; \
	echo "* If run without prefix or on non-windows machine, may harm your system *" ; \
	echo "*************************************************************************" ; \
	MAN_DIRS_TO_CHECK_AND_CLEAN="de/man1 pl/man1 cs/man1 de pl cs man1 " ; \
	for manDirName in $$MAN_DIRS_TO_CHECK_AND_CLEAN ; do \
	  dirCandidate=$(DESTDIR)$(mandir)/$$manDirName ; \
	  if ls -1qA $$dirCandidate | grep -q . ; then echo "$$dirCandidate not empty"; else rmdir -v $$dirCandidate ; fi ; \
	done
	dirCandidate=$(DESTDIR)$(mandir)/$$manDirName ; \
	if ls -1qA $$dirCandidate | grep -q . ; then echo "$$dirCandidate not empty"; else rmdir -v $$dirCandidate ; fi ;
	DEFAULT_CMPL_DIRS_TO_CHECK_AND_CLEAN="$(BASH_CMPL_DEST_DIR) `dirname $(BASH_CMPL_DEST_DIR)` $$(dirname $$(dirname $(BASH_CMPL_DEST_DIR)))" ; \
	for cmplDirName in $$DEFAULT_CMPL_DIRS_TO_CHECK_AND_CLEAN ; do \
	  dirCandidate=$$cmplDirName ; \
	  if ls -1qA $$dirCandidate | grep -q . ; then echo "$$dirCandidate not empty"; else rmdir -v $$dirCandidate ; fi ; \
	done
	dirCandidate=$(DESTDIR)$(libdir)/ ; \
	if ls -1qA $$dirCandidate | grep -q . ; then echo "$$dirCandidate not empty"; else rmdir -v $$dirCandidate ; fi ;
1107 1108

# all generated manpages must be removed one by one
1109
# shell (only shell!) launchers must go away
1110
uninstall-linux-only:
1111 1112 1113 1114 1115 1116 1117
	KNOWN_MANS="icedtea-web.1  icedtea-web-plugin.1  itweb-settings.1  javaws.1  policyeditor.1" ; \
	KNOWN_DIRS="man1 de/man1 pl/man1 cs/man1" ; \
	for file in $$KNOWN_MANS ; do \
	  for dir in $$KNOWN_DIRS ; do \
	    rm -f $(DESTDIR)$(mandir)/$$dir/$$file ; \
	  done ; \
	done
1118
	rm -f $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
1119 1120 1121
	rm -f $(DESTDIR)$(bindir)/$(javaws).sh
	rm -f $(DESTDIR)$(bindir)/$(itweb_settings).sh
	rm -f $(DESTDIR)$(bindir)/$(policyeditor).sh
1122 1123 1124
	rm -f $(BASH_CMPL_DEST_DIR)/itweb-settings.bash
	rm -f $(BASH_CMPL_DEST_DIR)/javaws.bash
	rm -f $(BASH_CMPL_DEST_DIR)/policyeditor.bash
1125

1126
uninstall-local: uninstall-linux-only
1127 1128 1129 1130
	rm -f $(DESTDIR)$(PLUGIN_JAR)
	rm -f $(DESTDIR)$(JSOBJECT_JAR)
	rm -f $(DESTDIR)$(NETX_JAR)
	rm -r $(DESTDIR)$(SPLASH_PNG)
1131 1132
	rm -r $(ICONS_DEST_DIR)/javaws.png
	rm -rf $(DESTDIR)$(htmldir)
1133 1134 1135 1136 1137
@WINDOWS_OR_INCLUDE_BATS_TRUE@	rm -rf $(WIN_ALL_DEPS)
@WINDOWS_OR_INCLUDE_BATS_TRUE@	rm -rf $(WIN_RUN_DEPS)
@WINDOWS_OR_INCLUDE_BATS_TRUE@	rm -f $(DESTDIR)$(bindir)/$(javaws).bat
@WINDOWS_OR_INCLUDE_BATS_TRUE@	rm -f $(DESTDIR)$(bindir)/$(itweb_settings).bat
@WINDOWS_OR_INCLUDE_BATS_TRUE@	rm -f $(DESTDIR)$(bindir)/$(policyeditor).bat
1138 1139 1140 1141 1142 1143 1144 1145

@ENABLE_NATIVE_PLUGIN_TRUE@$(PLUGIN_DIR)/%.o: $(PLUGIN_SRCDIR)/%.cc
@ENABLE_NATIVE_PLUGIN_TRUE@	mkdir -p $(PLUGIN_DIR) && \
@ENABLE_NATIVE_PLUGIN_TRUE@	cd $(PLUGIN_DIR) && \
@ENABLE_NATIVE_PLUGIN_TRUE@	$(CXX) $(CXXFLAGS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	   $(DEFS) $(VERSION_DEFS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \
1146
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DJAVAWS_BIN="\"$(bindir)/$(JAVAWS)\"" \
1147 1148 1149 1150 1151 1152
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DJAVAWS_NAME="\"$(javaws)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPACKAGE_URL="\"$(PACKAGE_URL)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \
1153
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DNETX_JAR="\"$(NETX_JAR)\"" \
1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPLUGIN_JAR="\"$(PLUGIN_JAR)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DJSOBJECT_JAR="\"$(JSOBJECT_JAR)\""\
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(GLIB_CFLAGS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(MOZILLA_CFLAGS) \
@ENABLE_NATIVE_PLUGIN_TRUE@  	  -fvisibility=hidden \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -fPIC -o $@ -c $<

@ENABLE_NATIVE_PLUGIN_TRUE@$(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
@ENABLE_NATIVE_PLUGIN_TRUE@	cd $(PLUGIN_DIR) && \
@ENABLE_NATIVE_PLUGIN_TRUE@	$(CXX) $(CXXFLAGS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(PLUGIN_OBJECTS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(GLIB_LIBS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(MOZILLA_LIBS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -shared -o $@
1168 1169 1170 1171

# Start of CPP Unit test targets

# Note that UnitTest++ has its own makefile, however this is avoided because it creates an in-source build.
1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182
@ENABLE_NATIVE_PLUGIN_TRUE@$(CPP_UNITTEST_FRAMEWORK_LIB): $(CPP_UNITTEST_FRAMEWORK_SRCDIR)
@ENABLE_NATIVE_PLUGIN_TRUE@	mkdir -p $(CPP_UNITTEST_FRAMEWORK_BUILDDIR) && \
@ENABLE_NATIVE_PLUGIN_TRUE@	pushd $(CPP_UNITTEST_FRAMEWORK_SRCDIR) && \
@ENABLE_NATIVE_PLUGIN_TRUE@	for cppfile in $$(find $(CPP_UNITTEST_FRAMEWORK_SRCDIR) -name '*.cpp') ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	do \
@ENABLE_NATIVE_PLUGIN_TRUE@	  objfile="$(CPP_UNITTEST_FRAMEWORK_BUILDDIR)/$$(basename $${cppfile%.cpp}).o" ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(CXX) $(CXXFLAGS) -c $$cppfile -o $$objfile || exit 1 ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	done ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	ar cr $(CPP_UNITTEST_FRAMEWORK_LIB) $(CPP_UNITTEST_FRAMEWORK_BUILDDIR)/*.o ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	popd

1183
@ENABLE_NATIVE_PLUGIN_TRUE@clean-unittest++-impl:
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200
@ENABLE_NATIVE_PLUGIN_TRUE@	rm -f $(CPP_UNITTEST_FRAMEWORK_BUILDDIR)/*.o
@ENABLE_NATIVE_PLUGIN_TRUE@	rm -f $(CPP_UNITTEST_FRAMEWORK_LIB)
@ENABLE_NATIVE_PLUGIN_TRUE@	if [ -e $(CPP_UNITTEST_FRAMEWORK_BUILDDIR) ] ; then \
@ENABLE_NATIVE_PLUGIN_TRUE@		rmdir $(CPP_UNITTEST_FRAMEWORK_BUILDDIR) ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	fi

@ENABLE_NATIVE_PLUGIN_TRUE@stamps/cpp-unit-tests-compile.stamp: $(CPP_UNITTEST_FRAMEWORK_LIB) $(CPP_UNITTEST_SRCDIR) $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
@ENABLE_NATIVE_PLUGIN_TRUE@	mkdir -p $(CPP_UNITTEST_DIR) && \
@ENABLE_NATIVE_PLUGIN_TRUE@	pushd $(CPP_UNITTEST_SRCDIR) && \
@ENABLE_NATIVE_PLUGIN_TRUE@	for cppfile in $$(find $(CPP_UNITTEST_SRCDIR) -name '*.cc') ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	do \
@ENABLE_NATIVE_PLUGIN_TRUE@	objfile="$(CPP_UNITTEST_DIR)/$$(basename $${cppfile%.cc}).o" ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	echo "Compiling $$cppfile to $$objfile"; \
@ENABLE_NATIVE_PLUGIN_TRUE@	$(CXX) $(CXXFLAGS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	   $(DEFS) $(VERSION_DEFS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \
1201
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DJAVAWS_BIN="\"$(bindir)/$(JAVAWS)\"" \
1202 1203 1204 1205 1206 1207
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DJAVAWS_NAME="\"$(javaws)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPACKAGE_URL="\"$(PACKAGE_URL)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \
1208
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DNETX_JAR="\"$(NETX_JAR)\"" \
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DPLUGIN_JAR="\"$(PLUGIN_JAR)\"" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -DJSOBJECT_JAR="\"$(JSOBJECT_JAR)\""\
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(GLIB_CFLAGS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(MOZILLA_CFLAGS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  "-I$(CPP_UNITTEST_FRAMEWORK_SRCDIR)/src" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  "-I$(PLUGIN_SRCDIR)" \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -o $$objfile -c $$cppfile || exit 1 ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	done ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	popd ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	mkdir -p stamps ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	touch $@

@ENABLE_NATIVE_PLUGIN_TRUE@$(CPP_UNITTEST_EXECUTABLE): $(CPP_UNITTEST_FRAMEWORK_LIB) stamps/cpp-unit-tests-compile.stamp 
@ENABLE_NATIVE_PLUGIN_TRUE@	cd $(CPP_UNITTEST_DIR) && \
@ENABLE_NATIVE_PLUGIN_TRUE@	$(CXX) $(CXXFLAGS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS)) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(CPP_UNITTEST_DIR)/*.o \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -lrt \
@ENABLE_NATIVE_PLUGIN_TRUE@	  -lpthread \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(GLIB_LIBS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(MOZILLA_LIBS) \
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(CPP_UNITTEST_FRAMEWORK_LIB)\
@ENABLE_NATIVE_PLUGIN_TRUE@	  $(BUILT_CPP_UNIT_TEST_FRAMEWORK) -o $@

1233
@ENABLE_NATIVE_PLUGIN_TRUE@clean-cpp-unit-tests-impl: 
1234 1235 1236 1237
@ENABLE_NATIVE_PLUGIN_TRUE@	rm -f stamps/cpp-unit-tests-compile.stamp
@ENABLE_NATIVE_PLUGIN_TRUE@	rm -f $(CPP_UNITTEST_EXECUTABLE)
@ENABLE_NATIVE_PLUGIN_TRUE@	rm -f $(CPP_UNITTEST_DIR)/*.o

1238
@ENABLE_NATIVE_PLUGIN_TRUE@run-cpp-unit-tests-impl: $(CPP_UNITTEST_EXECUTABLE)
1239
@ENABLE_NATIVE_PLUGIN_TRUE@	$(CPP_UNITTEST_EXECUTABLE)
1240 1241 1242

# End of CPP Unit test targets

1243 1244 1245 1246 1247 1248 1249 1250 1251
@ENABLE_NATIVE_PLUGIN_TRUE@clean-IcedTeaPlugin:
@ENABLE_NATIVE_PLUGIN_TRUE@	rm -f $(PLUGIN_DIR)/*.o
@ENABLE_NATIVE_PLUGIN_TRUE@	rm -f $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY)
@ENABLE_NATIVE_PLUGIN_TRUE@	if [ $(TOP_SRC_DIR) != $(TOP_BUILD_DIR) ]; then \
@ENABLE_NATIVE_PLUGIN_TRUE@	  if [ -e $(TOP_BUILD_DIR)/plugin/icedteanp ] ; then \
@ENABLE_NATIVE_PLUGIN_TRUE@	    rmdir $(TOP_BUILD_DIR)/plugin/icedteanp ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	    rmdir $(TOP_BUILD_DIR)/plugin ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  fi ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	fi
1252

1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266
clean-unittest++-placeholder:

clean-cpp-unit-tests-placeholder:
	echo "plugin disabled"

run-cpp-unit-tests-impl-placeholder:
	echo "plugin disabled"

clean-unittest++: $(CPPUNIT_FRAMEWORK_CLEAN_IMPL)

clean-cpp-unit-tests: $(CPPUNIT_CLEAN_IMPL)

run-cpp-unit-tests: $(CPPUNIT_IMPL)

1267 1268 1269 1270 1271 1272 1273 1274
stamps/plugin.stamp: $(ICEDTEAPLUGIN_TARGET)
	mkdir -p stamps
	touch stamps/plugin.stamp

clean-plugin: $(ICEDTEAPLUGIN_CLEAN)
	rm -f stamps/plugin.stamp

liveconnect-source-files.txt:
1275 1276 1277 1278 1279
@WINDOWS_TRUE@	  echo "Using WEmbeddedFrame" ; \
@WINDOWS_TRUE@	  sed "s;sun.awt.X11.XEmbeddedFrame;sun.awt.windows.WEmbeddedFrame;" -i $(LIVECONNECT_SRCS)/$(SUN_APPLET_DIRS)/PluginAppletViewer.java ; \
@WINDOWS_TRUE@	  sed "s;XEmbeddedFrame;WEmbeddedFrame;" -i $(LIVECONNECT_SRCS)/$(SUN_APPLET_DIRS)/PluginAppletViewer.java ; \
@WINDOWS_TRUE@	  sed "s;super(handle, true);super(handle);" -i $(LIVECONNECT_SRCS)/$(SUN_APPLET_DIRS)/PluginAppletViewer.java ; 
@WINDOWS_FALSE@	echo "Using XEmbeddedFrame" ; 
1280 1281
	if test "x${LIVECONNECT_DIR}" != x; then \
	  find $(LIVECONNECT_SRCS) -name '*.java' | sort > $@ ; \
1282
	fi ; \
1283 1284 1285 1286
	touch $@

stamps/liveconnect.stamp: liveconnect-source-files.txt stamps/netx.stamp
	if test "x${LIVECONNECT_DIR}" != x; then \
1287
	  mkdir -p $(TOP_BUILD_DIR)/liveconnect && \
1288
	  $(SYSTEM_JDK_DIR)/bin/javac $(IT_JAVACFLAGS) \
1289
	      -d $(TOP_BUILD_DIR)/liveconnect \
1290
	      $(call composeclasspath,$(NETX_DIR) $(MSLINKS_JAR) $(TAGSOUP_JAR) $(RHINO_JAR)) \
1291 1292 1293 1294 1295 1296
	      -sourcepath $(LIVECONNECT_SRCS) \
	      @liveconnect-source-files.txt ; \
	fi
	mkdir -p stamps
	touch $@

1297 1298
# although sun and netscape packages were compiled together, we pack and install them as two jars, to follow java.desktop and jdk.jsobject jdk9 modules
# the all together jar is kept for usage in tests. Feel free to remove and refactor
1299 1300
stamps/liveconnect-dist.stamp: stamps/liveconnect.stamp
	if test "x${LIVECONNECT_DIR}" != x; then \
1301
	  (cd $(TOP_BUILD_DIR)/liveconnect ; \
1302
	   mkdir -p lib ; \
1303 1304 1305
	   $(SYSTEM_JDK_DIR)/bin/jar cf lib/classes.jar          $(LIVECONNECT_DIR) ; \
	   $(SYSTEM_JDK_DIR)/bin/jar cf lib/classes-applet.jar   $(SUN_APPLET_DIRS) ; \
	   $(SYSTEM_JDK_DIR)/bin/jar cf lib/classes-jsobject.jar $(JSOBJECT_DIRS)   ; \
1306 1307 1308
	   cp -pPR $(SRC_DIR_LINK) $(LIVECONNECT_SRCS) src; \
	   find src -type f -exec chmod 640 '{}' ';' -o -type d -exec chmod 750 '{}' ';'; \
	   cd src ; \
1309
	   $(ZIP) -qr $(TOP_BUILD_DIR)/liveconnect/lib/src.zip $(LIVECONNECT_DIR) ) ; \
1310 1311 1312 1313 1314
	fi
	mkdir -p stamps
	touch $@

clean-liveconnect:
1315
	rm -rf $(TOP_BUILD_DIR)/liveconnect
1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333
	rm -f stamps/liveconnect-dist.stamp
	rm -f liveconnect-source-files.txt
	rm -f stamps/liveconnect.stamp

# NetX

netx-source-files.txt:
	find $(NETX_SRCDIR) -name '*.java' | sort > $@ ; \
	for src in $(NETX_EXCLUDE_SRCS) ; \
	do \
	  sed -i "/$${src}/ d" $@ ; \
	done
@WITH_RHINO_FALSE@	sed -i '/RhinoBasedPacEvaluator/ d' $@

# if 'sed' will be missing on machine, use old IFS hack as on other places
# the 'sed' cycles is changing some custom version like 1.6.2 fedora23.4 to simple 1.6
# if changed, keep in mind that also 1.7 should bubble to 1.7
# also 1.7pre or 1.7preHASH should end up like 1.7
1334 1335
$(TOP_BUILD_DIR)/metadata: $(top_srcdir)/metadata.in
	mkdir -p $(TOP_BUILD_DIR)/metadata-work ; \
1336 1337 1338 1339 1340 1341 1342 1343 1344
	METAFILES=`ls $(top_srcdir)/metadata.in` ; \
	SEDDED_VERSION=`echo "$(FULL_VERSION)" | sed 's/[^0-9]\+/ /g'` ; \
	x=0; for i in $$SEDDED_VERSION ; do  \
	  let x++; \
	  if [ $$x -eq 1 ] ; then V1=$$i; fi; \
	  if [ $$x -eq 2 ] ; then V2=$$i; fi; \
	done; \
	XVERSION=$$V1.$$V2; \
	for F in $$METAFILES ; do \
1345
	  cat $(top_srcdir)/metadata.in/$$F | sed "s;%{name};$(PACKAGE_NAME);g" |  sed "s;%{version};$$XVERSION;g" > $(TOP_BUILD_DIR)/metadata-work/$$F ; \
1346
	done ; \
1347
	mv $(TOP_BUILD_DIR)/metadata-work $(TOP_BUILD_DIR)/metadata ;
1348

1349 1350
check-metadata: $(TOP_BUILD_DIR)/metadata
	xmllint --noout $(TOP_BUILD_DIR)/metadata/* ; \
1351 1352 1353 1354 1355
	if [ $$? -eq 0 ] ; then \
	  echo "Passed: well formed" ; \
	else \
	  echo "FAILED: well formed" ; \
	fi ; \
1356
	xmllint --noout --schema http://maven.apache.org/xsd/maven-4.0.0.xsd $(TOP_BUILD_DIR)/metadata/*.pom ; \
1357 1358 1359 1360 1361
	if [ $$? -eq 0 ] ; then \
	  echo "Passed: valid poms" ; \
	else \
	  echo "FAILED: valid poms" ; \
	fi ; \
1362
	appstream-util validate $(TOP_BUILD_DIR)/metadata/*.appdata.xml  $(TOP_BUILD_DIR)/metadata/*.metainfo.xml ; \
1363 1364 1365 1366 1367 1368
	if [ $$? -eq 0 ] ; then \
	  echo "Passed: valid software descriptors" ; \
	else \
	  echo "FAILED: valid software descriptors" ; \
	fi ;
# very strange results:
1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390
# appstreamcli  validate $(TOP_BUILD_DIR)/metadata/*.appdata.xml  $(TOP_BUILD_DIR)/metadata/*.metainfo.xml

$(TOP_BUILD_DIR)/completion/itweb-settings.bash: $(TOP_SRC_DIR)/completion/itweb-settings.bash.in stamps/netx.stamp
	OPTIONS_COMMAND="$(SYSTEM_JRE_DIR)/bin/java -cp $(NETX_DIR) net.sourceforge.jnlp.OptionsDefinitions" ;  \
	OPTIONS=`$$OPTIONS_COMMAND itweb-settings`; \
	echo $$OPTIONS ; \
	cat $(TOP_SRC_DIR)/completion/itweb-settings.bash.in | \
	sed "s/@OPTIONS@/$${OPTIONS}/" > $@ ;

$(TOP_BUILD_DIR)/completion/javaws.bash: $(TOP_SRC_DIR)/completion/javaws.bash.in stamps/netx.stamp
	OPTIONS_COMMAND="$(SYSTEM_JRE_DIR)/bin/java -cp $(NETX_DIR) net.sourceforge.jnlp.OptionsDefinitions" ;  \
	OPTIONS=`$$OPTIONS_COMMAND javaws` ; \
	echo $$OPTIONS ; \
	cat $(TOP_SRC_DIR)/completion/javaws.bash.in | \
	sed "s/@OPTIONS@/$${OPTIONS}/" > $@ ;

$(TOP_BUILD_DIR)/completion/policyeditor.bash: $(TOP_SRC_DIR)/completion/policyeditor.bash.in stamps/netx.stamp
	OPTIONS_COMMAND="$(SYSTEM_JRE_DIR)/bin/java -cp $(NETX_DIR) net.sourceforge.jnlp.OptionsDefinitions" ;  \
	OPTIONS=`$$OPTIONS_COMMAND policyeditor` ; \
	echo $$OPTIONS ; \
	cat $(TOP_SRC_DIR)/completion/policyeditor.bash.in | \
	sed "s/@OPTIONS@/$${OPTIONS}/" > $@ ;
1391 1392 1393 1394 1395 1396

stamps/generate-docs.stamp: stamps/netx.stamp
	mkdir -p "$(DOCS_DIR)" ; \
	HTML_DOCS_TARGET_DIR="$(DOCS_DIR)/html"  ; \
	PLAIN_DOCS_TARGET_DIR="$(DOCS_DIR)/plain" ; \
	MAN_DOCS_TARGET_DIR="$(DOCS_DIR)/man"  ; \
1397
	AUTHORS_FILE_TARGET="$(TOP_SRC_DIR)/AUTHORS" ; \
1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412
	mkdir "$$HTML_DOCS_TARGET_DIR" ; \
	mkdir "$$PLAIN_DOCS_TARGET_DIR" ; \
	mkdir "$$MAN_DOCS_TARGET_DIR" ; \
	HTML_DOCS_INDEX="$$HTML_DOCS_TARGET_DIR/index.html" ; \
	TP_COMMAND="$(SYSTEM_JRE_DIR)/bin/java -cp $(NETX_DIR) net.sourceforge.jnlp.util.docprovider.TextsProvider" ; \
	TP_TAIL="false $(FULL_VERSION)" ; \
	LANG_BACKUP=$$LANG ; \
	echo "<html><head><title>$(PLUGIN_VERSION)</title></head>" > "$$HTML_DOCS_INDEX" ; \
	echo "<body><h3>$(PLUGIN_VERSION) docs:</h3>"  >> "$$HTML_DOCS_INDEX" ; \
	for LANG_ID in en_US.UTF-8 cs_CZ.UTF-8 pl_PL.UTF-8 de_DE.UTF-8 ;  do \
	  ID=`echo "$$LANG_ID" | head -c 2` ; \
	  ENCOD=`echo "$$LANG_ID" | tail -c 6 -` ; \
	  export LANG=$$LANG_ID; \
	  mkdir "$$HTML_DOCS_TARGET_DIR/$$ID" ; \
	  echo "<li><a href='$$ID/icedtea-web.html'>$$LANG_ID</a></li>"  >> "$$HTML_DOCS_INDEX" ; \
1413
	  $$TP_COMMAND html "$$HTML_DOCS_TARGET_DIR/$$ID" $$TP_TAIL "-authorFile=$$AUTHORS_FILE_TARGET" ; \
1414
	  mkdir "$$PLAIN_DOCS_TARGET_DIR/$$ID" ; \
1415
	  $$TP_COMMAND plain "$$PLAIN_DOCS_TARGET_DIR/$$ID" 160 $$TP_TAIL "-authorFile=$$AUTHORS_FILE_TARGET" ; \
1416 1417 1418 1419 1420 1421
	  if [ $$ID = "en" ] ; then \
	    MAN_DESC="$$MAN_DOCS_TARGET_DIR/man1" ; \
	  else \
	    MAN_DESC="$$MAN_DOCS_TARGET_DIR/$$ID/man1" ; \
	  fi ; \
	  mkdir -p "$$MAN_DESC" ; \
1422
	  $$TP_COMMAND man $$ENCOD "$$MAN_DESC" $$TP_TAIL "-authorFile=$$AUTHORS_FILE_TARGET" ; \
1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433
	  $$TP_COMMAND htmlIntro "$(NETX_DIR)/net/sourceforge/jnlp/resources/about_$$ID.html" $$TP_TAIL; \
	done ; \
	export LANG=$$LANG_BACKUP ; \
	echo "</body></html>"  >> $$HTML_DOCS_INDEX ; \
	touch $@

stamps/netx-html-gen.stamp:
	(cd $$NETX_SRCDIR/..; \
	mkdir -p html-gen; \
	cp AUTHORS NEWS COPYING ChangeLog html-gen/; \
	export HTML_GEN_DEBUG=true; \
1434
	${SHELL} html-gen.sh 70; \
1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445
	unset HTML_GEN_DEBUG)
	${INSTALL_DATA} $(NETX_SRCDIR)/../html-gen/*.html $(NETX_RESOURCE_DIR)
	rm -r $(NETX_SRCDIR)/../html-gen/
	mkdir -p stamps
	touch $@

stamps/netx.stamp: netx-source-files.txt stamps/netx-html-gen.stamp
	mkdir -p $(NETX_DIR)
	$(SYSTEM_JDK_DIR)/bin/javac $(IT_JAVACFLAGS) \
		-d $(NETX_DIR) \
		-sourcepath $(NETX_SRCDIR) \
1446
		$(call composeclasspath, $(MSLINKS_JAR) $(TAGSOUP_JAR) $(RHINO_JAR)) \
1447 1448 1449 1450 1451 1452 1453
	    @netx-source-files.txt
	(cd $(NETX_RESOURCE_DIR); \
	 for files in $$(find . -type f); \
	 do \
	   ${INSTALL_DATA} -D $${files} \
	   $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \
	 done)
1454
	cp $(CPA) $(NETX_SRCDIR)/net/sourceforge/jnlp/runtime/pac-funcs.js \
1455
	  $(NETX_DIR)/net/sourceforge/jnlp/runtime
1456
	cp $(CPA) build.properties $(NETX_DIR)/net/sourceforge/jnlp/
1457 1458 1459
	mkdir -p stamps
	touch $@

1460
stamps/netx-dist.stamp: stamps/netx.stamp $(TOP_BUILD_DIR)/netx.manifest stamps/generate-docs.stamp $(TOP_BUILD_DIR)/completion/itweb-settings.bash $(TOP_BUILD_DIR)/completion/javaws.bash $(TOP_BUILD_DIR)/completion/policyeditor.bash $(TOP_BUILD_DIR)/metadata
1461 1462 1463
	(cd $(NETX_DIR) ; \
	 mkdir -p lib ; \
	 $(SYSTEM_JDK_DIR)/bin/jar cfm lib/classes.jar \
1464
	  $(TOP_BUILD_DIR)/netx.manifest javax/jnlp net sun; \
1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482
	 cp -pPR $(SRC_DIR_LINK) $(NETX_SRCDIR) src; \
	 find src -type f -exec chmod 640 '{}' ';' -o -type d -exec chmod 750 '{}' ';'; \
	 cd src ; \
	 $(ZIP) -qr $(NETX_DIR)/lib/src.zip javax net sun)
	mkdir -p stamps
	touch $@

clean-netx:
	rm -rf $(NETX_DIR)
	rm -f stamps/netx-dist.stamp
	rm -f netx-source-files.txt
	rm -f stamps/netx.stamp
	rm -f stamps/netx-html-gen.stamp
	rm -f $(NETX_RESOURCE_DIR)/{NEWS,AUTHORS,COPYING,ChangeLog}.html

clean-desktop-files:
	rm -f javaws.desktop
	rm -f itweb-settings.desktop
1483
	rm -f policyeditor.desktop
1484

1485 1486
# launcher run args:
launcher.build/$(MODULARJDK_ARGS_FILE): $(srcdir)/$(MODULARJDK_ARGS_FILE)
1487
	mkdir -p launcher.build
1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509
	cp $(srcdir)/$(MODULARJDK_ARGS_FILE) launcher.build/$(MODULARJDK_ARGS_FILE)

@ENABLE_SHELL_LAUNCHERS_TRUE@launcher.build/$(javaws).sh: launcher/launchers.sh.in
@ENABLE_SHELL_LAUNCHERS_TRUE@	mkdir -p launcher.build
@ENABLE_SHELL_LAUNCHERS_TRUE@	MAIN_CLASS=net.sourceforge.jnlp.runtime.Boot ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@	BIN_LOCATION=$(bindir)/$(javaws).sh ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@	PROGRAM_NAME=$(javaws) ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@	$(edit_launcher_script) < $< > $@

@ENABLE_SHELL_LAUNCHERS_TRUE@launcher.build/$(itweb_settings).sh: launcher/launchers.sh.in
@ENABLE_SHELL_LAUNCHERS_TRUE@	mkdir -p launcher.build
@ENABLE_SHELL_LAUNCHERS_TRUE@	MAIN_CLASS=net.sourceforge.jnlp.controlpanel.CommandLine ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@	BIN_LOCATION=$(bindir)/$(itweb_settings).sh ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@	PROGRAM_NAME=$(itweb_settings) ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@	$(edit_launcher_script) < $< > $@

@ENABLE_SHELL_LAUNCHERS_TRUE@launcher.build/$(policyeditor).sh: launcher/launchers.sh.in
@ENABLE_SHELL_LAUNCHERS_TRUE@	mkdir -p launcher.build
@ENABLE_SHELL_LAUNCHERS_TRUE@	MAIN_CLASS=net.sourceforge.jnlp.security.policyeditor.PolicyEditor ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@	BIN_LOCATION=$(bindir)/$(policyeditor).sh ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@	PROGRAM_NAME=$(policyeditor) ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@	$(edit_launcher_script) < $< > $@
1510

1511
# TODO get rid of this copypaste
1512 1513 1514 1515 1516 1517
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@launcher.build/$(javaws).bat: launcher/launchers.bat.in
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	mkdir -p launcher.build
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	MAIN_CLASS=net.sourceforge.jnlp.runtime.Boot ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	BIN_LOCATION=$(bindir)/$(javaws) ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	PROGRAM_NAME=$(javaws) ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	$(edit_launcher_script) $(fix_CRLF) < $< > $@
1518 1519

# TODO get rid of this copypaste
1520 1521 1522 1523 1524 1525
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@launcher.build/$(itweb_settings).bat: launcher/launchers.bat.in
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	mkdir -p launcher.build
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	MAIN_CLASS=net.sourceforge.jnlp.controlpanel.CommandLine ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	BIN_LOCATION=$(bindir)/$(itweb_settings) ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	PROGRAM_NAME=$(itweb_settings) ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	$(edit_launcher_script) $(fix_CRLF) < $< > $@
1526 1527

# TODO get rid of this copypaste
1528 1529 1530 1531 1532 1533
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@launcher.build/$(policyeditor).bat: launcher/launchers.bat.in
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	mkdir -p launcher.build
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	MAIN_CLASS=net.sourceforge.jnlp.security.policyeditor.PolicyEditor ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	BIN_LOCATION=$(bindir)/$(policyeditor) ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	PROGRAM_NAME=$(policyeditor) ;\
@ENABLE_SHELL_LAUNCHERS_TRUE@@WINDOWS_OR_INCLUDE_BATS_TRUE@	$(edit_launcher_script) $(fix_CRLF) < $< > $@
1534

1535
clean-launchers:
1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546
	rm -f launcher.build/$(MODULARJDK_ARGS_FILE)
@ENABLE_NATIVE_LAUNCHERS_TRUE@	rm -f launcher.build/$(javaws)
@ENABLE_NATIVE_LAUNCHERS_TRUE@	rm -f launcher.build/$(itweb_settings)
@ENABLE_NATIVE_LAUNCHERS_TRUE@	rm -f launcher.build/$(policyeditor)
@ENABLE_NATIVE_LAUNCHERS_TRUE@	rm -rf launcher.in*
@ENABLE_SHELL_LAUNCHERS_TRUE@	rm -f launcher.build/$(javaws).sh
@ENABLE_SHELL_LAUNCHERS_TRUE@	rm -f launcher.build/$(itweb_settings).sh
@ENABLE_SHELL_LAUNCHERS_TRUE@	rm -f launcher.build/$(policyeditor).sh
@WINDOWS_OR_INCLUDE_BATS_TRUE@	rm -f launcher.build/$(javaws).bat
@WINDOWS_OR_INCLUDE_BATS_TRUE@	rm -f launcher.build/$(itweb_settings).bat
@WINDOWS_OR_INCLUDE_BATS_TRUE@	rm -f launcher.build/$(policyeditor).bat
1547 1548 1549 1550 1551
	if [ -e launcher.build ] ; then \
	  rmdir launcher.build ; \
	fi

javaws.desktop: javaws.desktop.in
1552
	sed "s#PATH_TO_JAVAWS#$(bindir)/$(JAVAWS)#" < $(srcdir)/javaws.desktop.in > javaws.desktop
1553 1554

itweb-settings.desktop: $(srcdir)/itweb-settings.desktop.in
1555
	sed "s#PATH_TO_ITWEB_SETTINGS#$(bindir)/$(ITWEB_SETTINGS)#" \
1556 1557 1558
	  < $(srcdir)/itweb-settings.desktop.in > itweb-settings.desktop

policyeditor.desktop: $(srcdir)/policyeditor.desktop.in
1559
	sed "s#PATH_TO_POLICYEDITOR#$(bindir)/$(POLICYEDITOR)#" \
1560 1561 1562 1563 1564 1565 1566 1567
	< $(srcdir)/policyeditor.desktop.in > policyeditor.desktop

# documentation

stamps/docs.stamp: stamps/netx-docs.stamp stamps/plugin-docs.stamp
	touch stamps/docs.stamp

clean-docs: clean-netx-docs clean-plugin-docs
1568 1569
	if [ -e ${TOP_BUILD_DIR}/docs ] ; then \
	  rmdir ${TOP_BUILD_DIR}/docs ; \
1570 1571 1572 1573 1574
	fi
	rm -f stamps/docs.stamp

stamps/netx-docs.stamp:
@ENABLE_DOCS_TRUE@	$(SYSTEM_JDK_DIR)/bin/javadoc $(JAVADOC_MEM_OPTS) $(JAVADOC_OPTS) \
1575
@ENABLE_DOCS_TRUE@	 -d ${TOP_BUILD_DIR}/docs/netx -sourcepath $(NETX_SRCDIR) \
1576 1577 1578
@ENABLE_DOCS_TRUE@	 -doctitle 'IcedTea-Web: NetX API Specification' \
@ENABLE_DOCS_TRUE@	 -windowtitle 'IcedTea-Web: NetX ' \
@ENABLE_DOCS_TRUE@	 -header '<strong>IcedTea-Web<br/>NetX</strong>' \
1579
@ENABLE_DOCS_TRUE@	 $(call composeclasspath, $(MSLINKS_JAR) $(TAGSOUP_JAR) $(RHINO_JAR)) \
1580 1581 1582 1583 1584
@ENABLE_DOCS_TRUE@	 $(NETX_PKGS)
	mkdir -p stamps
	touch stamps/netx-docs.stamp

clean-netx-docs:
1585
	rm -rf ${TOP_BUILD_DIR}/docs/netx
1586 1587 1588
	rm -f stamps/netx-docs.stamp

stamps/plugin-docs.stamp:
1589 1590 1591 1592 1593
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	$(SYSTEM_JDK_DIR)/bin/javadoc $(JAVADOC_MEM_OPTS) $(JAVADOC_OPTS) \
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	 -d ${TOP_BUILD_DIR}/docs/plugin -sourcepath "$(NETX_SRCDIR)$(CLASSPATH_SEPARATOR)$(LIVECONNECT_SRCS)" \
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	 -doctitle 'IcedTea-Web: Plugin API Specification' \
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	 -windowtitle 'IcedTea-Web: Plugin ' \
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	 -header '<strong>IcedTea-Web<br/>Plugin</strong>' \
1594
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	 $(call composeclasspath, $(MSLINKS_JAR) $(TAGSOUP_JAR) $(RHINO_JAR)) \
1595
@ENABLE_DOCS_TRUE@@ENABLE_PLUGINJAR_TRUE@	 $(PLUGIN_PKGS)
1596 1597 1598 1599
	mkdir -p stamps
	touch stamps/plugin-docs.stamp

clean-plugin-docs:
1600
	rm -rf ${TOP_BUILD_DIR}/docs/plugin
1601 1602 1603 1604 1605 1606
	rm -f stamps/plugin-docs.stamp

clean-generated-docs:
	rm -rf "$(DOCS_DIR)"
	rm -f stamps/generate-docs.stamp

1607 1608 1609 1610 1611
clean-icedteaweb-completion:
	rm -f $(TOP_BUILD_DIR)/completion/itweb-settings.bash
	rm -f $(TOP_BUILD_DIR)/completion/javaws.bash
	rm -f $(TOP_BUILD_DIR)/completion/policyeditor.bash

1612
clean-metadata:
1613
	rm -rf $(TOP_BUILD_DIR)/metadata
1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626

# check
# ==========================

clean-tests: clean-netx-tests clean-cpp-unit-tests clean-unittest++
	if [ -e $(CPP_UNITTEST_DIR) ] ; then \
		rmdir $(CPP_UNITTEST_DIR) ; \
	fi
	if [ -e $(TESTS_DIR) ]; then \
		rmdir $(TESTS_DIR) ; \
	fi

stamps/check-pac-functions.stamp:
1627 1628
	./jrunscript $(TOP_SRC_DIR)/tests/netx/pac/pac-funcs-test.js \
	  $$(readlink -f $(TOP_SRC_DIR)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js) ; \
1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651
	mkdir -p stamps && \
	touch $@

junit-runner-source-files.txt:
	find $(JUNIT_RUNNER_SRCDIR) -name '*.java' | sort > $@

jacoco-operator-source-files.txt:
	find $(JACOCO_OPERATOR_SRCDIR) -name '*.java' | sort > $@

$(JUNIT_RUNNER_JAR): junit-runner-source-files.txt stamps/test-extensions-compile.stamp
	mkdir -p $(JUNIT_RUNNER_DIR) && \
	$(SYSTEM_JDK_DIR)/bin/javac $(IT_JAVACFLAGS) \
	  -d $(JUNIT_RUNNER_DIR) \
	  $(call composeclasspath, $(JUNIT_RUNTIME) $(TEST_EXTENSIONS_DIR)) \
	  @junit-runner-source-files.txt && \
	$(SYSTEM_JDK_DIR)/bin/jar cf $@  -C $(JUNIT_RUNNER_DIR) .

stamps/junit-jnlp-dist-dirs: junit-jnlp-dist-simple.txt stamps/junit-jnlp-dist-signed.stamp junit-jnlp-dist-custom.txt
	mkdir -p $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)
	mkdir -p $(REPRODUCERS_BUILD_DIR)
	touch $@

junit-jnlp-dist-custom.txt:
1652
	rm -f $(abs_top_builddir)/$@ ; \
1653 1654
	cd $(REPRODUCERS_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/ ; \
	for x in $(COMPILE_WHITELIST_FILTER) ; do \
1655
	  find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" | grep $$x >> $(abs_top_builddir)/$@ || true ; \
1656 1657 1658
	done

junit-jnlp-dist-simple.txt:
1659
	rm -f $(abs_top_builddir)/$@ ; \
1660 1661
	cd $(REPRODUCERS_TESTS_SRCDIR)/simple/ ; \
	for x in $(COMPILE_WHITELIST_FILTER) ; do \
1662
	  find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" | grep $$x >> $(abs_top_builddir)/$@ || true ; \
1663 1664 1665 1666 1667
	done

stamps/junit-jnlp-dist-signed.stamp:
	types=($(SIGNED_REPRODUCERS)) ; \
	for which in "$${types[@]}" ; do \
1668
	  rm -f $(abs_top_builddir)/junit-jnlp-dist-$$which.txt ; \
1669 1670
	  pushd $(REPRODUCERS_TESTS_SRCDIR)/$$which/ ; \
	    for x in $(COMPILE_WHITELIST_FILTER) ; do \
1671
	      find .  -maxdepth 1 -mindepth 1 | sed "s/.\/*//" | grep $$x >> $(abs_top_builddir)/junit-jnlp-dist-$$which.txt ; \
1672 1673 1674 1675 1676 1677 1678 1679 1680
	    done ; \
	  popd ; \
	done ; \
	mkdir -p stamps && \
	touch $@

stamps/netx-dist-tests-prepare-reproducers.stamp: stamps/junit-jnlp-dist-dirs stamps/liveconnect-dist.stamp stamps/netx-dist.stamp stamps/plugin.stamp
	types=($(ALL_NONCUSTOM_REPRODUCERS)); \
	for which in "$${types[@]}" ; do \
1681 1682
	  . $(TOP_SRC_DIR)/NEW_LINE_IFS ; \
	  simpleReproducers=(`cat $(TOP_BUILD_DIR)/junit-jnlp-dist-$$which.txt `); \
1683 1684 1685 1686 1687 1688 1689 1690 1691
	  IFS="$$IFS_BACKUP" ; \
	  for dir in "$${simpleReproducers[@]}" ; do \
	    echo "processing: $$dir" ; \
	    mkdir -p "$(REPRODUCERS_BUILD_DIR)/$$dir" ; \
	    if [ -e "$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/srcs/" ]; then \
	      d=`pwd` ; \
	      cd "$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/srcs/" ; \
	      srcFiles=`find . -mindepth 1 -type f -name "*.java" | sed "s/.\/*//"` ; \
	      notSrcFiles=`find . -mindepth 1 -type f \! -name "*.java" | sed "s/.\/*//"` ; \
1692
	      $(SYSTEM_JDK_DIR)/bin/javac -cp $(NETX_DIR)/lib/classes.jar\$(CLASSPATH_SEPARATOR)$(TOP_BUILD_DIR)/liveconnect -d "$(REPRODUCERS_BUILD_DIR)/$$dir/" $$srcFiles ; \
1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707
	      if [ -n "$$notSrcFiles" ] ; then \
	        cp -R --parents $$notSrcFiles "$(REPRODUCERS_BUILD_DIR)/$$dir/" ; \
	      fi ; \
	      cd "$(REPRODUCERS_BUILD_DIR)/$$dir/" ; \
	      if [ -f $(META_MANIFEST) ]; \
	      then \
	        $(SYSTEM_JDK_DIR)/bin/jar cfm "$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" $(META_MANIFEST) * ; \
	      else \
	        $(SYSTEM_JDK_DIR)/bin/jar cf "$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/$$dir.jar" * ; \
	      fi; \
	      AN="Application-Name:" ; \
	      grep $$AN $(META_MANIFEST) 2>/dev/null >/dev/null ; \
	      GREP_R=$$?; \
	      if [ ! -f $(META_MANIFEST) -o  $$GREP_R -ne 0  ]; \
	      then \
1708
	       export TMP_MANIFEST=`mktemp` ; \
1709
	       echo "$$AN $$dir" > $$TMP_MANIFEST ; \
1710 1711 1712
	       if  which cygpath &> /dev/null  ; then \
	         export TMP_MANIFEST=$$(cygpath -p -m "$$TMP_MANIFEST") ; \
	       fi ; \
1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723
	       $(SYSTEM_JDK_DIR)/bin/jar ufm "$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/$$dir.jar"  $$TMP_MANIFEST ; \
	       rm -f $$TMP_MANIFEST ; \
	      fi ; \
	      cd "$$d" ; \
	    fi; \
	  done ; \
	done ; \
	mkdir -p stamps && \
	touch $@

stamps/netx-dist-tests-sign-some-reproducers.stamp: stamps/netx-dist-tests-prepare-reproducers.stamp
1724
	export keystore=$(TOP_BUILD_DIR)/$(PRIVATE_KEYSTORE_NAME); \
1725 1726 1727 1728
	types=($(SIGNED_REPRODUCERS)) ; \
	for which in "$${types[@]}" ; do \
	  tcaw=$(TEST_CERT_ALIAS)_$$which ; \
	  $(SYSTEM_JRE_DIR)/bin/keytool -genkey -alias $$tcaw -keystore $$keystore -keypass $(PRIVATE_KEYSTORE_PASS) -storepass $(PRIVATE_KEYSTORE_PASS) -dname "cn=$$tcaw, ou=$$tcaw, o=$$tcaw, c=$$tcaw" ; \
1729 1730
	    . $(TOP_SRC_DIR)/NEW_LINE_IFS ; \
	  signedReproducers=(`cat $(TOP_BUILD_DIR)/junit-jnlp-dist-$$which.txt `); \
1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742
	    IFS="$$IFS_BACKUP" ; \
	  for dir in "$${signedReproducers[@]}" ; do \
	   $(SYSTEM_JDK_DIR)/bin/jarsigner -keystore $$keystore -storepass $(PRIVATE_KEYSTORE_PASS) -keypass $(PRIVATE_KEYSTORE_PASS)  "$(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/$$dir.jar"  $$tcaw ; \
	  done ; \
	done ; \
	mkdir -p stamps && \
	touch $@

stamps/change-dots-to-paths.stamp: stamps/netx-dist-tests-sign-some-reproducers.stamp
	pushd  $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR); \
	types=($(ALL_NONCUSTOM_REPRODUCERS)); \
	for which in "$${types[@]}" ; do \
1743 1744
	  . $(TOP_SRC_DIR)/NEW_LINE_IFS ; \
	  simpleReproducers=(`cat $(TOP_BUILD_DIR)/junit-jnlp-dist-$$which.txt `); \
1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774
	  IFS="$$IFS_BACKUP" ; \
	  for dir in "$${simpleReproducers[@]}" ; do \
	    if test "$${dir:0:1}" = "." ; then \
	      echo "reproducer $$dir starts with dot. It is forbidden" ; \
	      exit 5; \
	    fi; \
	    if test "$${dir:(-1)}" = "." ; then \
	      echo "reproducer $$dir ends with dot. It is forbidden" ; \
	      exit 5; \
	    fi; \
	    q=`expr index "$$dir" .`; \
	    r=$$? ; \
	    if [ $$r = 0  ]; then \
	      slashed_dir="./$${dir//.//}" ; \
	      path="`dirname $$slashed_dir`" ; \
	      file="`basename $$slashed_dir`.jar" ; \
	      echo "copying $$dir.jar to $$path as $$file" ; \
	      mkdir --parents $$path ; \
	      cp $$dir".jar" "$$path"/"$$file" ; \
	    fi ; \
	  done ; \
	done ; \
	popd ; \
	mkdir -p stamps && \
	touch $@

#this always tries to remove  previous testcert
#the code is copypasted from netx-dist-tests-remove-cert-from-public, because 
#with depending to not stamped target we always have to rerun reproducers targets
stamps/exported-test-certs.stamp: stamps/change-dots-to-paths.stamp
1775
	types=($(SIGNED_REPRODUCERS)) ; \
1776 1777 1778 1779
	PUBLIC_KEYSTORE=$$XDG_CONFIG_HOME ; \
	if test "x$$PUBLIC_KEYSTORE" = x; then \
	  PUBLIC_KEYSTORE=${HOME}/.config ; \
	fi ;\
1780 1781 1782 1783 1784 1785
	export PUBLIC_KEYSTORE=$$PUBLIC_KEYSTORE/$(PUBLIC_KEYSTORE_STUB); \
	if  which cygpath &> /dev/null  ; then \
	  export PUBLIC_KEYSTORE=$$(cygpath -p -m "$$PUBLIC_KEYSTORE") ; \
	fi ; \
	keystoredir=`dirname $$PUBLIC_KEYSTORE`; \
	[ ! -d $$keystoredir ] && mkdir -p $$keystoredir; \
1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801
	for which in "$${types[@]}" ; do \
	  $(SYSTEM_JDK_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $$PUBLIC_KEYSTORE -storepass $(PUBLIC_KEYSTORE_PASS) ; \
	done ;
	types=($(SIGNED_REPRODUCERS)) ; \
	for which in "$${types[@]}" ; do \
	  $(SYSTEM_JDK_DIR)/bin/keytool -export -alias $(TEST_CERT_ALIAS)_$$which -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) -storepass $(PRIVATE_KEYSTORE_PASS) -keystore $(PRIVATE_KEYSTORE_NAME) ; \
	done ;
	mkdir -p stamps && \
	touch $@

stamps/netx-dist-tests-import-cert-to-public: stamps/exported-test-certs.stamp
	types=($(SIGNED_REPRODUCERS)) ; \
	PUBLIC_KEYSTORE=$$XDG_CONFIG_HOME ; \
	if test "x$$PUBLIC_KEYSTORE" = x; then \
	  PUBLIC_KEYSTORE=${HOME}/.config ; \
	fi ;\
1802 1803 1804 1805 1806 1807
	export PUBLIC_KEYSTORE=$$PUBLIC_KEYSTORE/$(PUBLIC_KEYSTORE_STUB); \
	if  which cygpath &> /dev/null  ; then \
	  export PUBLIC_KEYSTORE=$$(cygpath -p -m "$$PUBLIC_KEYSTORE") ; \
	fi ; \
	keystoredir=`dirname $$PUBLIC_KEYSTORE`; \
	[ ! -d $$keystoredir ] && mkdir -p $$keystoredir; \
1808 1809 1810 1811 1812 1813 1814
	for which in "$${types[@]}" ; do \
	  yes | $(SYSTEM_JDK_DIR)/bin/keytool -import -alias $(TEST_CERT_ALIAS)_$$which -keystore $$PUBLIC_KEYSTORE -storepass $(PUBLIC_KEYSTORE_PASS) -file $(EXPORTED_TEST_CERT_PREFIX)_$$which.$(EXPORTED_TEST_CERT_SUFFIX) ;\
	done ;
	mkdir -p stamps && \
	touch $@

netx-dist-tests-remove-cert-from-public:
1815
	types=($(SIGNED_REPRODUCERS)) ; \
1816 1817 1818 1819
	PUBLIC_KEYSTORE=$$XDG_CONFIG_HOME ; \
	if test "x$$PUBLIC_KEYSTORE" = x; then \
	  PUBLIC_KEYSTORE=${HOME}/.config ; \
	fi ;\
1820 1821 1822 1823 1824 1825
	export PUBLIC_KEYSTORE=$$PUBLIC_KEYSTORE/$(PUBLIC_KEYSTORE_STUB); \
	if  which cygpath &> /dev/null  ; then \
	  export PUBLIC_KEYSTORE=$$(cygpath -p -m "$$PUBLIC_KEYSTORE") ; \
	fi ; \
	keystoredir=`dirname $$PUBLIC_KEYSTORE`; \
	[ ! -d $$keystoredir ] && mkdir -p $$keystoredir; \
1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839
	for which in "$${types[@]}" ; do \
	  $(SYSTEM_JDK_DIR)/bin/keytool -delete -alias $(TEST_CERT_ALIAS)_$$which -keystore $$PUBLIC_KEYSTORE -storepass $(PUBLIC_KEYSTORE_PASS) ; \
	done ;
	-rm -rf stamps/netx-dist-tests-import-cert-to-public

test-extensions-source-files.txt:
	find $(TEST_EXTENSIONS_SRCDIR) -name '*.java' | sort > $@

stamps/test-extensions-compile.stamp: stamps/netx-dist.stamp stamps/plugin.stamp stamps/junit-jnlp-dist-dirs test-extensions-source-files.txt
	mkdir -p $(TEST_EXTENSIONS_DIR);
	mkdir -p $(NETX_TEST_DIR);
	ln -s $(TEST_EXTENSIONS_DIR) $(TEST_EXTENSIONS_COMPATIBILITY_SYMLINK);
	$(SYSTEM_JDK_DIR)/bin/javac $(IT_JAVACFLAGS) \
	 -d $(TEST_EXTENSIONS_DIR) \
1840
	 $(call composeclasspath, $(JUNIT_RUNTIME) $(NETX_DIR)/lib/classes.jar $(TOP_BUILD_DIR)/liveconnect/lib/classes.jar) \
1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851
	 @test-extensions-source-files.txt && \
	mkdir -p stamps && \
	touch $@

test-extensions-tests-source-files.txt:
	for x in $(COMPILE_WHITELIST_FILTER) ; do \
	  find $(TEST_EXTENSIONS_TESTS_SRCDIR) -name '*.java' | grep $$x | sort > $@ ; \
	done

stamps/test-extensions-tests-compile.stamp: stamps/junit-jnlp-dist-dirs test-extensions-tests-source-files.txt  stamps/test-extensions-compile.stamp
	mkdir -p $(TEST_EXTENSIONS_TESTS_DIR);
1852
	for x in `cat $(TOP_BUILD_DIR)/test-extensions-tests-source-files.txt` ; do \
1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864
	  $(SYSTEM_JDK_DIR)/bin/javac $(IT_JAVACFLAGS) \
	   -d $(TEST_EXTENSIONS_TESTS_DIR) \
	   $(call composeclasspath, $(JUNIT_RUNTIME) $(NETX_DIR)/lib/classes.jar $(TEST_EXTENSIONS_DIR)) \
	   $$x ; \
	done ; \
	mkdir -p stamps && \
	touch $@

stamps/compile-reproducers-testcases.stamp: stamps/netx-dist.stamp stamps/plugin.stamp stamps/junit-jnlp-dist-dirs \
 test-extensions-source-files.txt stamps/test-extensions-compile.stamp stamps/test-extensions-tests-compile.stamp
	types=($(ALL_REPRODUCERS)); \
	for which in "$${types[@]}" ; do \
1865 1866
	  . $(TOP_SRC_DIR)/NEW_LINE_IFS ; \
	  simpleReproducers=(`cat $(TOP_BUILD_DIR)/junit-jnlp-dist-$$which.txt `); \
1867 1868
	  IFS="$$IFS_BACKUP" ; \
	  for dir in "$${simpleReproducers[@]}" ; do \
1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880
	    TESTCASEPATH="$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/testcases" ; \
	    if [ -d "$$TESTCASEPATH" ]; then \
	        echo "compiling" $$dir ; \
	        pushd "$$TESTCASEPATH" ; \
	        REGEX=".*\\.java$$" ; \
	        JAVAFILES=`find . | grep "$$REGEX"` ; \
	        NONJAVA_RESOURCES=`find . | grep -v "$$REGEX"` ; \
		    echo $$JAVAFILES ; \
		    echo $$NONJAVA_RESOURCES ; \
	        $(SYSTEM_JDK_DIR)/bin/javac $(IT_JAVACFLAGS) \
	          -d $(TEST_EXTENSIONS_TESTS_DIR) \
	          $(call composeclasspath, $(JUNIT_RUNTIME) $(NETX_DIR)/lib/classes.jar $(TEST_EXTENSIONS_DIR)) $$JAVAFILES ; \
1881
	        if [ -n "$$NONJAVA_RESOURCES" ]; then \
1882
	            cp --parents $$NONJAVA_RESOURCES $(TEST_EXTENSIONS_TESTS_DIR)/ ; \
1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893
	        fi ; \
	        popd ; \
	    fi ; \
	  done ; \
	done ; \
	mkdir -p stamps && \
	touch $@

stamps/copy-reproducers-resources.stamp: stamps/junit-jnlp-dist-dirs
	types=($(ALL_REPRODUCERS)); \
	for which in "$${types[@]}" ; do \
1894 1895
	  . $(TOP_SRC_DIR)/NEW_LINE_IFS ; \
	  simpleReproducers=(`cat $(TOP_BUILD_DIR)/junit-jnlp-dist-$$which.txt `); \
1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927
	  IFS="$$IFS_BACKUP" ; \
	  for dir in "$${simpleReproducers[@]}" ; do \
	    cp -R "$(REPRODUCERS_TESTS_SRCDIR)/$$which/$$dir/resources/"*  $(REPRODUCERS_TESTS_SERVER_DEPLOYDIR)/ ; \
	  done ; \
	done ; \
	mkdir -p stamps && \
	touch $@

$(REPRODUCERS_CLASS_NAMES):
	whiteListed=$(RUN_WHITELIST_FILTER); \
	cd $(TEST_EXTENSIONS_TESTS_DIR) ; \
	class_names= ; \
	for test in `find -type f` ; do \
	  class_name=`echo $$test | sed -e 's|\.class$$||' -e 's|^\./||'` ; \
	  class_name=`echo $$class_name | sed -e 's|/|.|g' ` ; \
	  INCLUDE="NO" ; \
	  for x in $$whiteListed ; do \
	    q=`expr match "$$class_name" "$$x"`; \
	    r=$$? ; \
	    if [ $$r = 0  ]; then \
	      echo "$$class_name will be included in reproducers testcases because of $$x pattern in $(REPRODUCERS_CLASS_WHITELIST). Matching was  $$q"; \
	      INCLUDE="YES" ; \
	    fi; \
	  done; \
	  if [ "$$INCLUDE" = "YES" ]; then \
	    class_names="$$class_names $$class_name" ; \
	  else \
	    echo "$$class_name had no match in $(REPRODUCERS_CLASS_WHITELIST). Excluding"; \
	  fi; \
	done ; \
	echo $$class_names > $(REPRODUCERS_CLASS_NAMES)

1928 1929
stamps/run-netx-dist-tests.stamp: stamps/netx-dist.stamp stamps/plugin.stamp stamps/docs.stamp \
 $(LAUNCHERS) $(DESKTOP_FILES) \
1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945
 stamps/netx.stamp stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
 stamps/test-extensions-compile.stamp stamps/compile-reproducers-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/copy-reproducers-resources.stamp\
 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES) stamps/process-custom-reproducers.stamp
	cd $(TEST_EXTENSIONS_DIR) ; \
	class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \
	CLASSPATH=$(call joinsegments, $(NETX_DIR)/lib/classes.jar $(JUNIT_RUNTIME) $(JUNIT_RUNNER_JAR) . $(TEST_EXTENSIONS_TESTS_DIR) $(TEST_EXTENSIONS_SRCDIR)) ; \
	  $(SYSTEM_JRE_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \
	 -Xbootclasspath/a:$$CLASSPATH CommandLine $$class_names
@WITH_XSLTPROC_TRUE@	-$(XSLTPROC)  --stringparam logs logs_reproducers.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(TEST_EXTENSIONS_DIR)/tests-output.xml > $(TESTS_DIR)/index_reproducers.html
@WITH_XSLTPROC_TRUE@	-$(XSLTPROC)  $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(TEST_EXTENSIONS_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_reproducers.html
@WITH_XSLTPROC_TRUE@	-$(XSLTPROC)  $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/textreport.xsl $(TEST_EXTENSIONS_DIR)/tests-output.xml > $(TESTS_DIR)/summary_reproducers.txt
	touch $@

stamps/process-custom-reproducers.stamp: stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \
 stamps/test-extensions-compile.stamp stamps/compile-reproducers-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/copy-reproducers-resources.stamp\
 $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES)
1946 1947
	. $(TOP_SRC_DIR)/NEW_LINE_IFS ; \
	customReproducers=(`cat $(TOP_BUILD_DIR)/junit-jnlp-dist-custom.txt `); \
1948 1949 1950 1951 1952 1953 1954 1955 1956 1957
	IFS="$$IFS_BACKUP" ; \
	for dir in "$${customReproducers[@]}" ; do \
	  pushd $(REPRODUCERS_TESTS_SRCDIR)/$(CUSTOM_REPRODUCERS)/$$dir/srcs; \
	  $(MAKE) prepare-reproducer ; \
	  popd ; \
	done ; \
	mkdir -p stamps && \
	touch $@

clean-custom-reproducers: junit-jnlp-dist-custom.txt
1958 1959
	. $(TOP_SRC_DIR)/NEW_LINE_IFS ; \
	customReproducers=(`cat $(TOP_BUILD_DIR)/junit-jnlp-dist-custom.txt `); \
1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970
	IFS="$$IFS_BACKUP" ; \
	for dir in "$${customReproducers[@]}" ; do \
	  pushd $(REPRODUCERS_TESTS_SRCDIR)/custom/$$dir/srcs; \
	  $(MAKE) clean-reproducer ; \
	  popd ; \
	done ; \
	rm -f stamps/process-custom-reproducers.stamp

#for global-links you must be root, for opera there do not exists user-links
#although this targets will indeed create symbolic links to enable 
#icedtea-web plugin inside browser it is intended for testing purposes
1971
@ENABLE_NATIVE_PLUGIN_TRUE@stamps/user-links.stamp: stamps/netx-dist.stamp stamps/plugin.stamp \
1972
@ENABLE_NATIVE_PLUGIN_TRUE@ $(LAUNCHERS) stamps/netx.stamp $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY)
1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
@ENABLE_NATIVE_PLUGIN_TRUE@	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
@ENABLE_NATIVE_PLUGIN_TRUE@	  if [ -e $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ] ; then \
@ENABLE_NATIVE_PLUGIN_TRUE@	    mv -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)  $(MOZILLA_LOCAL_BACKUP_FILE) ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	    echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) backed up as $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  else \
@ENABLE_NATIVE_PLUGIN_TRUE@	    echo "$(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) doesn't exists, nothing to be backed up to $(MOZILLA_LOCAL_BACKUP_FILE)" ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  fi ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  pushd $(MOZILLA_LOCAL_PLUGINDIR) ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  ln -s $(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) $(PLUGIN_LINK_NAME) ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  echo "$(DESTDIR)$(libdir)/$(BUILT_PLUGIN_LIBRARY) linked as  $$PWD/$(PLUGIN_LINK_NAME)" ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  popd ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	fi ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	touch $@

@ENABLE_NATIVE_PLUGIN_TRUE@restore-user-links:
@ENABLE_NATIVE_PLUGIN_TRUE@	if [ $(MOZILLA_FAMILY_TEST) ]  ; then  \
@ENABLE_NATIVE_PLUGIN_TRUE@	  if [ -e $(MOZILLA_LOCAL_BACKUP_FILE) ] ; then \
@ENABLE_NATIVE_PLUGIN_TRUE@	    mv -f  $(MOZILLA_LOCAL_BACKUP_FILE)  $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	    echo "$(MOZILLA_LOCAL_BACKUP_FILE) restored as $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME)" ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  else \
@ENABLE_NATIVE_PLUGIN_TRUE@	    rm -f $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	    echo "$(MOZILLA_LOCAL_BACKUP_FILE) do not exists, nothing to be restored. $(MOZILLA_LOCAL_PLUGINDIR)/$(PLUGIN_LINK_NAME) removed" ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	  fi ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	fi ;
@ENABLE_NATIVE_PLUGIN_TRUE@	if [ -e stamps/user-links.stamp ] ; then \
@ENABLE_NATIVE_PLUGIN_TRUE@	  rm -f stamps/user-links.stamp ; \
@ENABLE_NATIVE_PLUGIN_TRUE@	fi

2001
@ENABLE_NATIVE_PLUGIN_TRUE@stamps/global-links.stamp: stamps/netx-dist.stamp stamps/plugin.stamp $(LAUNCHERS) \
2002 2003 2004 2005