$NetBSD: patch-aa,v 1.1 2007/09/21 13:00:55 wiz Exp $ --- src/Makefile.orig 2003-05-15 16:17:53.000000000 +0200 +++ src/Makefile @@ -137,32 +137,39 @@ testcc: lablgladecc lablgtktop rm -f testcc.ml install: - if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi - cp $(ALLOBJS:.cmo=.cmi) $(THOBJS:.cmo=.cmi) $(INSTALLDIR) - cp -p *.mli $(INSTALLDIR) - cp -p $(ALLOBJS:.cmo=.ml) $(ALLTHOBJS:.cmo=.ml) $(INSTALLDIR) - cp $(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) $(INSTALLDIR) - cp $(CLIBS) $(INSTALLDIR) - cd $(INSTALLDIR) && $(RANLIB) $(CLIBS) - cp lablgtktop varcc $(INSTALLDIR) - if test -f lablgtktop_t; then cp lablgtktop_t $(INSTALLDIR); fi - cp -p *.h $(INSTALLDIR) + if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} ${INSTALLDIR}; fi + for F in $(ALLOBJS:.cmo=.cmi) $(THOBJS:.cmo=.cmi) *.mli \ + $(ALLOBJS:.cmo=.ml) $(ALLTHOBJS:.cmo=.ml) \ + $(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) $(CLIBS) *.h; \ + do \ + ${BSD_INSTALL_DATA} $$F ${INSTALLDIR}; \ + done + ${BSD_INSTALL_SCRIPT} lablgtktop $(INSTALLDIR) + ${BSD_INSTALL_SCRIPT} varcc $(INSTALLDIR) + if test -f lablgtktop_t; then ${BSD_INSTALL_SCRIPT} lablgtktop_t $(INSTALLDIR); fi if test -f lablgtk.cmxa; then $(MAKE) installopt; fi + ${BSD_INSTALL_DATA_DIR} $(DLLDIR) if test -f dlllablgtk.so; then \ - if test -d $(DLLDIR); then : ; else mkdir -p $(DLLDIR); fi; \ - cp $(CLIBS:lib%.a=dll%.so) $(DLLDIR) || \ - echo "Couldn't install dlls in default location"; \ + for F in $(CLIBS:lib%.a=dll%.so); \ + do \ + ${BSD_INSTALL_DATA} $$F $(DLLDIR); \ + done; \ fi - cp lablgtk $(BINDIR) + ${BSD_INSTALL_SCRIPT} lablgtk $(BINDIR) if test -f lablgladecc; then cp lablgladecc $(BINDIR); fi installopt: - cp $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) $(INSTALLDIR) - cd $(INSTALLDIR) && $(RANLIB) $(MLLIBS:.cma=.a) - cp $(ALLOBJS:.cmo=.cmx) $(INSTALLDIR) - cp $(INITOBJS:.cmo=.o) $(INSTALLDIR) + for F in $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) \ + $(ALLOBJS:.cmo=.cmx) $(INITOBJS:.cmo=.o); \ + do \ + ${BSD_INSTALL_DATA} $$F $(INSTALLDIR); \ + done if test -f gtkThread.cmx; then \ - cp $(THOBJS:.cmo=.cmx) $(THOBJS:.cmo=.o) $(INSTALLDIR); fi + for F in $(THOBJS:.cmo=.cmx) $(THOBJS:.cmo=.o); \ + do \ + ${BSD_INSTALL_DATA} $$F $(INSTALLDIR); \ + done; \ + fi liblablgtk.a: $(COBJS) $(LIBRARIAN) -o lablgtk $(COBJS) $(GTKLIBS)