# $Id: Makefile,v 3.6 2003-03-22 16:11:30 stolpmann Exp $ TOP_DIR=../.. all: @echo "Perl bindings are built by 'make perlapi'" true opt: true include $(TOP_DIR)/Makefile.conf # Note: Makefile.perl needs to be fixed because Perl's MakeMaker ignores # the directory containing dllcamlidl.so - it thinks this directory # does not contain any useful library. perlapi: if [ -f blib/arch/auto/UI/Stubs/Stubs.so ]; then cp blib/arch/auto/UI/Stubs/Stubs.so Stubs.old; else rm -f Stubs.old; fi perl Makefile.PL sed -e 's|^LD_RUN_PATH[ \t]*=[ \t]*\(.*\)|LD_RUN_PATH = '$(PERL_LIBDIR)'|' Stubs/Makefile.perl >Stubs/Makefile.perl.fixed mv Stubs/Makefile.perl.fixed Stubs/Makefile.perl $(MAKE) -f Makefile.perl all cp Stubs/UI.byte blib/lib @# Check if it has worked: @if cmp -s blib/arch/auto/UI/Stubs/Stubs.so Stubs.old; then echo "*********** WARNING: no newer version of Stubs.so"; fi @if [ ! -f blib/arch/auto/UI/Stubs/Stubs.so ]; then echo "*********** WARNING: no Stubs.so; build incomplete"; fi test: $(MAKE) -f Makefile.perl test clean: -$(MAKE) -f Makefile.perl clean rm -f Stubs.old install: @echo "Perl bindings are installed by 'make install-perlapi'" true install-perlapi: $(MAKE) install-dll $(MAKE) -f Makefile.perl install # true &&: Force that the shell executes the command install-tmp: $(MAKE) install-dll true && mkdir -p ~/tmp/tmp-wdialog cd blib && tar cf - . | tar xf - -C ~/tmp/tmp-wdialog install-dll: if ocamlfind query wlexing >/dev/null; then wlexing='dllwlexing.so'; fi && \ files=`./find_ocaml_dll dllcamlidl.so dllunix.so dllpcre_stubs.so $$wlexing` && \ for f in $$files; do cp $$f $(PERL_LIBDIR); done