[Top][All Lists]

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

mkinstalldirs and conditional building/installation

From: Roger Leigh
Subject: mkinstalldirs and conditional building/installation
Date: Thu, 28 Feb 2002 23:38:11 +0000
User-agent: Mutt/1.3.27i

In a, I have the following (summary):

pkglibdir = $(cups_conf_serverbin)
cupsexec_filterdir = $(pkglibdir)/filter
cupsexec_filter_PROGRAMS = rastertoprinter commandtoepson commandtocanon

Thus, if --with-cups is given to configure, AM_CONDITIONAL is used to
conditionally build some programs.

The generated rule for installation in is this:

install-cupsexec_filterPROGRAMS: $(cupsexec_filter_PROGRAMS)
        $(mkinstalldirs) $(DESTDIR)$(cupsexec_filterdir)
        @list='$(cupsexec_filter_PROGRAMS)'; for p in $$list; do \
          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
          if test -f $$p \
             || test -f $$p1 \
          ; then \
            f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install 
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(cupsexec_filterdir)/$$f"; \
           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) 
$$p $(DESTDIR)$(cupsexec_filterdir)/$$f; \
          else :; fi; \

The installation directory $(DESTDIR)$(cupsexec_filterdir) will be
created *whether or not any program is built*!  This should be fairly
easy to correct:

$(mkinstalldirs) $(DESTDIR)$(cupsexec_filterdir)


if test -n '$(cupsexec_filter_PROGRAMS)'; then \
  $(mkinstalldirs) $(DESTDIR)$(cupsexec_filterdir) \

In the gimp-print project, due to the nature of the package, just about
every part can be compiled conditionally, because you generally only
want a driver for one printing system.  At the moment, every possible
installation directory is created, leaving unused empty directories
after installation.

I don't have a patch, but I can make one if you would like--do I just
need to update the .am files?  Is automake CVS available anonymously?


Roger Leigh
                ** Registration Number: 151826, **
                Need Epson Stylus Utilities?
                GPG Public Key: 0x25BFB848 available on public keyservers

reply via email to

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