File: ruby.mk

package info (click to toggle)
libselinux 2.6-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch, stretch-proposed-updates
  • size: 2,172 kB
  • ctags: 2,529
  • sloc: ansic: 16,149; makefile: 339; sh: 20
file content (26 lines) | stat: -rw-r--r-- 983 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/bin/make --no-print-directory -f

## Default target
RUBY_VERSIONS := $(shell dh_ruby --print-supported)
all: $(RUBY_VERSIONS)

## Targets share the same output files, so must be run serially
.NOTPARALLEL:
.PHONY: all $(RUBY_VERSIONS)

## Helper variables
RUBY_PLATFORM = $(shell $@ -e 'print RUBY_PLATFORM')
RUBY_HDRDIR = $(shell $@ -e 'print RbConfig::CONFIG["rubyhdrdir"]')
RUBY_ARCH_HDRDIR = $(shell $@ -e 'print RbConfig::CONFIG["rubyarchhdrdir"]')
RUBY_VENDOR_ARCHLIB = $(shell $@ -e 'print RbConfig::CONFIG["vendorarchdir"]')

## SELinux does not have a very nice build process
extra_ruby_args  = RUBYLIBVER=$*
extra_ruby_args += RUBYPLATFORM=$(RUBY_PLATFORM)
extra_ruby_args += RUBYINC="-I$(RUBY_HDRDIR) -I$(RUBY_ARCH_HDRDIR)"
extra_ruby_args += RUBYINSTALL=$(DESTDIR)$(RUBY_VENDOR_ARCHLIB)

## How to build and install each individually-versioned copy
$(RUBY_VERSIONS): ruby%:
	+$(MAKE) $(extra_ruby_args) clean-rubywrap
	+$(MAKE) $(extra_ruby_args) install-rubywrap