]> git.sur5r.net Git - openldap/commitdiff
Fix new man.mk to create tmp pages in object directory, not $(srcdir).
authorKurt Zeilenga <kurt@openldap.org>
Tue, 2 Mar 1999 20:23:37 +0000 (20:23 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 2 Mar 1999 20:23:37 +0000 (20:23 +0000)
build/man.mk

index 67146e7f3ef1e32aac0f18af5ee699ac06d5778c..f442455c27c4f4fc801973ae9f6be90a11102205 100644 (file)
@@ -11,8 +11,8 @@ TMP_SUFFIX=tmp
 
 all-common: FORCE
        VERSION=`$(CAT) $(VERSIONFILE)`; \
-       cd $(srcdir); \
-       for page in *.$(MANSECT); do \
+       PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
+       for page in $$PAGES; do \
                $(SED) -e "s%LDVERSION%$$VERSION%" \
                        -e 's%ETCDIR%$(sysconfdir)%' \
                        -e 's%LOCALSTATEDIR%$(localstatedir)%' \
@@ -22,18 +22,19 @@ all-common: FORCE
                        -e 's%BINDIR%$(bindir)%' \
                        -e 's%LIBDIR%$(libdir)%' \
                        -e 's%LIBEXECDIR%$(libexecdir)%' \
-                       $$page > $$page.$(TMP_SUFFIX); \
+                       $(srcdir)/$$page > $$page.$(TMP_SUFFIX); \
        done
        touch all-common
 
 install-common:
-       -$(MKDIR) -p $(MANDIR)
-       for page in *.$(MANSECT); do \
+       -$(MKDIR) $(MANDIR)
+       PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
+       for page in $$PAGES; do \
                echo "installing $(MANDIR)/$$page"; \
                $(RM) $(MANDIR)/$$page; \
                $(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(MANDIR)/$$page; \
-               if [ -f "$$page.links" ]; then \
-                       for link in `$(CAT) $$page.links`; do \
+               if [ -f "$(srcdir)/$$page.links" ]; then \
+                       for link in `$(CAT) $(srcdir)/$$page.links`; do \
                                echo "installing $(MANDIR)/$$link as link to $$page"; \
                                $(LN_S) -f $$page $(MANDIR)/$$link; \
                        done; \