about summary refs log tree commit diff
path: root/perl/Makefile.am
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-05-10T23·03-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-05-10T23·03-0400
commit4f7bab7db1d0447e41f858633cddba1dcb2c9ea2 (patch)
tree818adb7b019671906e2b9016b4c265ebc53cfdf1 /perl/Makefile.am
parent6a7b24a3f25548fe2b083555cd2117dd66557ab0 (diff)
Support building with the Perl XS bindings disabled
Since the Perl bindings require shared libraries, this is required on
platforms such as Cygwin where we do a static build.
Diffstat (limited to 'perl/Makefile.am')
-rw-r--r--perl/Makefile.am9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl/Makefile.am b/perl/Makefile.am
index 5c841052f143..d1f9b1c74162 100644
--- a/perl/Makefile.am
+++ b/perl/Makefile.am
@@ -2,9 +2,12 @@ PERL_MODULES = lib/Nix/Store.pm lib/Nix/Manifest.pm lib/Nix/GeneratePatches.pm l
 
 all: $(PERL_MODULES:.in=)
 
-install-exec-local: $(PERL_MODULES:.in=)
+install-exec-local: $(PERL_MODULES:.in=) install-perl-xs
 	$(INSTALL) -d $(DESTDIR)$(perllibdir)/Nix
 	$(INSTALL_DATA) $(PERL_MODULES:.in=) $(DESTDIR)$(perllibdir)/Nix
+
+if PERL_BINDINGS
+install-perl-xs:
 	$(INSTALL) -d $(DESTDIR)$(perllibdir)/auto/Nix/Store
 	ln -sfn $(pkglibdir)/libNixStore$(dynlib_suffix) $(DESTDIR)$(perllibdir)/auto/Nix/Store/Store$(dynlib_suffix)
 
@@ -25,6 +28,10 @@ AM_CXXFLAGS = \
 lib/Nix/Store.cc: lib/Nix/Store.xs
 	xsubpp $^ -output $@
 
+else
+install-perl-xs:
+endif
+
 EXTRA_DIST = $(PERL_MODULES) lib/Nix/Store.xs
 
 include ../substitute.mk