Changeset 2082


Ignore:
Timestamp:
Oct 19, 2009, 10:55:31 PM (12 years ago)
Author:
Peter
Message:

adding target installdirs-local, so make installdirs is complete.

Updated other install rules by making them safe against space in name
and removed test of existence before calling mkdir -p, instead check
that dirname is not empty before calling mkdir -p $dirname.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/Makefile.am

    r2045 r2082  
    106106  $(DESTDIR)$(psdir)/$(PACKAGE).ps $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf
    107107
     108installdirs-local:
     109  for dir in $(htmldir)/html $(dvidir) $(psdir) $(pdfdir); do \
     110    test -z "$(DESTDIR)$$dir" || $(MKDIR_P) "$(DESTDIR)$$dir"; \
     111  done
     112
     113# local install rules does not generate any documentation, in order to
     114# follow the recommendation in GCS that `make install' should not
     115# modify/create anything in builddir, proved `make all' has just been
     116# done. This is for the common case that `make all' is issued as one
     117# user and `make install' is issued as, for example, superuser.
     118
    108119install-html-local:
     120  @$(NORMAL_INSTALL)
    109121  @if test -d $(DX_HTML_OUTPUT); then \
    110   test -d $(DESTDIR)$(htmldir)/html || \
     122    echo "$(MKDIR_P) $(DESTDIR)$(htmldir)/html"; \
    111123    $(MKDIR_P) $(DESTDIR)$(htmldir)/html;\
    112   $(INSTALL_DATA) $(DX_HTML_OUTPUT)/* $(DESTDIR)$(htmldir)/html; \
     124    echo "$(INSTALL_DATA) $(DX_HTML_OUTPUT)/* $(DESTDIR)$(htmldir)/html"; \
     125    $(INSTALL_DATA) $(DX_HTML_OUTPUT)/* $(DESTDIR)$(htmldir)/html; \
    113126  fi
    114127
    115128install-dvi-local:
    116129  @if test -f "$(PACKAGE).dvi"; then \
    117   test -d $(DESTDIR)$(dvidir) || $(MKDIR_P) $(DESTDIR)$(dvidir);\
    118   $(INSTALL_DATA) $(PACKAGE).dvi \
    119    $(DESTDIR)$(dvidir)/$(PACKAGE).dvi; \
    120   $(ECHO) $(INSTALL_DATA) $(PACKAGE).dvi \
    121    $(DESTDIR)$(dvidir)/$(PACKAGE).dvi; \
     130    test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)";\
     131    $(INSTALL_DATA) $(PACKAGE).dvi "$(DESTDIR)$(dvidir)/$(PACKAGE).dvi"; \
     132    $(ECHO) "$(INSTALL_DATA) $(PACKAGE).dvi $(DESTDIR)$(dvidir)/$(PACKAGE).dvi";\
    122133  fi
    123134
    124135install-ps-local:
    125136  @if test -f "$(PACKAGE).ps"; then \
    126   test -d $(DESTDIR)$(psdir) || $(MKDIR_P) $(DESTDIR)$(psdir);\
    127   $(INSTALL_DATA) $(PACKAGE).ps \
    128    $(DESTDIR)$(psdir)/$(PACKAGE).ps; \
    129   $(ECHO) $(INSTALL_DATA) $(PACKAGE).ps $(DESTDIR)$(psdir)/$(PACKAGE).ps;\
     137    test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)";\
     138    $(INSTALL_DATA) $(PACKAGE).ps "$(DESTDIR)$(psdir)/$(PACKAGE).ps"; \
     139    $(ECHO) "$(INSTALL_DATA) $(PACKAGE).ps $(DESTDIR)$(psdir)/$(PACKAGE).ps";\
    130140  fi
    131141
    132142install-pdf-local:
    133143  @if test -f "$(PACKAGE).pdf"; then \
    134   test -d $(DESTDIR)$(pdfdir) || $(MKDIR_P) $(DESTDIR)$(pdfdir);\
    135   $(INSTALL_DATA) $(PACKAGE).pdf \
    136    $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf; \
    137   $(ECHO) $(INSTALL_DATA) $(PACKAGE).pdf \
    138    $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf; \
     144    test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)";\
     145    $(INSTALL_DATA) $(PACKAGE).pdf "$(DESTDIR)$(pdfdir)/$(PACKAGE).pdf"; \
     146    $(ECHO) "$(INSTALL_DATA) $(PACKAGE).pdf $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf";\
    139147  fi
    140148
Note: See TracChangeset for help on using the changeset viewer.