$NetBSD: patch-aa,v 1.7 2008/01/12 11:48:40 tonio Exp $ --- Makefile.orig Mon Nov 12 16:10:25 2007 +++ Makefile @@ -690,22 +690,22 @@ install-coqide:: install-ide-$(HASCOQIDE install-ide-no: install-ide-byte: - $(MKDIR) $(FULLBINDIR) - cp $(COQIDEBYTE) $(FULLBINDIR) + ${BSD_INSTALL_PROGRAM_DIR} $(FULLBINDIR) + ${BSD_INSTALL_SCRIPT} $(COQIDEBYTE) $(FULLBINDIR) cd $(FULLBINDIR); ln -sf coqide.byte$(EXE) coqide$(EXE) install-ide-opt: - $(MKDIR) $(FULLBINDIR) - cp $(COQIDEBYTE) $(COQIDEOPT) $(FULLBINDIR) + ${BSD_INSTALL_PROGRAM_DIR} $(FULLBINDIR) + ${BSD_INSTALL_SCRIPT} $(COQIDEBYTE) $(COQIDEOPT) $(FULLBINDIR) cd $(FULLBINDIR); ln -sf coqide.opt$(EXE) coqide$(EXE) install-ide-files: - $(MKDIR) $(FULLIDELIB) - cp $(IDEFILES) $(FULLIDELIB) + ${BSD_INSTALL_PROGRAM_DIR} $(FULLIDELIB) + ${BSD_INSTALL_DATA} $(IDEFILES) $(FULLIDELIB) install-ide-info: - $(MKDIR) $(FULLIDELIB) - cp ide/FAQ $(FULLIDELIB) + ${BSD_INSTALL_PROGRAM_DIR} $(FULLIDELIB) + ${BSD_INSTALL_DATA} ide/FAQ $(FULLIDELIB) ########################################################################### # Pcoq: special binaries for debugging (coq-interface, parser) @@ -775,18 +775,18 @@ clean:: install-pcoq:: install-pcoq-binaries install-pcoq-files install-pcoq-manpages install-pcoq-binaries:: - $(MKDIR) $(FULLBINDIR) - cp $(COQINTERFACE) $(FULLBINDIR) + ${BSD_INSTALL_PROGRAM_DIR} $(FULLBINDIR) + ${BSD_INSTALL_PROGRAM} $(COQINTERFACE) $(FULLBINDIR) install-pcoq-files:: - $(MKDIR) $(FULLCOQLIB)/contrib/interface - cp $(INTERFACERC) $(FULLCOQLIB)/contrib/interface + ${BSD_INSTALL_DATA_DIR} $(FULLCOQLIB)/contrib/interface + ${BSD_INSTALL_DATA} $(INTERFACERC) $(FULLCOQLIB)/contrib/interface PCOQMANPAGES=man/coq-interface.1 man/parser.1 install-pcoq-manpages: - $(MKDIR) $(FULLMANDIR)/man1 - cp $(PCOQMANPAGES) $(FULLMANDIR)/man1 + ${BSD_INSTALL_DATA_DIR} $(FULLMANDIR)/man1 + ${BSD_INSTALL_MAN} $(PCOQMANPAGES) $(FULLMANDIR)/man1 ########################################################################### # tests @@ -1244,22 +1244,21 @@ install-coqlight: install-binaries insta install-binaries:: install-$(BEST) install-tools install-byte:: - $(MKDIR) $(FULLBINDIR) - cp $(COQMKTOP) $(COQC) $(COQTOPBYTE) $(FULLBINDIR) + ${BSD_INSTALL_PROGRAM_DIR} $(FULLBINDIR) + ${BSD_INSTALL_SCRIPT} $(COQMKTOP) $(COQC) $(COQTOPBYTE) $(FULLBINDIR) cd $(FULLBINDIR); ln -sf coqtop.byte$(EXE) coqtop$(EXE) install-opt:: - $(MKDIR) $(FULLBINDIR) - cp $(COQMKTOP) $(COQC) $(COQTOPBYTE) $(COQTOPOPT) $(FULLBINDIR) + ${BSD_INSTALL_PROGRAM_DIR} $(FULLBINDIR) + ${BSD_INSTALL_SCRIPT} $(COQMKTOP) $(COQC) $(COQTOPBYTE) $(COQTOPOPT) $(FULLBINDIR) cd $(FULLBINDIR); ln -sf coqtop.opt$(EXE) coqtop$(EXE) install-tools:: - $(MKDIR) $(FULLBINDIR) # recopie des fichiers de style pour coqide - $(MKDIR) $(FULLCOQLIB)/tools/coqdoc - touch $(FULLCOQLIB)/tools/coqdoc/coqdoc.sty $(FULLCOQLIB)/tools/coqdoc/coqdoc.css # to have the mode according to umask (bug #1715) - cp tools/coqdoc/coqdoc.css tools/coqdoc/coqdoc.sty $(FULLCOQLIB)/tools/coqdoc - cp $(TOOLS) $(FULLBINDIR) + ${BSD_INSTALL_PROGRAM_DIR} $(FULLBINDIR) + ${BSD_INSTALL_SCRIPT} $(TOOLS) $(FULLBINDIR) + ${BSD_INSTALL_PROGRAM_DIR} $(FULLCOQLIB)/tools/coqdoc + ${BSD_INSTALL_DATA} tools/coqdoc/coqdoc.css tools/coqdoc/coqdoc.sty $(FULLCOQLIB)/tools/coqdoc LIBFILES=$(THEORIESVO) $(CONTRIBVO) LIBFILESLIGHT=$(THEORIESLIGHTVO) @@ -1274,52 +1273,55 @@ OBJECTCMA=lib/lib.cma kernel/kernel.cma OBJECTCMXA=$(OBJECTCMA:.cma=.cmxa) install-library: - $(MKDIR) $(FULLCOQLIB) + ${BSD_INSTALL_DATA_DIR} $(FULLCOQLIB) for f in $(LIBFILES); do \ - $(MKDIR) $(FULLCOQLIB)/`dirname $$f`; \ - cp $$f $(FULLCOQLIB)/`dirname $$f`; \ + ${BSD_INSTALL_DATA_DIR} $(FULLCOQLIB)/`dirname $$f`; \ + ${BSD_INSTALL_DATA} $$f $(FULLCOQLIB)/`dirname $$f`; \ done - $(MKDIR) $(FULLCOQLIB)/states - cp states/*.coq $(FULLCOQLIB)/states - $(MKDIR) $(FULLCOQLIB)/user-contrib - cp $(OBJECTCMA) $(OBJECTCMXA) $(GRAMMARCMA) $(FULLCOQLIB) + ${BSD_INSTALL_DATA_DIR} $(FULLCOQLIB)/states + ${BSD_INSTALL_DATA} states/*.coq $(FULLCOQLIB)/states + ${BSD_INSTALL_DATA_DIR} $(FULLCOQLIB)/user-contrib + ${BSD_INSTALL_DATA} $(OBJECTCMA) $(OBJECTCMXA) $(FULLCOQLIB)/states install-library-light: - $(MKDIR) $(FULLCOQLIB) + ${BSD_INSTALL_DATA_DIR} $(FULLCOQLIB) for f in $(LIBFILESLIGHT); do \ - $(MKDIR) $(FULLCOQLIB)/`dirname $$f`; \ - cp $$f $(FULLCOQLIB)/`dirname $$f`; \ + ${BSD_INSTALL_DATA_DIR} $(FULLCOQLIB)/`dirname $$f`; \ + ${BSD_INSTALL_DATA} $$f $(FULLCOQLIB)/`dirname $$f`; \ done - $(MKDIR) $(FULLCOQLIB)/states - cp states/*.coq $(FULLCOQLIB)/states + ${BSD_INSTALL_DATA_DIR} $(FULLCOQLIB)/states + ${BSD_INSTALL_DATA} states/*.coq $(FULLCOQLIB)/states install-allreals:: for f in $(ALLREALS); do \ - $(MKDIR) $(FULLCOQLIB)/`dirname $$f`; \ - cp $$f $(FULLCOQLIB)/`dirname $$f`; \ + ${BSD_INSTALL_DATA_DIR} $(FULLCOQLIB)/`dirname $$f`; \ + ${BSD_INSTALL_DATA} $$f $(FULLCOQLIB)/`dirname $$f`; \ done install-coq-info: install-coq-manpages install-emacs install-latex MANPAGES=man/coq-tex.1 man/coqdep.1 man/gallina.1 \ - man/coqc.1 man/coqtop.1 man/coqtop.byte.1 man/coqtop.opt.1 \ + man/coqc.1 man/coqtop.1 man/coqtop.byte.1 \ man/coqwc.1 man/coqdoc.1 \ man/coq_makefile.1 man/coqmktop.1 + ifeq ($(BEST),opt) + MANPAGES+=man/coqtop.opt.1 + endif install-coq-manpages: - $(MKDIR) $(FULLMANDIR)/man1 - cp $(MANPAGES) $(FULLMANDIR)/man1 + ${BSD_INSTALL_DATA_DIR} $(FULLMANDIR)/man1 + ${BSD_INSTALL_MAN} $(MANPAGES) $(FULLMANDIR)/man1 install-emacs: - $(MKDIR) $(FULLEMACSLIB) - cp tools/coq.el tools/coq-inferior.el $(FULLEMACSLIB) + ${BSD_INSTALL_DATA_DIR} $(FULLEMACSLIB) + ${BSD_INSTALL_DATA} tools/coq.el tools/coq-inferior.el $(FULLEMACSLIB) # command to update TeX' kpathsea database #UPDATETEX = $(MKTEXLSR) /usr/share/texmf /var/spool/texmf $(BASETEXDIR) > /dev/null install-latex: - $(MKDIR) $(FULLCOQDOCDIR) - cp tools/coqdoc/coqdoc.sty $(FULLCOQDOCDIR) + ${BSD_INSTALL_DATA_DIR} $(FULLCOQDOCDIR) + ${BSD_INSTALL_DATA} tools/coqdoc/coqdoc.sty $(FULLCOQDOCDIR) # -$(UPDATETEX) ###########################################################################