[openbsd] Remove gnuisms from icedtea-web's Makefile.in, and fix install calls
Dr Andrew John Hughes
ahughes at redhat.com
Wed Aug 24 16:50:27 PDT 2011
On 16:51 Wed 24 Aug , Deepak Bhole wrote:
> * Landry Breuil <landry at openbsd.org> [2011-08-23 08:14]:
> > Hi,
> >
> > just a quick note to let you know that icedtea-web 1.1.1 works fine on
> > OpenBSD with sun's openjdk 1.7 (with the applet_hole.patch). I just had
> > to apply a little (attached patch) :
> > - cp -a is a gnu cp option, don't use it
> > - install -D is a gnu install option, add a plain install -d call to
> > create the parent dirs
> > - on OpenBSD, INSTALL_DATA is set by the ports infrastructure and uses
> > -o/-g by default, as it's supposed to be used during make install
> > (which is run as root). For the 'stamp files', icedtea-web calls
> > INSTALL_DATA during make step, which is run as regular user, thus
> > install -o/-g fails. Hence, use a plain install -c -m 644 command
> > instead of relying on INSTALL_DATA.
> >
> > There are more hunks in that patch, but they're openbsd-specific so i'm
> > not pushing them. We'll soon ship icedtea-web in our ports-tree.
> >
> > Landry
>
> Thanks for the patch!
>
> I assume you meant to make the changes to Makefile.am? Anyway, I made it
> so but I found some issues on Linux. Specifically, the doc dirs don't
> get created without the -D.
>
Well, yes because -d just creates directories while -D installs files,
creating any directories needed.
Are you sure the patch below works by just removing -D? Are you trying
the install on a clean tree? It's not obvious to me how netx gets
created.
Bare install shouldn't be used; use ${INSTALL}.
Also you seem to be removing all the INSTALL_DATA targets whereas it's
just the usage in each of netx and extra-class-files that's at
issue.
cp -p is closer to the status quo than just reverting to cp.
Have you tested this with make distcheck?
Isn't it time *BSD got some usable tools? ;-)
> I am attaching a new patch that works fine in Linux. Can you please
> confirm if it is fine on BSD too?
>
> Thanks,
> Deepak
>
> > $OpenBSD$
> > --- Makefile.in.orig Fri Jul 15 22:03:11 2011
> > +++ Makefile.in Thu Aug 4 15:19:39 2011
> > @@ -654,12 +654,12 @@ install-data-local:
> > @ENABLE_DOCS_TRUE@ (cd ${abs_top_builddir}/docs/netx; \
> > @ENABLE_DOCS_TRUE@ for files in $$(find . -type f); \
> > @ENABLE_DOCS_TRUE@ do \
> > - at ENABLE_DOCS_TRUE@ ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/netx/$${files}; \
> > + at ENABLE_DOCS_TRUE@ ${INSTALL_DATA} $${files} $(DESTDIR)$(htmldir)/netx/$${files}; \
> > @ENABLE_DOCS_TRUE@ done)
> > @ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ (cd ${abs_top_builddir}/docs/plugin; \
> > @ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ for files in $$(find . -type f); \
> > @ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ do \
> > - at ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/plugin/$${files}; \
> > + at ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ ${INSTALL_DATA} $${files} $(DESTDIR)$(htmldir)/plugin/$${files}; \
> > @ENABLE_DOCS_TRUE@@ENABLE_PLUGIN_TRUE@ done)
> >
> > uninstall-local:
> > @@ -768,14 +768,15 @@ stamps/netx.stamp: netx-source-files.txt stamps/bootst
> > -bootclasspath $(RUNTIME) \
> > @netx-source-files.txt
> > (cd $(NETX_RESOURCE_DIR); \
> > + install -d $(NETX_DIR)/net/sourceforge/jnlp/resources/ ; \
> > for files in $$(find . -type f); \
> > do \
> > - ${INSTALL_DATA} -D $${files} \
> > + install -c -m 644 $${files} \
> > $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \
> > done)
> > - cp -a $(NETX_SRCDIR)/net/sourceforge/jnlp/runtime/pac-funcs.js \
> > + cp $(NETX_SRCDIR)/net/sourceforge/jnlp/runtime/pac-funcs.js \
> > $(NETX_DIR)/net/sourceforge/jnlp/runtime
> > - cp -a build.properties $(NETX_DIR)/net/sourceforge/jnlp/
> > + cp build.properties $(NETX_DIR)/net/sourceforge/jnlp/
> > mkdir -p stamps
> > touch $@
> >
> > @@ -811,9 +812,10 @@ stamps/extra-class-files.stamp: extra-source-files.txt
> > -sourcepath $(abs_top_srcdir)/extra -cp netx.build \
> > -bootclasspath $(RUNTIME) @extra-source-files.txt
> > (cd $(NETX_EXTRA_DIR); \
> > + install -d $(NETX_EXTRA_DIST_DIR) ; \
> > for files in $$(find . -type f); \
> > do \
> > - ${INSTALL_DATA} -D $${files} \
> > + install -c -m 644 $${files} \
> > $(NETX_EXTRA_DIST_DIR)/$${files}; \
> > done)
> > mkdir -p stamps
>
> diff -r 36270c76a533 Makefile.am
> --- a/Makefile.am Wed Aug 24 15:17:46 2011 -0400
> +++ b/Makefile.am Wed Aug 24 16:49:53 2011 -0400
> @@ -166,15 +166,19 @@
> if ENABLE_DOCS
> ${mkinstalldirs} $(DESTDIR)$(htmldir)
> (cd ${abs_top_builddir}/docs/netx; \
> + install -d $(DESTDIR)$(htmldir)/netx; \
> for files in $$(find . -type f); \
> do \
> - ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/netx/$${files}; \
> + install -d $$(dirname "$(DESTDIR)$(htmldir)/netx/$${files}"); \
> + ${INSTALL_DATA} $${files} $(DESTDIR)$(htmldir)/netx/$${files}; \
> done)
> if ENABLE_PLUGIN
> (cd ${abs_top_builddir}/docs/plugin; \
> + install -d $(DESTDIR)$(htmldir)/plugin; \
> for files in $$(find . -type f); \
> do \
> - ${INSTALL_DATA} -D $${files} $(DESTDIR)$(htmldir)/plugin/$${files}; \
> + install -d $$(dirname "$(DESTDIR)$(htmldir)/plugin/$${files}"); \
> + ${INSTALL_DATA} $${files} $(DESTDIR)$(htmldir)/plugin/$${files}; \
> done)
> endif
> endif
> @@ -304,14 +308,15 @@
> -bootclasspath $(RUNTIME) \
> @netx-source-files.txt
> (cd $(NETX_RESOURCE_DIR); \
> + install -d $(NETX_DIR)/net/sourceforge/jnlp/resources/ ; \
> for files in $$(find . -type f); \
> do \
> - ${INSTALL_DATA} -D $${files} \
> + install -c -m 644 $${files} \
> $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \
> done)
> - cp -a $(NETX_SRCDIR)/net/sourceforge/jnlp/runtime/pac-funcs.js \
> + cp $(NETX_SRCDIR)/net/sourceforge/jnlp/runtime/pac-funcs.js \
> $(NETX_DIR)/net/sourceforge/jnlp/runtime
> - cp -a build.properties $(NETX_DIR)/net/sourceforge/jnlp/
> + cp build.properties $(NETX_DIR)/net/sourceforge/jnlp/
> mkdir -p stamps
> touch $@
>
> @@ -347,9 +352,10 @@
> -sourcepath $(abs_top_srcdir)/extra -cp netx.build \
> -bootclasspath $(RUNTIME) @extra-source-files.txt
> (cd $(NETX_EXTRA_DIR); \
> + install -d $(NETX_EXTRA_DIST_DIR) ; \
> for files in $$(find . -type f); \
> do \
> - ${INSTALL_DATA} -D $${files} \
> + install -c -m 644 $${files} \
> $(NETX_EXTRA_DIST_DIR)/$${files}; \
> done)
> mkdir -p stamps
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and IcedTea
http://www.gnu.org/software/classpath
http://icedtea.classpath.org
PGP Key: F5862A37 (https://keys.indymedia.org/)
Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37
More information about the distro-pkg-dev
mailing list