changeset 60:b1409d2cbd86

Make distcheck work. 2010-11-26 Andrew John Hughes <ahughes@redhat.com> Make distcheck work. * Makefile.am: (EXTRA_DIST): Use relative paths for netx and the plugin. (clean-local): Remove empty stamps directory. (install-exec-local): Use install to install programs and data with the correct permissions. (install-data-local): Likewise. (uninstall-local): Remove documentation. (netx): Use ${INSTALL_DATA} to add resources so that read-only files aren't copied. (extra-files): Likewise. ($(NETX_DIR)/launcher/javaws): Don't create empty launcher directory. (clean-docs): Remove empty docs directory. (clean-bootstrap-directory): Remove empty bootstrap directory.
author Andrew John Hughes <ahughes@redhat.com>
date Tue, 30 Nov 2010 16:53:16 +0000
parents c267c4e2b844
children 2faf3ab9f3c6
files ChangeLog Makefile.am
diffstat 2 files changed, 64 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Nov 29 10:19:17 2010 -0500
+++ b/ChangeLog	Tue Nov 30 16:53:16 2010 +0000
@@ -1,3 +1,23 @@
+2010-11-26  Andrew John Hughes  <ahughes@redhat.com>
+
+	Make distcheck work.
+	* Makefile.am:
+	(EXTRA_DIST): Use relative paths for netx
+	and the plugin.
+	(clean-local): Remove empty stamps directory.
+	(install-exec-local): Use install to install
+	programs and data with the correct permissions.
+	(install-data-local): Likewise.
+	(uninstall-local): Remove documentation.
+	(netx): Use ${INSTALL_DATA} to add resources so
+	that read-only files aren't copied.
+	(extra-files): Likewise.
+	($(NETX_DIR)/launcher/javaws): Don't create empty launcher
+	directory.
+	(clean-docs): Remove empty docs directory.
+	(clean-bootstrap-directory): Remove empty bootstrap
+	directory.
+
 2010-11-29  Deepak Bhole <dbhole@redhat.com>
 
 	* plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
--- a/Makefile.am	Mon Nov 29 10:19:17 2010 -0500
+++ b/Makefile.am	Tue Nov 30 16:53:16 2010 +0000
@@ -83,7 +83,7 @@
 	-Wl,\$$ORIGIN/../jre/lib/$(INSTALL_ARCH_DIR)/jli $(X11_CFLAGS) $(X11_LIBS) -ljli  -ldl -lz
 PLUGIN_VERSION = IcedTea $(PACKAGE_VERSION)$(ICEDTEA_REV)$(ICEDTEA_PKG)
 
-EXTRA_DIST = $(NETX_SRCDIR) $(abs_top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher
+EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher
 
 # Top-Level Targets
 # =================
@@ -93,31 +93,41 @@
 
 clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \
  clean-native-ecj clean-desktop-files clean-docs
+	if [ -e stamps ] ; then \
+	  rmdir stamps ; \
+	fi
 
 .PHONY: clean-IcedTeaPlugin clean-add-netx clean-add-netx-debug clean-add-plugin clean-add-plugin-debug \
  clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs
 
 install-exec-local:
-	mkdir -p $(DESTDIR)$(bindir)
-	mkdir -p $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)
+	${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)
 if ENABLE_PLUGIN
-	cp -pPRf $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/
-	cp -pPRf $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir)
-	cp -pPRf $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar
+	${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/
+	${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir)
+	${INSTALL_PROGRAM} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar
 endif
-	cp -pPRf $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/netx.jar
-	cp -pPRf $(NETX_DIR)/launcher/javaws $(DESTDIR)$(bindir)
-	cp extra-lib/about.jar $(DESTDIR)$(prefix)/jre/lib
+	${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/netx.jar
+	${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(bindir)
+	${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)/jre/lib
 
 install-data-local:
-	mkdir -p $(DESTDIR)$(prefix)/man/man1
-	cp $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1
-	cp $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)/jre/lib
+	${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1
+	${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1
+	${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)/jre/lib
 if ENABLE_DOCS
-	mkdir -p $(DESTDIR)$(htmldir)
-	cp -pPRf ${abs_top_builddir}/docs/netx $(DESTDIR)$(htmldir)
+	${mkinstalldirs} $(DESTDIR)$(htmldir)
+	(cd ${abs_top_builddir}/docs/netx; \
+	 for files in $$(find . -type f); \
+	 do \
+	   ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/netx/$${files}; \
+	 done)
 if ENABLE_PLUGIN
-	cp -pPRf ${abs_top_builddir}/docs/plugin $(DESTDIR)$(htmldir)
+	(cd ${abs_top_builddir}/docs/plugin; \
+	 for files in $$(find . -type f); \
+	 do \
+	   ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/plugin/$${files}; \
+	 done)
 endif
 endif
 
@@ -130,6 +140,7 @@
 	rm -f $(DESTDIR)$(prefix)/man/man1/javaws.1
 	rm -f $(DESTDIR)$(bindir)/pluginappletviewer
 	rm -f $(DESTDIR)$(bindir)/javaws
+	rm -rf $(DESTDIR)$(htmldir)
 
 # Plugin
 
@@ -250,7 +261,12 @@
 	    -sourcepath $(NETX_SRCDIR) \
 	    -bootclasspath $(RUNTIME) \
 	    @netx-source-files.txt
-	cp -r $(NETX_RESOURCE_DIR) $(NETX_DIR)/net/sourceforge/jnlp
+	(cd $(NETX_RESOURCE_DIR); \
+	 for files in $$(find . -type f); \
+	 do \
+	   ${INSTALL_DATA} -D $${files} \
+	   $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \
+	 done)
 	mkdir -p stamps
 	touch $@
 
@@ -285,7 +301,12 @@
 	$(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) -d extra-lib \
           -sourcepath $(abs_top_srcdir)/extra -cp netx.build \
           -bootclasspath $(RUNTIME) @extra-source-files.txt
-	cp -r $(NETX_EXTRA_DIR) extra-lib/net/sourceforge/jnlp/about
+	(cd $(NETX_EXTRA_DIR); \
+	 for files in $$(find . -type f); \
+	 do \
+	   ${INSTALL_DATA} -D $${files} \
+	   ${abs_top_builddir}/extra-lib/net/sourceforge/jnlp/about/resources/$${files}; \
+	 done)
 	mkdir -p stamps
 	touch $@
 
@@ -303,7 +324,6 @@
 	-c -o $@ $<
 
 $(NETX_DIR)/launcher/javaws: $(NETX_LAUNCHER_OBJECTS)
-	mkdir -p launcher
 	$(CC) $(NETX_LAUNCHER_OBJECTS) $(LAUNCHER_LINK)
 
 javaws.desktop: javaws.desktop.in
@@ -315,6 +335,9 @@
 	touch stamps/docs.stamp
 
 clean-docs: clean-netx-docs clean-plugin-docs
+	if [ -e ${abs_top_builddir}/docs ] ; then \
+	  rmdir ${abs_top_builddir}/docs ; \
+	fi
 	rm -f stamps/docs.stamp
 
 stamps/netx-docs.stamp: stamps/bootstrap-directory.stamp
@@ -416,6 +439,9 @@
 
 clean-bootstrap-directory:
 	rm -rf $(BOOT_DIR)
+	if [ -e ${abs_top_builddir}/bootstrap ] ; then \
+	  rmdir ${abs_top_builddir}/bootstrap ; \
+	fi
 	rm -f stamps/bootstrap-directory.stamp
 
 # Target Aliases