| Anonymous | Login | Signup for a new account | 2013-05-23 15:36 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005219 | OCaml | OCaml general | public | 2011-02-04 06:16 | 2012-09-19 15:01 | ||||||
| Reporter | selinger | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | N/A | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.12.0 | ||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | |||||||||
| Summary | 0005219: use $(INSTALL) instead of 'cp' in Makefiles | ||||||||||
| Description | The "make install" target does not set proper file permissions on the installed files. Moreover, there is no easy way to fix the permissions once they are messed up. Details: Suppose some user uses umask 0007, and root uses umask 0022. It is normal to compile the program as an ordinary user, and to install it later as root. Therefore, during compilation, files are generated with umask 0007. Since "make install" uses a simple "cp" to copy most files, this umask 0007 is preserved during installation, and root's umask 0022 is not used. The installed files (owned by root) are therefore not readable by non-root users. Moreover, once installed, an attempt to correct this problem by re-compiling with a different umask will fail. Suppose the user changes her umask to 0022, and re-compiles from a fresh copy of the sources. Now "make install", run as root, will still use "cp", and since the target file already exists, the permissions of the target file, and not the source file, will be used!! Therefore the files will still not be readable. Moreover, since there is no "make uninstall" target, there is no simple way to find all the installed files and correct their permissions manually. Solution: the make system should use $(INSTALL) instead of 'cp', 'cp -f', etc. By default this should be set to INSTALL=install, which will set permissions correctly. It could also be set to a shell script, or to 'cp -f', if an 'install' program is not available at the target system. Patch attached. | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | diff -ur ocaml-3.12.0/asmrun/Makefile ocaml-3.12.0-install/asmrun/Makefile
--- ocaml-3.12.0/asmrun/Makefile 2010-04-20 12:47:15.000000000 -0300
+++ ocaml-3.12.0-install/asmrun/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -58,14 +58,14 @@
install: install-default install-$(PROFILING)
install-default:
- cp libasmrun.a $(LIBDIR)/libasmrun.a
+ $(INSTALL) libasmrun.a $(LIBDIR)/libasmrun.a
cd $(LIBDIR); $(RANLIB) libasmrun.a
install-noprof:
rm -f $(LIBDIR)/libasmrunp.a; ln -s libasmrun.a $(LIBDIR)/libasmrunp.a
install-prof:
- cp libasmrunp.a $(LIBDIR)/libasmrunp.a
+ $(INSTALL) libasmrunp.a $(LIBDIR)/libasmrunp.a
cd $(LIBDIR); $(RANLIB) libasmrunp.a
power.o: power-$(SYSTEM).o
diff -ur ocaml-3.12.0/build/install.sh ocaml-3.12.0-install/build/install.sh
--- ocaml-3.12.0/build/install.sh 2010-05-20 06:44:25.000000000 -0300
+++ ocaml-3.12.0-install/build/install.sh 2011-02-04 01:02:25.000000000 -0400
@@ -33,7 +33,7 @@
installbin() {
if [ -f "$1" ]; then
echo " install binary $2"
- cp -f "$1" "$2"
+ ${INSTALL} "$1" "$2"
[ -x "$2" ] || chmod +x "$2"
else
wontinstall "$1"
@@ -43,11 +43,11 @@
installbestbin() {
if [ -f "$1" ]; then
echo " install binary $3 (with `basename $1`)"
- cp -f "$1" "$3"
+ ${INSTALL} "$1" "$3"
else
if [ -f "$2" ]; then
echo " install binary $3 (with `basename $2`)"
- cp -f "$2" "$3"
+ ${INSTALL} "$2" "$3"
else
echo "None of $1, $2 exists"
exit 3
@@ -60,7 +60,7 @@
if [ -f "$1" ]; then
dest="$2/`basename $1`"
echo " install library $dest"
- cp -f "$1" "$2"
+ ${INSTALL} "$1" "$2"
if [ "$RANLIB" != "" ]; then
"$RANLIB" "$dest"
fi
@@ -82,7 +82,7 @@
last="$1"
for file in $args; do
echo " install $last/`basename $file`"
- cp -f "$file" "$last"
+ ${INSTALL} "$file" "$last"
done
}
diff -ur ocaml-3.12.0/build/partial-install.sh ocaml-3.12.0-install/build/partial-install.sh
--- ocaml-3.12.0/build/partial-install.sh 2010-05-20 06:44:25.000000000 -0300
+++ ocaml-3.12.0-install/build/partial-install.sh 2011-02-04 00:57:30.000000000 -0400
@@ -37,7 +37,7 @@
installbin() {
if [ -f "$1" ]; then
echo " install binary $2"
- cp -f "$1" "$2"
+ ${INSTALL} "$1" "$2"
[ -x "$2" ] || chmod +x "$2"
else
wontinstall "$1"
@@ -47,11 +47,11 @@
installbestbin() {
if [ -f "$1" ]; then
echo " install binary $3 (with `basename $1`)"
- cp -f "$1" "$3"
+ ${INSTALL} "$1" "$3"
else
if [ -f "$2" ]; then
echo " install binary $3 (with `basename $2`)"
- cp -f "$2" "$3"
+ ${INSTALL} "$2" "$3"
else
echo "None of $1, $2 exists"
exit 3
@@ -64,7 +64,7 @@
if [ -f "$1" ]; then
dest="$2/`basename $1`"
echo " install library $dest"
- cp -f "$1" "$2"
+ ${INSTALL} "$1" "$2"
if [ "$RANLIB" != "" ]; then
"$RANLIB" "$dest"
fi
@@ -86,7 +86,7 @@
last="$1"
for file in $args; do
echo " install $last/`basename $file`"
- cp -f "$file" "$last"
+ ${INSTALL} "$file" "$last"
done
}
diff -ur ocaml-3.12.0/byterun/Makefile ocaml-3.12.0-install/byterun/Makefile
--- ocaml-3.12.0/byterun/Makefile 2010-07-28 10:19:44.000000000 -0300
+++ ocaml-3.12.0-install/byterun/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -48,7 +48,7 @@
install::
if test -f libcamlrun_shared.so; then \
- cp libcamlrun_shared.so $(LIBDIR)/libcamlrun_shared.so; fi
+ $(INSTALL) libcamlrun_shared.so $(LIBDIR)/libcamlrun_shared.so; fi
clean::
rm -f libcamlrun_shared.so
diff -ur ocaml-3.12.0/byterun/Makefile.common ocaml-3.12.0-install/byterun/Makefile.common
--- ocaml-3.12.0/byterun/Makefile.common 2010-05-21 08:28:21.000000000 -0300
+++ ocaml-3.12.0-install/byterun/Makefile.common 2011-02-04 00:35:35.000000000 -0400
@@ -45,14 +45,15 @@
echo "$(LIBDIR)" >> ld.conf
install::
- cp ocamlrun$(EXE) $(BINDIR)/ocamlrun$(EXE)
- cp libcamlrun.$(A) $(LIBDIR)/libcamlrun.$(A)
+ $(INSTALL) ocamlrun$(EXE) $(BINDIR)/ocamlrun$(EXE)
+ $(INSTALL) libcamlrun.$(A) $(LIBDIR)/libcamlrun.$(A)
cd $(LIBDIR); $(RANLIB) libcamlrun.$(A)
if test -d $(LIBDIR)/caml; then : ; else mkdir $(LIBDIR)/caml; fi
for i in $(PUBLIC_INCLUDES); do \
- sed -f ../tools/cleanup-header $$i > $(LIBDIR)/caml/$$i; \
+ sed -f ../tools/cleanup-header $$i > $$i.clean; \
+ $(INSTALL) $$i.clean $(LIBDIR)/caml/$$i; \
done
- cp ld.conf $(LIBDIR)/ld.conf
+ $(INSTALL) ld.conf $(LIBDIR)/ld.conf
.PHONY: install
diff -ur ocaml-3.12.0/camlp4/man/Makefile ocaml-3.12.0-install/camlp4/man/Makefile
--- ocaml-3.12.0/camlp4/man/Makefile 2010-01-22 08:48:24.000000000 -0400
+++ ocaml-3.12.0-install/camlp4/man/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -10,7 +10,7 @@
install-local:
if test -n '$(MANDIR)'; then \
$(MKDIR) $(MANDIR)/man1 ; \
- cp $(TARGET) $(MANDIR)/man1/. ; \
+ $(INSTALL) $(TARGET) $(MANDIR)/man1/. ; \
for i in $(ALIASES); do \
rm -f $(MANDIR)/man1/$$i; \
echo '.so man1/$(TARGET)' > $(MANDIR)/man1/$$i; \
diff -ur ocaml-3.12.0/debugger/Makefile.shared ocaml-3.12.0-install/debugger/Makefile.shared
--- ocaml-3.12.0/debugger/Makefile.shared 2010-05-17 12:49:53.000000000 -0300
+++ ocaml-3.12.0-install/debugger/Makefile.shared 2011-02-04 00:35:35.000000000 -0400
@@ -83,7 +83,7 @@
$(CAMLC) $(LINKFLAGS) -o ocamldebug$(EXE) -linkall $(OTHEROBJS) $(OBJS)
install:
- cp ocamldebug$(EXE) $(BINDIR)/ocamldebug$(EXE)
+ $(INSTALL) ocamldebug$(EXE) $(BINDIR)/ocamldebug$(EXE)
clean::
rm -f ocamldebug$(EXE)
diff -ur ocaml-3.12.0/emacs/Makefile ocaml-3.12.0-install/emacs/Makefile
--- ocaml-3.12.0/emacs/Makefile 2010-01-22 08:48:24.000000000 -0400
+++ ocaml-3.12.0-install/emacs/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -60,7 +60,7 @@
simple-install:
@echo "Installing in $(EMACSDIR)..."
if test -d $(EMACSDIR); then : ; else mkdir -p $(EMACSDIR); fi
- cp $(FILES) $(EMACSDIR)
+ $(INSTALL) $(FILES) $(EMACSDIR)
if [ -z "$(NOCOMPILE)" ]; then \
cd $(EMACSDIR); $(EMACS) --batch --eval '$(COMPILECMD)'; \
fi
@@ -70,7 +70,7 @@
chmod a+x ocamltags
install-ocamltags: ocamltags
- cp ocamltags $(SCRIPTDIR)/ocamltags
+ $(INSTALL) ocamltags $(SCRIPTDIR)/ocamltags
clean:
rm -f ocamltags *~ #*#
diff -ur ocaml-3.12.0/Makefile ocaml-3.12.0-install/Makefile
--- ocaml-3.12.0/Makefile 2010-06-15 22:32:26.000000000 -0300
+++ ocaml-3.12.0-install/Makefile 2011-02-04 00:58:10.000000000 -0400
@@ -30,6 +30,11 @@
CAMLRUN=byterun/ocamlrun
SHELL=/bin/sh
MKDIR=mkdir -p
+INSTALL=install
+# could also use: INSTALL=cp -f, but beware of umask
+
+# pass this value to sub-makes and shell scripts
+export INSTALL
INCLUDES=-I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver \
-I toplevel
@@ -282,16 +287,16 @@
dllthreads.so dllunix.so dllgraphics.so dllmldbm.so dllstr.so \
dlltkanim.so
cd byterun; $(MAKE) install
- cp ocamlc $(BINDIR)/ocamlc$(EXE)
- cp ocaml $(BINDIR)/ocaml$(EXE)
+ $(INSTALL) ocamlc $(BINDIR)/ocamlc$(EXE)
+ $(INSTALL) ocaml $(BINDIR)/ocaml$(EXE)
cd stdlib; $(MAKE) install
- cp lex/ocamllex $(BINDIR)/ocamllex$(EXE)
- cp yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
- cp toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
- cp expunge $(LIBDIR)/expunge$(EXE)
- cp typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
- cp toplevel/topstart.cmo $(LIBDIR)
- cp toplevel/toploop.cmi toplevel/topdirs.cmi toplevel/topmain.cmi \
+ $(INSTALL) lex/ocamllex $(BINDIR)/ocamllex$(EXE)
+ $(INSTALL) yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
+ $(INSTALL) toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
+ $(INSTALL) expunge $(LIBDIR)/expunge$(EXE)
+ $(INSTALL) typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
+ $(INSTALL) toplevel/topstart.cmo $(LIBDIR)
+ $(INSTALL) toplevel/toploop.cmi toplevel/topdirs.cmi toplevel/topmain.cmi \
$(LIBDIR)
cd tools; $(MAKE) install
-cd man; $(MAKE) install
@@ -302,24 +307,24 @@
if test -f ocamlopt; then $(MAKE) installopt; else :; fi
if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \
else :; fi
- cp config/Makefile $(LIBDIR)/Makefile.config
+ $(INSTALL) config/Makefile $(LIBDIR)/Makefile.config
BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) PREFIX=$(PREFIX) \
./build/partial-install.sh
# Installation of the native-code compiler
installopt:
cd asmrun; $(MAKE) install
- cp ocamlopt $(BINDIR)/ocamlopt$(EXE)
+ $(INSTALL) ocamlopt $(BINDIR)/ocamlopt$(EXE)
cd stdlib; $(MAKE) installopt
cd ocamldoc; $(MAKE) installopt
for i in $(OTHERLIBRARIES); \
do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done
if test -f ocamlc.opt; \
- then cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE); else :; fi
+ then $(INSTALL) ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE); else :; fi
if test -f ocamlopt.opt; \
- then cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE); else :; fi
+ then $(INSTALL) ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE); else :; fi
if test -f lex/ocamllex.opt; \
- then cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE); else :; fi
+ then $(INSTALL) lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE); else :; fi
clean:: partialclean
diff -ur ocaml-3.12.0/man/Makefile ocaml-3.12.0-install/man/Makefile
--- ocaml-3.12.0/man/Makefile 2002-04-24 06:09:35.000000000 -0300
+++ ocaml-3.12.0-install/man/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -17,6 +17,8 @@
DIR=$(MANDIR)/man$(MANEXT)
install:
- for i in *.m; do cp $$i $(DIR)/`basename $$i .m`.$(MANEXT); done
- echo '.so man$(MANEXT)/ocamlc.$(MANEXT)' > $(DIR)/ocamlc.opt.$(MANEXT)
- echo '.so man$(MANEXT)/ocamlopt.$(MANEXT)' > $(DIR)/ocamlopt.opt.$(MANEXT)
+ for i in *.m; do $(INSTALL) $$i $(DIR)/`basename $$i .m`.$(MANEXT); done
+ echo '.so man$(MANEXT)/ocamlc.$(MANEXT)' > ocamlc.opt.$(MANEXT)
+ echo '.so man$(MANEXT)/ocamlopt.$(MANEXT)' > ocamlopt.opt.$(MANEXT)
+ $(INSTALL) ocamlc.opt.$(MANEXT) $(DIR)/ocamlc.opt.$(MANEXT)
+ $(INSTALL) ocamlopt.opt.$(MANEXT) $(DIR)/ocamlopt.opt.$(MANEXT)
diff -ur ocaml-3.12.0/ocamldoc/Makefile ocaml-3.12.0-install/ocamldoc/Makefile
--- ocaml-3.12.0/ocamldoc/Makefile 2010-06-16 08:38:22.000000000 -0300
+++ ocaml-3.12.0-install/ocamldoc/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -262,11 +262,11 @@
if test -d $(INSTALL_BINDIR); then : ; else $(MKDIR) $(INSTALL_BINDIR); fi
if test -d $(INSTALL_LIBDIR); then : ; else $(MKDIR) $(INSTALL_LIBDIR); fi
if test -d $(INSTALL_CUSTOMDIR); then : ; else $(MKDIR) $(INSTALL_CUSTOMDIR); fi
- $(CP) $(OCAMLDOC) $(INSTALL_BINDIR)/$(OCAMLDOC)$(EXE)
- $(CP) ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) $(INSTALL_LIBDIR)
- $(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
+ $(INSTALL) $(OCAMLDOC) $(INSTALL_BINDIR)/$(OCAMLDOC)$(EXE)
+ $(INSTALL) ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) $(INSTALL_LIBDIR)
+ $(INSTALL) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
if test -d $(INSTALL_MANODIR); then : ; else $(MKDIR) $(INSTALL_MANODIR); fi
- if test -d stdlib_man; then $(CP) stdlib_man/* $(INSTALL_MANODIR); else : ; fi
+ if test -d stdlib_man; then $(INSTALL) stdlib_man/* $(INSTALL_MANODIR); else : ; fi
installopt:
if test -f $(OCAMLDOC_OPT) ; then $(MAKE) installopt_really ; fi
@@ -274,9 +274,9 @@
installopt_really:
if test -d $(INSTALL_BINDIR); then : ; else $(MKDIR) $(INSTALL_BINDIR); fi
if test -d $(INSTALL_LIBDIR); then : ; else $(MKDIR) $(INSTALL_LIBDIR); fi
- $(CP) $(OCAMLDOC_OPT) $(INSTALL_BINDIR)/$(OCAMLDOC_OPT)$(EXE)
- $(CP) ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR)
- $(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
+ $(INSTALL) $(OCAMLDOC_OPT) $(INSTALL_BINDIR)/$(OCAMLDOC_OPT)$(EXE)
+ $(INSTALL) ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR)
+ $(INSTALL) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
# Testing :
###########
diff -ur ocaml-3.12.0/otherlibs/dynlink/Makefile ocaml-3.12.0-install/otherlibs/dynlink/Makefile
--- ocaml-3.12.0/otherlibs/dynlink/Makefile 2010-05-28 12:09:22.000000000 -0300
+++ ocaml-3.12.0-install/otherlibs/dynlink/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -66,12 +66,12 @@
$(CAMLC) $(COMPFLAGS) -o extract_crc dynlink.cma extract_crc.cmo
install:
- cp dynlink.cmi dynlink.cma dynlink.mli $(LIBDIR)
- cp extract_crc $(LIBDIR)/extract_crc$(EXE)
+ $(INSTALL) dynlink.cmi dynlink.cma dynlink.mli $(LIBDIR)
+ $(INSTALL) extract_crc $(LIBDIR)/extract_crc$(EXE)
installopt:
if $(NATDYNLINK); then \
- cp $(NATOBJS) dynlink.cmxa dynlink.$(A) $(LIBDIR) && \
+ $(INSTALL) $(NATOBJS) dynlink.cmxa dynlink.$(A) $(LIBDIR) && \
cd $(LIBDIR) && $(RANLIB) dynlink.$(A); \
fi
diff -ur ocaml-3.12.0/otherlibs/labltk/camltk/Makefile ocaml-3.12.0-install/otherlibs/labltk/camltk/Makefile
--- ocaml-3.12.0/otherlibs/labltk/camltk/Makefile 2007-12-12 10:09:45.000000000 -0400
+++ ocaml-3.12.0-install/otherlibs/labltk/camltk/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -20,12 +20,12 @@
install:
if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
- cp $(CAMLTKOBJS:.cmo=.cmi) $(CWIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
+ $(INSTALL) $(CAMLTKOBJS:.cmo=.cmi) $(CWIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
chmod 644 $(INSTALLDIR)/*.cmi
installopt:
@if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
- cp $(CAMLTKOBJSX) $(INSTALLDIR)
+ $(INSTALL) $(CAMLTKOBJSX) $(INSTALLDIR)
chmod 644 $(INSTALLDIR)/*.cmx
.SUFFIXES :
diff -ur ocaml-3.12.0/otherlibs/labltk/compiler/Makefile ocaml-3.12.0-install/otherlibs/labltk/compiler/Makefile
--- ocaml-3.12.0/otherlibs/labltk/compiler/Makefile 2010-01-19 09:12:47.000000000 -0400
+++ ocaml-3.12.0-install/otherlibs/labltk/compiler/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -45,8 +45,8 @@
rm -f *.cm* pplex.ml ppyac.ml ppyac.mli pp$(EXE)
install:
- cp tkcompiler$(EXE) $(INSTALLDIR)
- cp pp$(EXE) $(INSTALLDIR)
+ $(INSTALL) tkcompiler$(EXE) $(INSTALLDIR)
+ $(INSTALL) pp$(EXE) $(INSTALLDIR)
.SUFFIXES :
.SUFFIXES : .mli .ml .cmi .cmo .mlp
diff -ur ocaml-3.12.0/otherlibs/labltk/frx/Makefile ocaml-3.12.0-install/otherlibs/labltk/frx/Makefile
--- ocaml-3.12.0/otherlibs/labltk/frx/Makefile 2010-01-22 08:48:24.000000000 -0400
+++ ocaml-3.12.0-install/otherlibs/labltk/frx/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -20,10 +20,10 @@
$(CAMLOPTLIBR) -o frxlib.cmxa $(OBJSX)
install:
- cp *.cmi *.mli frxlib.cma $(INSTALLDIR)
+ $(INSTALL) *.cmi *.mli frxlib.cma $(INSTALLDIR)
installopt:
- cp frxlib.cmxa frxlib.$(A) $(INSTALLDIR)
+ $(INSTALL) frxlib.cmxa frxlib.$(A) $(INSTALLDIR)
clean:
rm -f *.cm* *.$(O) *.$(A)
diff -ur ocaml-3.12.0/otherlibs/labltk/jpf/Makefile ocaml-3.12.0-install/otherlibs/labltk/jpf/Makefile
--- ocaml-3.12.0/otherlibs/labltk/jpf/Makefile 2010-01-22 08:48:24.000000000 -0400
+++ ocaml-3.12.0-install/otherlibs/labltk/jpf/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -21,10 +21,10 @@
$(CAMLOPTLIBR) -o jpflib.cmxa $(OBJSX)
install:
- cp $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) jpflib.cma $(INSTALLDIR)
+ $(INSTALL) $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) jpflib.cma $(INSTALLDIR)
installopt:
- cp jpflib.cmxa jpflib.$(A) $(OBJS:.cmo=.cmx) $(INSTALLDIR)
+ $(INSTALL) jpflib.cmxa jpflib.$(A) $(OBJS:.cmo=.cmx) $(INSTALLDIR)
clean:
rm -f *.cm* *.$(O) *.$(A) *~ *test
diff -ur ocaml-3.12.0/otherlibs/labltk/labltk/Makefile ocaml-3.12.0-install/otherlibs/labltk/labltk/Makefile
--- ocaml-3.12.0/otherlibs/labltk/labltk/Makefile 2007-12-12 10:09:45.000000000 -0400
+++ ocaml-3.12.0-install/otherlibs/labltk/labltk/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -17,12 +17,12 @@
install:
if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
- cp $(LABLTKOBJS:.cmo=.cmi) $(WIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
+ $(INSTALL) $(LABLTKOBJS:.cmo=.cmi) $(WIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
chmod 644 $(INSTALLDIR)/*.cmi
installopt:
@if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
- cp $(LABLTKOBJSX) $(INSTALLDIR)
+ $(INSTALL) $(LABLTKOBJSX) $(INSTALLDIR)
chmod 644 $(INSTALLDIR)/*.cmx
clean:
diff -ur ocaml-3.12.0/otherlibs/labltk/lib/Makefile ocaml-3.12.0-install/otherlibs/labltk/lib/Makefile
--- ocaml-3.12.0/otherlibs/labltk/lib/Makefile 2010-06-07 21:54:09.000000000 -0300
+++ ocaml-3.12.0-install/otherlibs/labltk/lib/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -58,15 +58,15 @@
@echo 'exec $(INSTALLDIR)/$(LIBNAME)top$(EXE) -I $(INSTALLDIR) $$*' >> $@
install-script: $(LIBNAME)
- cp $(LIBNAME) $(BINDIR)
+ $(INSTALL) $(LIBNAME) $(BINDIR)
chmod 755 $(BINDIR)/$(LIBNAME)
install-batch:
- cp labltk.bat $(BINDIR)
+ $(INSTALL) labltk.bat $(BINDIR)
install:
if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
- cp $(LIBNAME).cma $(LIBNAME)top$(EXE) $(INSTALLDIR)
+ $(INSTALL) $(LIBNAME).cma $(LIBNAME)top$(EXE) $(INSTALLDIR)
chmod 644 $(INSTALLDIR)/$(LIBNAME).cma
chmod 755 $(INSTALLDIR)/$(LIBNAME)top$(EXE)
@if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
@@ -77,7 +77,7 @@
installopt:
@if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
- cp $(LIBNAME).cmxa $(LIBNAME).$(A) $(INSTALLDIR)
+ $(INSTALL) $(LIBNAME).cmxa $(LIBNAME).$(A) $(INSTALLDIR)
cd $(INSTALLDIR); $(RANLIB) $(LIBNAME).$(A)
chmod 644 $(INSTALLDIR)/$(LIBNAME).cmxa
chmod 644 $(INSTALLDIR)/$(LIBNAME).$(A)
diff -ur ocaml-3.12.0/otherlibs/labltk/support/Makefile ocaml-3.12.0-install/otherlibs/labltk/support/Makefile
--- ocaml-3.12.0/otherlibs/labltk/support/Makefile 2008-04-22 04:38:07.000000000 -0300
+++ ocaml-3.12.0-install/otherlibs/labltk/support/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -26,17 +26,17 @@
install:
if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
- cp $(PUB) lib$(LIBNAME).$(A) $(INSTALLDIR)
+ $(INSTALL) $(PUB) lib$(LIBNAME).$(A) $(INSTALLDIR)
cd $(INSTALLDIR); $(RANLIB) lib$(LIBNAME).$(A)
cd $(INSTALLDIR); chmod 644 $(PUB) lib$(LIBNAME).$(A)
if test -f dll$(LIBNAME)$(EXT_DLL); then \
- cp dll$(LIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
+ $(INSTALL) dll$(LIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
installopt:
@if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
- cp $(PUBMLI:.mli=.cmx) $(INSTALLDIR)
+ $(INSTALL) $(PUBMLI:.mli=.cmx) $(INSTALLDIR)
if test -f tkthread.$(O); then \
- cp tkthread.cmx tkthread.$(O) $(INSTALLDIR); \
+ $(INSTALL) tkthread.cmx tkthread.$(O) $(INSTALLDIR); \
chmod 644 $(INSTALLDIR)/tkthread.cmx $(INSTALLDIR)/tkthread.$(O); \
fi
diff -ur ocaml-3.12.0/otherlibs/Makefile.shared ocaml-3.12.0-install/otherlibs/Makefile.shared
--- ocaml-3.12.0/otherlibs/Makefile.shared 2008-07-15 12:31:32.000000000 -0300
+++ ocaml-3.12.0-install/otherlibs/Makefile.shared 2011-02-04 00:35:35.000000000 -0400
@@ -58,16 +58,16 @@
install::
if test -f dll$(CLIBNAME)$(EXT_DLL); then \
- cp dll$(CLIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
- cp lib$(CLIBNAME).$(A) $(LIBDIR)/
+ $(INSTALL) dll$(CLIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
+ $(INSTALL) lib$(CLIBNAME).$(A) $(LIBDIR)/
cd $(LIBDIR); $(RANLIB) lib$(CLIBNAME).$(A)
- cp $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)/
- if test -n "$(HEADERS)"; then cp $(HEADERS) $(LIBDIR)/caml/; fi
+ $(INSTALL) $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)/
+ if test -n "$(HEADERS)"; then $(INSTALL) $(HEADERS) $(LIBDIR)/caml/; fi
installopt:
- cp $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) $(LIBDIR)/
+ $(INSTALL) $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) $(LIBDIR)/
cd $(LIBDIR); $(RANLIB) $(LIBNAME).a
- if test -f $(LIBNAME).cmxs; then cp $(LIBNAME).cmxs $(LIBDIR)/; fi
+ if test -f $(LIBNAME).cmxs; then $(INSTALL) $(LIBNAME).cmxs $(LIBDIR)/; fi
partialclean:
rm -f *.cm*
diff -ur ocaml-3.12.0/otherlibs/systhreads/Makefile ocaml-3.12.0-install/otherlibs/systhreads/Makefile
--- ocaml-3.12.0/otherlibs/systhreads/Makefile 2010-04-27 04:55:08.000000000 -0300
+++ ocaml-3.12.0-install/otherlibs/systhreads/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -70,19 +70,19 @@
rm -f *.o *.a *.so
install:
- if test -f dllthreads.so; then cp dllthreads.so $(STUBLIBDIR)/dllthreads.so; fi
- cp libthreads.a $(LIBDIR)/libthreads.a
+ if test -f dllthreads.so; then $(INSTALL) dllthreads.so $(STUBLIBDIR)/dllthreads.so; fi
+ $(INSTALL) libthreads.a $(LIBDIR)/libthreads.a
cd $(LIBDIR); $(RANLIB) libthreads.a
if test -d $(LIBDIR)/threads; then :; else mkdir $(LIBDIR)/threads; fi
- cp $(THREAD_OBJS:.cmo=.cmi) threads.cma $(LIBDIR)/threads
+ $(INSTALL) $(THREAD_OBJS:.cmo=.cmi) threads.cma $(LIBDIR)/threads
rm -f $(LIBDIR)/threads/stdlib.cma
- cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
- cp threads.h $(LIBDIR)/caml/threads.h
+ $(INSTALL) thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
+ $(INSTALL) threads.h $(LIBDIR)/caml/threads.h
installopt:
- cp libthreadsnat.a $(LIBDIR)/libthreadsnat.a
+ $(INSTALL) libthreadsnat.a $(LIBDIR)/libthreadsnat.a
cd $(LIBDIR); $(RANLIB) libthreadsnat.a
- cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
+ $(INSTALL) $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
cd $(LIBDIR)/threads; $(RANLIB) threads.a
.SUFFIXES: .ml .mli .cmo .cmi .cmx
diff -ur ocaml-3.12.0/otherlibs/threads/Makefile ocaml-3.12.0-install/otherlibs/threads/Makefile
--- ocaml-3.12.0/otherlibs/threads/Makefile 2008-12-03 14:09:09.000000000 -0400
+++ ocaml-3.12.0-install/otherlibs/threads/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -100,12 +100,12 @@
rm -f pervasives.mli marshal.mli unix.mli
install:
- if test -f dllvmthreads.so; then cp dllvmthreads.so $(STUBLIBDIR)/.; fi
+ if test -f dllvmthreads.so; then $(INSTALL) dllvmthreads.so $(STUBLIBDIR)/.; fi
mkdir -p $(LIBDIR)/vmthreads
- cp libvmthreads.a $(LIBDIR)/vmthreads/libvmthreads.a
+ $(INSTALL) libvmthreads.a $(LIBDIR)/vmthreads/libvmthreads.a
cd $(LIBDIR)/vmthreads; $(RANLIB) libvmthreads.a
- cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/vmthreads
- cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)/vmthreads
+ $(INSTALL) thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/vmthreads
+ $(INSTALL) thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)/vmthreads
installopt:
diff -ur ocaml-3.12.0/stdlib/Makefile ocaml-3.12.0-install/stdlib/Makefile
--- ocaml-3.12.0/stdlib/Makefile 2010-01-22 08:48:24.000000000 -0400
+++ ocaml-3.12.0-install/stdlib/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -25,7 +25,7 @@
installopt: installopt-default installopt-$(PROFILING)
installopt-default:
- cp stdlib.cmxa stdlib.a std_exit.o *.cmx $(LIBDIR)
+ $(INSTALL) stdlib.cmxa stdlib.a std_exit.o *.cmx $(LIBDIR)
cd $(LIBDIR); $(RANLIB) stdlib.a
installopt-noprof:
@@ -36,7 +36,7 @@
rm -f $(LIBDIR)/std_exit.p.o; ln -s std_exit.o $(LIBDIR)/std_exit.p.o
installopt-prof:
- cp stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(LIBDIR)
+ $(INSTALL) stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(LIBDIR)
cd $(LIBDIR); $(RANLIB) stdlib.p.a
stdlib.p.cmxa: $(OBJS:.cmo=.p.cmx)
diff -ur ocaml-3.12.0/stdlib/Makefile.shared ocaml-3.12.0-install/stdlib/Makefile.shared
--- ocaml-3.12.0/stdlib/Makefile.shared 2010-05-21 08:28:21.000000000 -0300
+++ ocaml-3.12.0-install/stdlib/Makefile.shared 2011-02-04 00:35:35.000000000 -0400
@@ -41,7 +41,7 @@
all: stdlib.cma std_exit.cmo camlheader camlheader_ur
install:
- cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR)
+ $(INSTALL) stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR)
stdlib.cma: $(OBJS)
$(CAMLC) -a -o stdlib.cma $(OBJS)
diff -ur ocaml-3.12.0/tools/Makefile.shared ocaml-3.12.0-install/tools/Makefile.shared
--- ocaml-3.12.0/tools/Makefile.shared 2010-06-07 03:58:41.000000000 -0300
+++ ocaml-3.12.0-install/tools/Makefile.shared 2011-02-04 00:35:35.000000000 -0400
@@ -52,9 +52,9 @@
rm -f ocamldep.opt
install::
- cp ocamldep $(BINDIR)/ocamldep$(EXE)
+ $(INSTALL) ocamldep $(BINDIR)/ocamldep$(EXE)
if test -f ocamldep.opt; \
- then cp ocamldep.opt $(BINDIR)/ocamldep.opt$(EXE); else :; fi
+ then $(INSTALL) ocamldep.opt $(BINDIR)/ocamldep.opt$(EXE); else :; fi
# The profiler
@@ -70,15 +70,15 @@
$(CAMLC) $(LINKFLAGS) -o ocamlcp warnings.cmo main_args.cmo ocamlcp.cmo
install::
- cp ocamlprof $(BINDIR)/ocamlprof$(EXE)
- cp ocamlcp $(BINDIR)/ocamlcp$(EXE)
- cp profiling.cmi profiling.cmo $(LIBDIR)
+ $(INSTALL) ocamlprof $(BINDIR)/ocamlprof$(EXE)
+ $(INSTALL) ocamlcp $(BINDIR)/ocamlcp$(EXE)
+ $(INSTALL) profiling.cmi profiling.cmo $(LIBDIR)
clean::
rm -f ocamlprof ocamlcp
install::
- cp ocamlmktop $(BINDIR)/ocamlmktop$(EXE)
+ $(INSTALL) ocamlmktop $(BINDIR)/ocamlmktop$(EXE)
clean::
rm -f ocamlmktop
@@ -98,7 +98,7 @@
cp ../myocamlbuild_config.ml .
install::
- cp ocamlmklib $(BINDIR)/ocamlmklib$(EXE)
+ $(INSTALL) ocamlmklib $(BINDIR)/ocamlmklib$(EXE)
clean::
rm -f ocamlmklib
@@ -122,7 +122,7 @@
# To make custom toplevels (see Makefile/Makefile.nt)
install::
- cp ocamlmktop $(BINDIR)/ocamlmktop$(EXE)
+ $(INSTALL) ocamlmktop $(BINDIR)/ocamlmktop$(EXE)
clean::
rm -f ocamlmktop
@@ -140,7 +140,7 @@
$(CAMLLEX) lexer299.mll
#install::
-# cp ocaml299to3 $(BINDIR)/ocaml299to3$(EXE)
+# $(INSTALL) ocaml299to3 $(BINDIR)/ocaml299to3$(EXE)
clean::
rm -f ocaml299to3 lexer299.ml
@@ -156,7 +156,7 @@
$(CAMLLEX) lexer301.mll
#install::
-# cp scrapelabels $(LIBDIR)
+# $(INSTALL) scrapelabels $(LIBDIR)
clean::
rm -f scrapelabels lexer301.ml
@@ -172,7 +172,7 @@
$(ADDLABELS_IMPORTS) addlabels.cmo
#install::
-# cp addlabels $(LIBDIR)
+# $(INSTALL) addlabels $(LIBDIR)
clean::
rm -f addlabels
@@ -239,8 +239,8 @@
$(CAMLC) -o objinfo $(OBJINFO)
install::
- cp objinfo $(BINDIR)/ocamlobjinfo$(EXE)
- cp objinfo_helper$(EXE) $(LIBDIR)/objinfo_helper$(EXE)
+ $(INSTALL) objinfo $(BINDIR)/ocamlobjinfo$(EXE)
+ $(INSTALL) objinfo_helper$(EXE) $(LIBDIR)/objinfo_helper$(EXE)
clean::
rm -f objinfo objinfo_helper$(EXE)
diff -ur ocaml-3.12.0/win32caml/Makefile ocaml-3.12.0-install/win32caml/Makefile
--- ocaml-3.12.0/win32caml/Makefile 2007-11-15 09:21:15.000000000 -0400
+++ ocaml-3.12.0-install/win32caml/Makefile 2011-02-04 00:35:35.000000000 -0400
@@ -49,7 +49,7 @@
rm -f ocamlwin.exe *.$(O) *.pdb ocamlwin.ilk
install:
- cp ocamlwin.exe $(PREFIX)/OCamlWin.exe
+ $(INSTALL) ocamlwin.exe $(PREFIX)/OCamlWin.exe
.SUFFIXES: .c .$(O)
| ||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0005901) doligez (manager) 2011-05-17 16:37 |
Will also need to update configure to autodetect a compatible version of install... |
|
(0006053) gerd (reporter) 2011-07-21 23:44 |
Note that there are several versions of install (still). Because of this one should at least have the option to set the path of the install binary in the configure script. In GODI we added a godi_install program to handle this issue, which always provides a BSD-compatible install. Maybe this is also a way to get here around this difficulty, just add a comparable program to the ocaml distribution. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-02-04 06:16 | selinger | New Issue | |
| 2011-02-04 06:16 | selinger | File Added: ocaml-3.12.0-install.patch | |
| 2011-05-17 16:37 | doligez | Note Added: 0005901 | |
| 2011-05-17 16:37 | doligez | Status | new => acknowledged |
| 2011-07-21 23:44 | gerd | Note Added: 0006053 | |
| 2012-01-27 15:54 | doligez | Relationship added | related to 0001919 |
| 2012-07-10 17:04 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-09-19 15:01 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |



