automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autotools not suited to proprietary development?


From: David Fang
Subject: Re: autotools not suited to proprietary development?
Date: Thu, 5 Oct 2006 00:28:07 -0400 (EDT)

> I think you're confusing the idea of a build system for portable
> software (something the autotools suite can help with) and an
> installer (or package if you're installing onto a system that has a
> package manager).  From a Windows perspective, it's the same as the
> difference between Visual Studio and something like InstallShield or
> NSIS.
>
> One trick that may help is automake's "DESTDIR" variable, which allows
> you to create a "degenerate" package (i.e., something that doesn't
> allow you to do fancy system setup -- not unlike installing a Windows
> app from a .zip file). When you're doing make install, try instead:
>
>       make install DESTDIR=/tmp/staging
>
> Automake will build everything as if it's going to install to your --
> prefix (including embedding references to your prefix in the
> appropriate places) and then at the last minute, it will take the
> files it was going to install and "destdir" them at /tmp/staging.
> Then you can simply tar/gz the files at /tmp/ staging and ship those
> to your customers.  Or zip them.
>
> Cheers,
> Andre

Hi,

One more comment to add about staged build/installs: the 'distcheck'
target uses DESTDIR=something-temporary when checking to make sure the
build is properly packaged.  To quote an excerpt of distcheck:

- - - - - - >8 snip 8< - - - - - - -
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 
's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
          && cd $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(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
        $(am__remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
- - - - - - >8 snip 8< - - - - - - -

I recommend at least 'make distcheck' for validating packaging.

Fang





reply via email to

[Prev in Thread] Current Thread [Next in Thread]