File: rules

package info (click to toggle)
firmware-free 3.4
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid, stretch
  • size: 1,472 kB
  • ctags: 5,345
  • sloc: ansic: 16,001; asm: 4,303; yacc: 610; lex: 364; python: 331; makefile: 133; sh: 54; perl: 17
file content (58 lines) | stat: -rwxr-xr-x 1,664 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/make -f
SHELL := sh -e

CONTROL_FILES += debian/bin/gencontrol.py defines $(wildcard */defines) $(wildcard */copyright) $(wildcard */LICENSE*)

include debian/rules.defs

GENCONTROL = debian/bin/gencontrol.py

__BINNMU := $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*\+b([0-9]+)$$,\1,p')

# Nothing to build
build-indep build-arch build:

clean: debian/control
	dh_testdir
	dh_clean

binary-indep:
	dh_testdir
	$(MAKE) -f debian/rules.gen binary-indep

binary-arch:

binary:	binary-indep binary-arch

CONTROL_FILES += debian/changelog $(wildcard debian/templates/control.*) 
debian/control debian/rules.gen: $(GENCONTROL) $(CONTROL_FILES)
ifeq ($(wildcard debian/control.md5sum),)
	$(MAKE) -f debian/rules debian/control-real
else ifeq ($(__BINNMU),)
	md5sum --check debian/control.md5sum --status || \
		$(MAKE) -f debian/rules debian/control-real
else
	grep -v debian/changelog debian/control.md5sum | md5sum --check - --status || \
		$(MAKE) -f debian/rules debian/control-real
endif

debian/control-real: $(GENCONTROL) $(CONTROL_FILES)
	$(GENCONTROL) /usr/src/linux-support-$(KERNELVERSION)
	md5sum $^ > debian/control.md5sum
	@echo
	@echo This target is made to fail intentionally, to make sure
	@echo that it is NEVER run during the automated build. Please
	@echo ignore the following error, the debian/control file has
	@echo been generated SUCCESSFULLY.
	@echo
	exit 1

maintainerclean:
	-rm debian/control debian/control.md5sum debian/rules.gen
	-rm debian/*.copyright
	-rm debian/*.hook.*
	-rm debian/*.preinst
	-rm debian/*.postinst
	-rm debian/*.templates

.PHONY: clean build-indep build-arch build binary-indep binary-arch binary