File: rules

package info (click to toggle)
yosys 0.23-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,644 kB
  • sloc: cpp: 138,485; python: 8,605; yacc: 3,451; sh: 2,358; makefile: 1,204; lex: 696; perl: 399; ansic: 371; javascript: 323; tcl: 78; vhdl: 46
file content (62 lines) | stat: -rwxr-xr-x 1,690 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

PDF_DATE   :=     $(shell LC_ALL=C date -u -d @$(SOURCE_DATE_EPOCH) +D:%Y%m%d%H%M%SZ)
PDF_DATE2  :=     $(shell LC_ALL=C date -u -d @$(SOURCE_DATE_EPOCH) +"%B %d, %Y")
CHANGELOG_DATE ?= $(shell LC_ALL=C date -u -d @$(SOURCE_DATE_EPOCH) +"%d %B %Y")

%:
	PREFIX=/usr dh $@ --with=python3

override_dh_auto_clean:
	dh_auto_clean
	$(RM) debian/man/*.1
	$(RM) Makefile.conf

override_dh_auto_configure:
	printf '%s\n' \
	  'CONFIG := gcc' \
	  'ABCEXTERNAL=berkeley-abc' \
	  'ABCPULL=0' \
	  'STRIP=:' \
	  > Makefile.conf

override_dh_auto_install:
	dh_auto_install
	chmod a-x debian/tmp/usr/share/yosys/achronix/speedster22i/cells*.v

override_dh_installman:
	cd debian/man ; CHANGELOG_DATE="$(CHANGELOG_DATE)" ./genmanpages.sh
	dh_installman

override_dh_compress:
	dh_compress --exclude=.pdf

override_dh_auto_build-arch:
	dh_auto_build -- all

override_dh_auto_build-indep:
	sed -i 's/REPLACEWITHDATE/$(PDF_DATE2)/' manual/presentation.tex
	PDF_DATE=$(PDF_DATE) dh_auto_build -- all manual

override_dh_auto_test:
ifeq (big,$(shell dpkg-architecture -qDEB_TARGET_ARCH_ENDIAN))
	dh_auto_test && { \
	  echo 'Big-endian arches are considered "unusably broken" by upstream and tests are'; \
	  echo 'expected to be broken. Despite this the tests seem to have succeeded, is it time'; \
	  echo 'to revise this expectation?'; \
	  echo "See https://github.com/YosysHQ/yosys/issues/2645"; \
	  echo "Failing build artificially."; \
	  exit 1; \
	}
else
	dh_auto_test
endif