[rfc][icedtea] makefiel part of fix of rhbz 580478

Jiri Vanek jvanek at redhat.com
Fri Jan 6 00:33:07 PST 2012


On 01/06/2012 08:20 AM, Dr Andrew John Hughes wrote:

Can you this time live with keeping it as it is?
Next time I will try to do this during configure.


Thanx a lot for advices,
   J.

> On 16:33 Thu 05 Jan     , Jiri Vanek wrote:
>> 2011-12-21  Jiri Vanek<jvanek at redhat.com>
>>
>> 	fixes rhbz#580478
>> 	* Makefile.am:
>> 	(EXTRA_DIST) console.desktop policytool.desktop replaced by *.in files
>> 	(clean-local) now depends on new target clean-desktop-files
>> 	(jconsole.desktop) new target which transforms
>> 	jconsole.desktop.in to jconsole.desktop, using default or set value
>> 	(policytool.desktop) new target which transforms
>> 	policytool.desktop.in to  policytool.desktop, using default or set value
>> 	(clean-desktop-files) new target, removes policytool.desktop and jconsole.desktop
>> 	(stamps/icedtea.stamp) now depends also on console.desktop policytool.desktop
>> 	(stamps/icedtea-debug.stamp) likewise, as enforced by stamps/icedtea.stamp comment
>> 	* configure.ac: abs-install-dir block moved outside conditional ENABLE_SYSTEMTAP block
>> 	* jconsole.desktop:  removed, replaced by jconsole.desktop.in
>> 	* jconsole.desktop.in: new file, stub for desktop file, have variable
>> 	 to be substitued during make
>> 	* policytool.desktop:  removed, replaced by policytool.desktop.in
>> 	* policytool.desktop.in: new file, stub for desktop file, have variable
>> 	 to be substituted during make
>>
>>
>> Flowing Andrew's advice, now using abs-install-dir.
>> Your remaining hints were also fixed.  Looks better now :).
>>
>
> Mostly fine, but you can use configure to do the replacement and it'll automatically handle
> removal too.
>
>>
>
>> diff -r cf80d2049346 Makefile.am
>> --- a/Makefile.am	Tue Dec 20 13:49:11 2011 -0500
>> +++ b/Makefile.am	Thu Jan 05 15:59:47 2012 +0100
>> @@ -616,7 +616,7 @@
>>   	$(top_srcdir)/patches/* \
>>   	contrib arm_port \
>>   	overlays \
>> -	jconsole.desktop policytool.desktop \
>> +	jconsole.desktop.in policytool.desktop.in \
>>   	$(JTREG_SRCS) HACKING pulseaudio fsg.sh \
>>   	hotspot.map \
>>   	autogen.sh \
>> @@ -641,7 +641,7 @@
>>    clean-icedtea-against-ecj clean-extract-ecj clean-generated clean-replace-hotspot \
>>    clean-rewriter clean-rewrite-rhino clean-rt clean-bootstrap-directory \
>>    clean-bootstrap-directory-ecj clean-bootstrap-directory-symlink \
>> - clean-bootstrap-directory-symlink-ecj clean-fonts
>> + clean-bootstrap-directory-symlink-ecj clean-fonts clean-desktop-files
>>   	if [ -e bootstrap ]; then \
>>   	  rmdir bootstrap ; \
>>   	fi
>
> Looks ok.
>
>> @@ -702,8 +702,21 @@
>>   # OpenJDK Source Preparation Targets
>>   # ==================================
>>
>> -# Download OpenJDK sources.
>> +jconsole.desktop: jconsole.desktop.in
>> +	xabs_path=$(ABS_JAVA_HOME_DIR) ; \
>> +	if [ "$$xabs_path" =  ""  ]; then \
>> +	  xabs_path=/usr ; \
>> +	fi ; \
>> +	sed s, at JCONSOLE_DESKTOP@,$$xabs_path/bin/jconsole,<  jconsole.desktop.in>  jconsole.desktop
>>
>> +policytool.desktop: policytool.desktop.in
>> +	xabs_path=$(ABS_JAVA_HOME_DIR) ; \
>> +	if [ "$$xabs_path" =  ""  ]; then \
>> +	  xabs_path=/usr ; \
>> +	fi ; \
>> +	sed s, at POLICYTOOL_DESKTOP@,$$xabs_path/bin/policytool,<  policytool.desktop.in>  policytool.desktop
>> +
>> +# Download OpenJDK sources.	
>
> You don't need to do this.  configure will do it for you.
>
>    AC_CONFIG_FILES([jconsole.desktop])
>    AC_CONFIG_FILES([policytool.desktop])
>
> Look at how SystemTap does it.
>
>>   stamps/hgforest.stamp:
>>   if !USE_HG
>>   else
>> @@ -1073,6 +1086,10 @@
>>   clean-fonts:
>>   	rm -f stamps/fonts.stamp
>>
>> +clean-desktop-files:
>> +	-rm -f policytool.desktop
>> +	-rm -f jconsole.desktop
>> +
>
> Likewise, this is unnecessary if you let configure handle it.
>
>>   stamps/patch-fsg.stamp: stamps/fonts.stamp
>>   	mkdir -p stamps ; \
>>   	rm -f stamps/patch-fsg.stamp.tmp ; \
>> @@ -1381,7 +1398,7 @@
>>   # you change it in the icedtea-debug target as well.
>>   stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \
>>    $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \
>> - stamps/jamvm.stamp
>> + stamps/jamvm.stamp jconsole.desktop policytool.desktop
>>   	$(ARCH_PREFIX) $(MAKE) -j1 \
>>   	  $(ICEDTEA_ENV) \
>>   	  -C openjdk \
>> @@ -1412,7 +1429,7 @@
>>
>>   stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink.stamp \
>>    $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \
>> - stamps/jamvm.stamp
>> + stamps/jamvm.stamp jconsole.desktop policytool.desktop
>>   	$(ARCH_PREFIX) $(MAKE) -j1 \
>>   	  $(ICEDTEA_ENV) \
>>   	  -C openjdk \
>> diff -r cf80d2049346 configure.ac
>> --- a/configure.ac	Tue Dec 20 13:49:11 2011 -0500
>> +++ b/configure.ac	Thu Jan 05 15:59:47 2012 +0100
>> @@ -265,6 +265,18 @@
>>     fi
>>   fi
>>
>> +AC_MSG_CHECKING([for absolute java home install dir])
>> +AC_ARG_WITH([abs-install-dir],
>> +	     [AS_HELP_STRING([--with-abs-install-dir],
>> +			     [The absolute path where the j2sdk-image dir will be installed])],
>> +	     [if test "x${withval}" = x; then
>> +		ABS_JAVA_HOME_DIR="${abs_top_builddir}/${OPENJDK_BUILD_DIR}/j2sdk-image"
>> +	     else
>> +		ABS_JAVA_HOME_DIR="${withval}"
>> +	     fi], [ABS_JAVA_HOME_DIR="${abs_top_builddir}/${OPENJDK_BUILD_DIR}/j2sdk-image"])
>> +AC_MSG_RESULT([${ABS_JAVA_HOME_DIR}])
>> +AC_SUBST(ABS_JAVA_HOME_DIR)
>> +
>>   if test "x${ENABLE_SYSTEMTAP}" = xyes; then
>>   AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'],
>>                   [SDT_H_FOUND='no';
>> @@ -306,19 +318,8 @@
>>   ]])], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([systemtap sdt.h or g++ too old])])
>>     AC_LANG_POP([C++])
>>
>> -  AC_MSG_CHECKING([for absolute java home install dir])
>> -  AC_ARG_WITH([abs-install-dir],
>> -	      [AS_HELP_STRING([--with-abs-install-dir],
>> -			      [The absolute path where the j2sdk-image dir will be installed])],
>> -	      [if test "x${withval}" = x; then
>> -		 ABS_JAVA_HOME_DIR="${abs_top_builddir}/${OPENJDK_BUILD_DIR}/j2sdk-image"
>> -	       else
>> -		 ABS_JAVA_HOME_DIR="${withval}"
>> -	       fi], [ABS_JAVA_HOME_DIR="${abs_top_builddir}/${OPENJDK_BUILD_DIR}/j2sdk-image"])
>> -  AC_MSG_RESULT([${ABS_JAVA_HOME_DIR}])
>>     ABS_CLIENT_LIBJVM_SO="${ABS_JAVA_HOME_DIR}/jre/lib/${INSTALL_ARCH_DIR}/client/libjvm.so"
>>     ABS_SERVER_LIBJVM_SO="${ABS_JAVA_HOME_DIR}/jre/lib/${INSTALL_ARCH_DIR}/server/libjvm.so"
>> -  AC_SUBST(ABS_JAVA_HOME_DIR)
>>     AC_SUBST(ABS_CLIENT_LIBJVM_SO)
>>     AC_SUBST(ABS_SERVER_LIBJVM_SO)
>>     AC_CONFIG_FILES([tapset/hotspot.stp])
>> diff -r cf80d2049346 jconsole.desktop
>> --- a/jconsole.desktop	Tue Dec 20 13:49:11 2011 -0500
>> +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> @@ -1,10 +0,0 @@
>> -[Desktop Entry]
>> -Name=OpenJDK Monitoring&  Management Console
>> -Comment=Monitor and manage OpenJDK applications
>> -Exec=/usr/bin/jconsole
>> -Icon=java
>> -Terminal=false
>> -Type=Application
>> -StartupWMClass=sun-tools-jconsole-JConsole
>> -Categories=Development;Monitor;Java;
>> -Version=1.0
>> diff -r cf80d2049346 jconsole.desktop.in
>> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> +++ b/jconsole.desktop.in	Thu Jan 05 15:59:47 2012 +0100
>> @@ -0,0 +1,10 @@
>> +[Desktop Entry]
>> +Name=OpenJDK Monitoring&  Management Console
>> +Comment=Monitor and manage OpenJDK applications
>> +Exec=@JCONSOLE_DESKTOP@
>> +Icon=java
>> +Terminal=false
>> +Type=Application
>> +StartupWMClass=sun-tools-jconsole-JConsole
>> +Categories=Development;Monitor;Java;
>> +Version=1.0
>> diff -r cf80d2049346 policytool.desktop
>> --- a/policytool.desktop	Tue Dec 20 13:49:11 2011 -0500
>> +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> @@ -1,10 +0,0 @@
>> -[Desktop Entry]
>> -Name=OpenJDK Policy Tool
>> -Comment=Manage OpenJDK policy files
>> -Exec=/usr/bin/policytool
>> -Icon=java
>> -Terminal=false
>> -Type=Application
>> -StartupWMClass=sun-security-tools-PolicyTool
>> -Categories=Development;Java;
>> -Version=1.0
>> diff -r cf80d2049346 policytool.desktop.in
>> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
>> +++ b/policytool.desktop.in	Thu Jan 05 15:59:47 2012 +0100
>> @@ -0,0 +1,10 @@
>> +[Desktop Entry]
>> +Name=OpenJDK Policy Tool
>> +Comment=Manage OpenJDK policy files
>> +Exec=@POLICYTOOL_DESKTOP@
>> +Icon=java
>> +Terminal=false
>> +Type=Application
>> +StartupWMClass=sun-security-tools-PolicyTool
>> +Categories=Development;Java;
>> +Version=1.0
>
>




More information about the distro-pkg-dev mailing list