File: rules

package info (click to toggle)
libalgorithm-diff-xs-perl 0.04-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 260 kB
  • ctags: 518
  • sloc: perl: 913; makefile: 11
file content (16 lines) | stat: -rwxr-xr-x 566 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/make -f

DEB_BUILD_GNU_TYPE      := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE       := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  PERL_VER := $(shell perl -MConfig -e'print "$$Config{version}\n"')
  export PERL5LIB=/usr/$(DEB_HOST_GNU_TYPE)/lib/perl/$(PERL_VER)

  ifneq (true,$(shell [ -f $(PERL5LIB)/Config.pm -a -f $(PERL5LIB)/Config_heavy.pl ] && echo true))
    $(error Config.pm & Config_heavy.pl for cross building not found in $(PERL5LIB))
  endif
endif

%:
	dh $@