Permalink
Browse files

Fix OOT builds with swig files in source dir

Normally, when the Makefile calls swig, the resulting files end up in the build
directory. However, when the files are pre-generated (e.g. as in the znc 1.0
tarball) and an out of tree build is used, they are in the source directory and
installation fails.

Thanks to Kinji for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
  • Loading branch information...
1 parent 3909577 commit d9d6a2228c7d71e304521794441e41722f96ebb5 @psychon psychon committed Dec 26, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 modules/modperl/Makefile.inc
@@ -60,5 +60,9 @@ modperl_install: install_datadir modperl_all
done
mkdir -p $(DESTDIR)$(MODDIR)/modperl
$(INSTALL_PROGRAM) modperl/ZNC.$(PERLCEXT_EXT) $(DESTDIR)$(MODDIR)/modperl
- $(INSTALL_DATA) modperl/ZNC.pm $(DESTDIR)$(MODDIR)/modperl
+ if test -e modperl/ZNC.pm ; then \
+ $(INSTALL_DATA) modperl/ZNC.pm $(DESTDIR)$(MODDIR)/modperl || exit 1 ; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/modperl/ZNC.pm $(DESTDIR)$(MODDIR)/modperl || exit 1 ; \
+ fi
$(INSTALL_DATA) $(srcdir)/modperl/startup.pl $(DESTDIR)$(MODDIR)/modperl

0 comments on commit d9d6a22

Please sign in to comment.