$NetBSD: patch-ag,v 1.2 2012/04/07 13:14:25 joerg Exp $ DESTDIR support --- Makefile.in.orig 2002-10-18 21:15:15.000000000 +0000 +++ Makefile.in @@ -98,118 +98,103 @@ install: install-dirs install-core insta install-dirs: @[ -f .build-ok ] || $(MAKE) all @echo "___ INSTALL: prepare directory structure ___" - $(MKDIR) $(bindir) - $(MKDIR) $(libdir) - $(MKDIR) $(libdir)/data - $(MKDIR) $(libdir)/exec - $(MKDIR) $(libdir)/include - $(MKDIR) $(libdir)/perl - $(MKDIR) $(mandir) - $(MKDIR) $(mandir)/man1 - $(MKDIR) $(mandir)/man3 - $(MKDIR) $(mandir)/man7 - $(MKDIR) $(mandir)/$(catdir)1 - $(MKDIR) $(mandir)/$(catdir)7 + $(MKDIR) $(DESTDIR)$(bindir) + $(MKDIR) $(DESTDIR)$(libdir) + $(MKDIR) $(DESTDIR)$(libdir)/data + $(MKDIR) $(DESTDIR)$(libdir)/exec + $(MKDIR) $(DESTDIR)$(libdir)/include + $(MKDIR) $(DESTDIR)$(libdir)/perl + $(MKDIR) $(DESTDIR)$(mandir) + $(MKDIR) $(DESTDIR)$(mandir)/man1 + $(MKDIR) $(DESTDIR)$(mandir)/man3 + $(MKDIR) $(DESTDIR)$(mandir)/man7 install-core: @echo "" @echo "___ INSTALL: core language programs and manpages ___" - $(INSTALL_SCRIPT) wml_frontend/wmk.pl $(bindir)/wmk - $(INSTALL_DATA) wml_frontend/wmk.1 $(mandir)/man1/wmk.1 - $(INSTALL_SCRIPT) wml_frontend/wml.pl $(bindir)/wml - $(INSTALL_DATA) wml_frontend/wml.1 $(mandir)/man1/wml.1 - $(INSTALL_SCRIPT) wml_frontend/wmd.pl $(bindir)/wmd - $(INSTALL_DATA) wml_frontend/wmd.1 $(mandir)/man1/wmd.1 - $(INSTALL_DATA) wml_frontend/wmd.txt $(libdir)/data/wmd.txt + $(INSTALL_SCRIPT) wml_frontend/wmk.pl $(DESTDIR)$(bindir)/wmk + $(INSTALL_DATA) wml_frontend/wmk.1 $(DESTDIR)$(mandir)/man1/wmk.1 + $(INSTALL_SCRIPT) wml_frontend/wml.pl $(DESTDIR)$(bindir)/wml + $(INSTALL_DATA) wml_frontend/wml.1 $(DESTDIR)$(mandir)/man1/wml.1 + $(INSTALL_SCRIPT) wml_frontend/wmd.pl $(DESTDIR)$(bindir)/wmd + $(INSTALL_DATA) wml_frontend/wmd.1 $(DESTDIR)$(mandir)/man1/wmd.1 + $(INSTALL_DATA) wml_frontend/wmd.txt $(DESTDIR)$(libdir)/data/wmd.txt if [ -f wml_frontend/wmd.map ]; then \ - $(INSTALL_DATA) wml_frontend/wmd.map $(libdir)/data/wmd.map; \ + $(INSTALL_DATA) wml_frontend/wmd.map $(DESTDIR)$(libdir)/data/wmd.map; \ else :; fi - $(INSTALL_DATA) wml_frontend/wmd_missing.1 $(mandir)/man1/wmd_missing.1 - $(INSTALL_SCRIPT) wml_frontend/wmb.pl $(bindir)/wmb - $(INSTALL_DATA) wml_frontend/wmb.1 $(mandir)/man1/wmb.1 - $(INSTALL_SCRIPT) wml_frontend/wmu.pl $(bindir)/wmu - $(INSTALL_DATA) wml_frontend/wmu.1 $(mandir)/man1/wmu.1 - $(INSTALL_SCRIPT) wml_backend/p1_ipp/ipp.pl $(libdir)/exec/wml_p1_ipp - $(INSTALL_DATA) wml_backend/p1_ipp/ipp.1 $(mandir)/man1/wml_p1_ipp.1 - $(INSTALL_PROGRAM) wml_backend/p2_mp4h/src/mp4h@EXEEXT@ $(libdir)/exec/wml_p2_mp4h@EXEEXT@ - $(INSTALL_DATA) wml_backend/p2_mp4h/doc/mp4h.1 $(mandir)/man1/wml_p2_mp4h.1 - $(INSTALL_PROGRAM) wml_backend/p3_eperl/eperl@EXEEXT@ $(libdir)/exec/wml_p3_eperl@EXEEXT@ - $(INSTALL_DATA) wml_backend/p3_eperl/eperl.1 $(mandir)/man1/wml_p3_eperl.1 - $(INSTALL_PROGRAM) wml_backend/p4_gm4/src/m4@EXEEXT@ $(libdir)/exec/wml_p4_gm4@EXEEXT@ - $(INSTALL_DATA) wml_backend/p4_gm4/doc/m4.txt $(mandir)/$(catdir)1/wml_p4_gm4.1 - $(INSTALL_SCRIPT) wml_backend/p5_divert/divert.pl $(libdir)/exec/wml_p5_divert - $(INSTALL_DATA) wml_backend/p5_divert/divert.1 $(mandir)/man1/wml_p5_divert.1 - $(INSTALL_SCRIPT) wml_backend/p6_asubst/asubst.pl $(libdir)/exec/wml_p6_asubst - $(INSTALL_DATA) wml_backend/p6_asubst/asubst.1 $(mandir)/man1/wml_p6_asubst.1 - $(INSTALL_SCRIPT) wml_backend/p7_htmlfix/htmlfix.pl $(libdir)/exec/wml_p7_htmlfix - $(INSTALL_DATA) wml_backend/p7_htmlfix/htmlfix.1 $(mandir)/man1/wml_p7_htmlfix.1 - $(INSTALL_SCRIPT) wml_backend/p8_htmlstrip/htmlstrip.pl $(libdir)/exec/wml_p8_htmlstrip - $(INSTALL_DATA) wml_backend/p8_htmlstrip/htmlstrip.1 $(mandir)/man1/wml_p8_htmlstrip.1 - $(INSTALL_SCRIPT) wml_backend/p9_slice/slice $(libdir)/exec/wml_p9_slice - $(INSTALL_DATA) wml_backend/p9_slice/slice.1 $(mandir)/man1/wml_p9_slice.1 + $(INSTALL_DATA) wml_frontend/wmd_missing.1 $(DESTDIR)$(mandir)/man1/wmd_missing.1 + $(INSTALL_SCRIPT) wml_frontend/wmb.pl $(DESTDIR)$(bindir)/wmb + $(INSTALL_DATA) wml_frontend/wmb.1 $(DESTDIR)$(mandir)/man1/wmb.1 + $(INSTALL_SCRIPT) wml_frontend/wmu.pl $(DESTDIR)$(bindir)/wmu + $(INSTALL_DATA) wml_frontend/wmu.1 $(DESTDIR)$(mandir)/man1/wmu.1 + $(INSTALL_SCRIPT) wml_backend/p1_ipp/ipp.pl $(DESTDIR)$(libdir)/exec/wml_p1_ipp + $(INSTALL_DATA) wml_backend/p1_ipp/ipp.1 $(DESTDIR)$(mandir)/man1/wml_p1_ipp.1 + $(INSTALL_PROGRAM) wml_backend/p2_mp4h/src/mp4h@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_p2_mp4h@EXEEXT@ + $(INSTALL_DATA) wml_backend/p2_mp4h/doc/mp4h.1 $(DESTDIR)$(mandir)/man1/wml_p2_mp4h.1 + $(INSTALL_PROGRAM) wml_backend/p3_eperl/eperl@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_p3_eperl@EXEEXT@ + $(INSTALL_DATA) wml_backend/p3_eperl/eperl.1 $(DESTDIR)$(mandir)/man1/wml_p3_eperl.1 + $(INSTALL_PROGRAM) wml_backend/p4_gm4/src/m4@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_p4_gm4@EXEEXT@ + $(INSTALL_SCRIPT) wml_backend/p5_divert/divert.pl $(DESTDIR)$(libdir)/exec/wml_p5_divert + $(INSTALL_DATA) wml_backend/p5_divert/divert.1 $(DESTDIR)$(mandir)/man1/wml_p5_divert.1 + $(INSTALL_SCRIPT) wml_backend/p6_asubst/asubst.pl $(DESTDIR)$(libdir)/exec/wml_p6_asubst + $(INSTALL_DATA) wml_backend/p6_asubst/asubst.1 $(DESTDIR)$(mandir)/man1/wml_p6_asubst.1 + $(INSTALL_SCRIPT) wml_backend/p7_htmlfix/htmlfix.pl $(DESTDIR)$(libdir)/exec/wml_p7_htmlfix + $(INSTALL_DATA) wml_backend/p7_htmlfix/htmlfix.1 $(DESTDIR)$(mandir)/man1/wml_p7_htmlfix.1 + $(INSTALL_SCRIPT) wml_backend/p8_htmlstrip/htmlstrip.pl $(DESTDIR)$(libdir)/exec/wml_p8_htmlstrip + $(INSTALL_DATA) wml_backend/p8_htmlstrip/htmlstrip.1 $(DESTDIR)$(mandir)/man1/wml_p8_htmlstrip.1 + $(INSTALL_SCRIPT) wml_backend/p9_slice/slice $(DESTDIR)$(libdir)/exec/wml_p9_slice + $(INSTALL_DATA) wml_backend/p9_slice/slice.1 $(DESTDIR)$(mandir)/man1/wml_p9_slice.1 install-perl: @echo "" @echo "___ INSTALL: commonly used Perl 5 modules ___" -@set dummy $(MAKEFLAGS); amf=$$2; \ - (cd wml_common && $(MAKE) install prefix=$(prefix)) \ + (cd wml_common && $(MAKE) install prefix=$(prefix) DESTDIR=$(DESTDIR)) \ || case "$$amf" in *=*) exit 1;; *k*) ;; *) exit 1;; esac install-doc: @echo "" @echo "___ INSTALL: general documentation ___" - $(INSTALL_DATA) wml_docs/wml_intro.7 $(mandir)/man7/wml_intro.7 - $(INSTALL_DATA) wml_docs/wml_tutorial.7 $(mandir)/man7/wml_tutorial.7 - $(INSTALL_DATA) wml_docs/wml_macros.7 $(mandir)/man7/wml_macros.7 - $(INSTALL_DATA) wml_docs/wml_faq.7 $(mandir)/man7/wml_faq.7 - $(INSTALL_DATA) wml_docs/wml_tags.7 $(mandir)/man7/wml_tags.7 - $(INSTALL_DATA) wml_docs/wml_std_html20.txt $(mandir)/$(catdir)7/wml_std_html20.7 - $(INSTALL_DATA) wml_docs/wml_std_html32.txt $(mandir)/$(catdir)7/wml_std_html32.7 - $(INSTALL_DATA) wml_docs/wml_std_html40.txt $(mandir)/$(catdir)7/wml_std_html40.7 - $(INSTALL_DATA) wml_docs/wml_std_html401.txt $(mandir)/$(catdir)7/wml_std_html401.7 - $(INSTALL_DATA) wml_docs/wml_std_xhtml10.txt $(mandir)/$(catdir)7/wml_std_xhtml10.7 - $(INSTALL_DATA) wml_docs/wml_std_css1.txt $(mandir)/$(catdir)7/wml_std_css1.7 - $(INSTALL_DATA) wml_docs/wml_std_css2.txt $(mandir)/$(catdir)7/wml_std_css2.7 - $(INSTALL_DATA) wml_docs/wml_std_csspos.txt $(mandir)/$(catdir)7/wml_std_csspos.7 - $(INSTALL_DATA) wml_docs/wml_std_wai10.txt $(mandir)/$(catdir)7/wml_std_wai10.7 - $(INSTALL_DATA) wml_docs/wml_barebone.txt $(mandir)/$(catdir)7/wml_barebone.7 + $(INSTALL_DATA) wml_docs/wml_intro.7 $(DESTDIR)$(mandir)/man7/wml_intro.7 + $(INSTALL_DATA) wml_docs/wml_tutorial.7 $(DESTDIR)$(mandir)/man7/wml_tutorial.7 + $(INSTALL_DATA) wml_docs/wml_macros.7 $(DESTDIR)$(mandir)/man7/wml_macros.7 + $(INSTALL_DATA) wml_docs/wml_faq.7 $(DESTDIR)$(mandir)/man7/wml_faq.7 + $(INSTALL_DATA) wml_docs/wml_tags.7 $(DESTDIR)$(mandir)/man7/wml_tags.7 install-aux: @echo "" @echo "___ INSTALL: auxiliary programs and manpages ___" - $(INSTALL_SCRIPT) wml_aux/htmlclean/htmlclean.pl $(libdir)/exec/wml_aux_htmlclean - $(INSTALL_DATA) wml_aux/htmlclean/htmlclean.1 $(mandir)/man1/wml_aux_htmlclean.1 - $(INSTALL_PROGRAM) wml_aux/iselect/iselect@EXEEXT@ $(libdir)/exec/wml_aux_iselect@EXEEXT@ - $(INSTALL_DATA) wml_aux/iselect/iselect.1 $(mandir)/man1/wml_aux_iselect.1 - $(INSTALL_SCRIPT) wml_aux/map2html/map2html.pl $(libdir)/exec/wml_aux_map2html - $(INSTALL_DATA) wml_aux/map2html/map2html.1 $(mandir)/man1/wml_aux_map2html.1 - $(INSTALL_SCRIPT) wml_aux/txt2html/txt2html.pl $(libdir)/exec/wml_aux_txt2html - $(INSTALL_DATA) wml_aux/txt2html/txt2html.txt $(mandir)/$(catdir)1/wml_aux_txt2html.1 - $(INSTALL_DATA) wml_aux/txt2html/txt2html.dict $(libdir)/data/txt2html.dict - $(INSTALL_PROGRAM) wml_aux/tidy/tidy@EXEEXT@ $(libdir)/exec/wml_aux_tidy@EXEEXT@ - $(INSTALL_DATA) wml_aux/tidy/tidy.txt $(mandir)/$(catdir)1/wml_aux_tidy.1 - $(INSTALL_SCRIPT) wml_aux/htmlinfo/htmlinfo.pl $(libdir)/exec/wml_aux_htmlinfo - $(INSTALL_DATA) wml_aux/htmlinfo/htmlinfo.1 $(mandir)/man1/wml_aux_htmlinfo.1 - $(INSTALL_SCRIPT) wml_aux/linklint/linklint.pl $(libdir)/exec/wml_aux_linklint - $(INSTALL_DATA) wml_aux/linklint/linklint.1 $(mandir)/man1/wml_aux_linklint.1 - $(INSTALL_SCRIPT) wml_aux/weblint/weblint.pl $(libdir)/exec/wml_aux_weblint - $(INSTALL_DATA) wml_aux/weblint/weblint.1 $(mandir)/man1/wml_aux_weblint.1 - $(INSTALL_DATA) wml_aux/weblint/weblintrc $(libdir)/data/weblintrc - $(INSTALL_SCRIPT) wml_aux/freetable/freetable.pl $(libdir)/exec/wml_aux_freetable - $(INSTALL_DATA) wml_aux/freetable/freetable.1 $(mandir)/man1/wml_aux_freetable.1 + $(INSTALL_SCRIPT) wml_aux/htmlclean/htmlclean.pl $(DESTDIR)$(libdir)/exec/wml_aux_htmlclean + $(INSTALL_DATA) wml_aux/htmlclean/htmlclean.1 $(DESTDIR)$(mandir)/man1/wml_aux_htmlclean.1 + $(INSTALL_PROGRAM) wml_aux/iselect/iselect@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_aux_iselect@EXEEXT@ + $(INSTALL_DATA) wml_aux/iselect/iselect.1 $(DESTDIR)$(mandir)/man1/wml_aux_iselect.1 + $(INSTALL_SCRIPT) wml_aux/map2html/map2html.pl $(DESTDIR)$(libdir)/exec/wml_aux_map2html + $(INSTALL_DATA) wml_aux/map2html/map2html.1 $(DESTDIR)$(mandir)/man1/wml_aux_map2html.1 + $(INSTALL_SCRIPT) wml_aux/txt2html/txt2html.pl $(DESTDIR)$(libdir)/exec/wml_aux_txt2html + $(INSTALL_DATA) wml_aux/txt2html/txt2html.dict $(DESTDIR)$(libdir)/data/txt2html.dict + $(INSTALL_PROGRAM) wml_aux/tidy/tidy@EXEEXT@ $(DESTDIR)$(libdir)/exec/wml_aux_tidy@EXEEXT@ + $(INSTALL_SCRIPT) wml_aux/htmlinfo/htmlinfo.pl $(DESTDIR)$(libdir)/exec/wml_aux_htmlinfo + $(INSTALL_DATA) wml_aux/htmlinfo/htmlinfo.1 $(DESTDIR)$(mandir)/man1/wml_aux_htmlinfo.1 + $(INSTALL_SCRIPT) wml_aux/linklint/linklint.pl $(DESTDIR)$(libdir)/exec/wml_aux_linklint + $(INSTALL_DATA) wml_aux/linklint/linklint.1 $(DESTDIR)$(mandir)/man1/wml_aux_linklint.1 + $(INSTALL_SCRIPT) wml_aux/weblint/weblint.pl $(DESTDIR)$(libdir)/exec/wml_aux_weblint + $(INSTALL_DATA) wml_aux/weblint/weblint.1 $(DESTDIR)$(mandir)/man1/wml_aux_weblint.1 + $(INSTALL_DATA) wml_aux/weblint/weblintrc $(DESTDIR)$(libdir)/data/weblintrc + $(INSTALL_SCRIPT) wml_aux/freetable/freetable.pl $(DESTDIR)$(libdir)/exec/wml_aux_freetable + $(INSTALL_DATA) wml_aux/freetable/freetable.1 $(DESTDIR)$(mandir)/man1/wml_aux_freetable.1 install-misc: @echo "" @echo "___ INSTALL: miscellaneous files ___" -@set dummy $(MAKEFLAGS); amf=$$2; \ - (cd wml_misc && $(MAKE) install prefix=$(prefix)) \ + (cd wml_misc && $(MAKE) install prefix=$(prefix) DESTDIR=$(DESTDIR)) \ || case "$$amf" in *=*) exit 1;; *k*) ;; *) exit 1;; esac install-tags: @echo "" @echo "___ INSTALL: include files and manpages ___" -@set dummy $(MAKEFLAGS); amf=$$2; \ - (cd wml_include && $(MAKE) install prefix=$(prefix)) \ + (cd wml_include && $(MAKE) install prefix=$(prefix) DESTDIR=$(DESTDIR)) \ || case "$$amf" in *=*) exit 1;; *k*) ;; *) exit 1;; esac # ------------------------------------------------