Troubles with pkgdata_DATA primary...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a simple makefile.am in my ftk/docs directory. All it's trying to do is build and tar up doxygen docs: ftk/docs/Makefile.am: - --- docpkg = $(PACKAGE)-doxy-$(VERSION) pkgdata_DATA = $(docpkg).tar.gz $(docpkg).tar.gz: doxygen.stamp tar chof - html | gzip -9 -c $@ doxygen.stamp: doxyfile $(DOXYGEN) $ echo Timestamp $@ CLEANFILES = doxywarn.txt doxygen.stamp $(docpkg).tar.gz clean-local: -rm -rf html - --- When I hook this Makefile.am into the build system (via AC_CONFIG_FILES), I get the following from make distcheck: Output: - --- $ cd build; ../configure make distcheck ... Making uninstall in docs make[2]: Entering directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build/docs' rm -f '/tmp/am-dc-2299//home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_inst/share/ftk/ftk-doxy-1.1.tar.gz' make[2]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build/docs' make[2]: Entering directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[2]: Nothing to be done for `uninstall-am'. make[2]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[1]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[1]: Entering directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[1]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[1]: Entering directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' { test ! -d ftk-1.1 || { find ftk-1.1 -type d ! -perm -200 -exec chmod u+w {} ';' rm -fr ftk-1.1; }; } test -d ftk-1.1 || mkdir ftk-1.1 cp: cannot create regular file `ftk-1.1/docs/doxywarn.txt': Permission denied cp: cannot create regular file `ftk-1.1/docs/doxyfile': Permission denied cp: cannot create regular file `ftk-1.1/docs/Makefile': Permission denied cp: cannot create directory `ftk-1.1/docs/html': Permission denied cp: cannot create regular file `ftk-1.1/docs/doxygen.stamp': Permission denied cp: cannot create regular file `ftk-1.1/docs/ftk-doxy-1.1.tar.gz': Permission denied make[1]: *** [distdir] Error 1 make[1]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make: *** [distcheck] Error 2 - --- Do I misunderstand the use of the DATA primary? Perhaps DATA files are not allowed to be built? I can't find anything in the Automake docs about required properties of DATA files, and I don't get enough output from make to determine where this problem is occurring in the Makefile. One clue - I tried running this command using a -d on the make command line. Of course, I got tons more output, but one interesting clue was that make told me just before the failed copy commands above that destdir needed to be rebuilt...strange. Thanks in advance, John -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIWTUDdcgqmRY/OH8RAvWqAKCICjUY0BsL6TSrB5ErkSgXFuRntQCfbqBU srMf4jzZXA2r6SHLnjqqOXg= =cya2 -END PGP SIGNATURE-
Re: Troubles with pkgdata_DATA primary...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Never mind ... duh ... I forgot to take the docs directory out of the EXTRA_DIST variable when I added it to the SUBDIRS variable. Thus (I'm guessing) the distdir code was trying to create files that were already in place, and marked read-only by the distcheck code. John Calcote wrote: I have a simple makefile.am in my ftk/docs directory. All it's trying to do is build and tar up doxygen docs: ftk/docs/Makefile.am: --- docpkg = $(PACKAGE)-doxy-$(VERSION) pkgdata_DATA = $(docpkg).tar.gz $(docpkg).tar.gz: doxygen.stamp tar chof - html | gzip -9 -c $@ doxygen.stamp: doxyfile $(DOXYGEN) $ echo Timestamp $@ CLEANFILES = doxywarn.txt doxygen.stamp $(docpkg).tar.gz clean-local: -rm -rf html --- When I hook this Makefile.am into the build system (via AC_CONFIG_FILES), I get the following from make distcheck: Output: --- $ cd build; ../configure make distcheck ... Making uninstall in docs make[2]: Entering directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build/docs' rm -f '/tmp/am-dc-2299//home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_inst/share/ftk/ftk-doxy-1.1.tar.gz' make[2]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build/docs' make[2]: Entering directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[2]: Nothing to be done for `uninstall-am'. make[2]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[1]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[1]: Entering directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[1]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make[1]: Entering directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' { test ! -d ftk-1.1 || { find ftk-1.1 -type d ! -perm -200 -exec chmod u+w {} ';' rm -fr ftk-1.1; }; } test -d ftk-1.1 || mkdir ftk-1.1 cp: cannot create regular file `ftk-1.1/docs/doxywarn.txt': Permission denied cp: cannot create regular file `ftk-1.1/docs/doxyfile': Permission denied cp: cannot create regular file `ftk-1.1/docs/Makefile': Permission denied cp: cannot create directory `ftk-1.1/docs/html': Permission denied cp: cannot create regular file `ftk-1.1/docs/doxygen.stamp': Permission denied cp: cannot create regular file `ftk-1.1/docs/ftk-doxy-1.1.tar.gz': Permission denied make[1]: *** [distdir] Error 1 make[1]: Leaving directory `/home/jcalcote/dev/prj/flaim/ftk/build/ftk-1.1/_build' make: *** [distcheck] Error 2 --- Do I misunderstand the use of the DATA primary? Perhaps DATA files are not allowed to be built? I can't find anything in the Automake docs about required properties of DATA files, and I don't get enough output from make to determine where this problem is occurring in the Makefile. One clue - I tried running this command using a -d on the make command line. Of course, I got tons more output, but one interesting clue was that make told me just before the failed copy commands above that destdir needed to be rebuilt...strange. Thanks in advance, John -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIWTridcgqmRY/OH8RAhuqAJwPLSPxZAzuvkPInVJsDGK+YhZz9ACeMvzQ xbQKaqiEpXN2yR0XG5eu7J8= =h69R -END PGP SIGNATURE-
Re: Troubles with pkgdata_DATA primary...
Hello, On Wed, Jun 18, 2008 at 10:42:10AM -0600, John Calcote wrote: Never mind ... duh ... I forgot to take the docs directory out of the EXTRA_DIST variable when I added it to the SUBDIRS variable. Thus (I'm guessing) the distdir code was trying to create files that were already in place, and marked read-only by the distcheck code. indeed. The test performed bu distcheck looks like this: make dist # to create the tarball distdir=ftk-1.1 # unpack the tarball chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir ftk-1.1/_build cd ftk-1.1/_build ../configure # ... make dist So you are doing a make distdir with a VPATH build (i.e., with build tree != source tree) and the source tree is flagged readonly. And this does not sometimes work if EXTRA_DIST contains a directory, see below for technical details. Please note that Automake manual discourages distributing a whole directory---instead, all regular files should be listed in Makefile.am. (Yes, I know this limitation is not always convenient.) Now the technical details: During make distdir, all to-be-distributed files are collected and copied to a separate tree. If a file is present in the build tree, it is taken from there; otherwise, it is taken from the source tree. But if there is a directory in the EXTRA_DIST variable and that directory is present in both trees, then make distdir has to call cp -pR for both, to merge the content of both trees. In the above scenario, the source tree is _flagged_ read-only, and that flag is copied to distdir. If the two trees overlap, and the same file comes from build tree, then it cannot overwrite the read-only flagged one, and make distdir fails. When I think about it, I recognize that this crash does not reflect a real world problem (in real world, the source tree is read-only because it is mounted read-only, not because it is _flagged_ read-only), so it is a bug in distcheck, which should be fixed somehow... Let me think... Stay tuned. Have a nice day, Stepan