File: rules

package info (click to toggle)
elvis-tiny 1.4-23
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,360 kB
  • ctags: 2,100
  • sloc: ansic: 13,922; sh: 35; makefile: 20
file content (39 lines) | stat: -rwxr-xr-x 1,033 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /usr/bin/make -f

tmp	= $(shell pwd)/debian/elvis-tiny
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
EXTRA_CFLAGS    = -g
endif

%:
	dh $@

override_dh_auto_build:
	make -f Makefile.mix EXTRA_CFLAGS="$(EXTRA_CFLAGS)"
	$(CC) $(EXTRA_CFLAGS) -O2 -o wrapper debian/wrapper.c

override_dh_auto_install:
	install -m 755 -d $(tmp)/bin
	install -m 755 elvis $(tmp)/bin/elvis-tiny
	install -m 755 wrapper $(tmp)/bin/vi

override_dh_auto_clean:
	make -f Makefile.mix clobber

override_dh_installchangelogs:
	dh_installchangelogs debian/changelog.upstream

# We used to strip as much as possible to save a few bytes (it made
# the vi wrapper fit in a 4K block on i386 - just) but it's probably
# a bad idea to mess with ELF comments and notes.
#override_dh_strip:
#	dh_strip
#ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
#	strip --remove-section=.comment --remove-section=.note $(tmp)/bin/vi
#	strip --remove-section=.comment --remove-section=.note $(tmp)/bin/elvis-tiny
#endif

override_dh_clean:
	dh_clean
	rm -f wrapper elvis