about summary refs log tree commit diff
path: root/common.mk
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-01-04 20:53:29 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-01-04 20:53:29 +0000
commit1d936e3974263e1b058bcb7949cf55102ce1d2e1 (patch)
tree49958e987cd64e8d72bd7e14e5e7ba3cb498e949 /common.mk
parent71d4c2e05abc34d82d505c96af9bd918846f9cec (diff)
downloadnetpbm-mirror-1d936e3974263e1b058bcb7949cf55102ce1d2e1.tar.gz
netpbm-mirror-1d936e3974263e1b058bcb7949cf55102ce1d2e1.tar.xz
netpbm-mirror-1d936e3974263e1b058bcb7949cf55102ce1d2e1.zip
make package: add man/web directory with .url files for each manual page
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2100 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk27
1 files changed, 23 insertions, 4 deletions
diff --git a/common.mk b/common.mk
index c096bd6e..51fbc438 100644
--- a/common.mk
+++ b/common.mk
@@ -449,7 +449,17 @@ ifeq ($(SYMLINKEXE)x,x)
   SYMLINKEXE := $(SYMLINK)
 endif
 
-$(PKGDIR)/%:
+# An implicit rule for $(PKGDIR)/% does not work because it causes Make
+# sometimes to believe the directory it creates from this rule is an unneeded
+# intermediate file and try to delete it later.  So we explicitly list the
+# possible directories under $(PKGDIR):
+
+PKGMANSUBDIRS = man1 man3 man5 web
+
+PKGSUBDIRS = bin include include/netpbm lib link misc \
+  $(PKGMANSUBDIRS:%=$(PKGMANDIR)/%)
+
+$(PKGSUBDIRS:%=$(PKGDIR)/%):
 	$(SRCDIR)/buildtools/mkinstalldirs $@
 
 .PHONY: install.merge
@@ -493,11 +503,13 @@ MANUALS1 = $(BINARIES) $(SCRIPTS)
 
 PKGMANDIR = man
 
-install.man1: $(PKGDIR)/$(PKGMANDIR)/man1 $(MANUALS1:%=%_installman1)
+install.man1: $(MANUALS1:%=%_installman1)
+
+install.man3: $(MANUALS3:%=%_installman3)
 
-install.man3: $(PKGDIR)/$(PKGMANDIR)/man3 $(MANUALS3:%=%_installman3)
+install.man5: $(MANUALS5:%=%_installman5)
 
-install.man5: $(PKGDIR)/$(PKGMANDIR)/man5 $(MANUALS5:%=%_installman5)
+install.manweb: $(MANUALS1:%=%_installmanweb) $(SUBDIRS:%=%/install.manweb)
 
 %_installman1: $(PKGDIR)/$(PKGMANDIR)/man1
 	perl -w $(SRCDIR)/buildtools/makepointerman $(@:%_installman1=%) \
@@ -511,6 +523,10 @@ install.man5: $(PKGDIR)/$(PKGMANDIR)/man5 $(MANUALS5:%=%_installman5)
 	perl -w $(SRCDIR)/buildtools/makepointerman $(@:%_installman5=%) \
           $(NETPBM_DOCURL) $< 5 $(MANPAGE_FORMAT) $(INSTALL_PERM_MAN)
 
+%_installmanweb: $(PKGDIR)/$(PKGMANDIR)/web
+	echo $(NETPBM_DOCURL)$(@:%_installmanweb=%).html \
+	  >$</$(@:%_installmanweb=%).url
+
 .PHONY: clean
 
 ifneq ($(EXE)x,x)
@@ -556,6 +572,9 @@ endif
 %/install.man:
 	$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
 	    SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@) 
+%/install.manweb:
+	$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
+	    SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@) 
 %/install.data:
 	$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
 	    SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@)