File: rules

package info (click to toggle)
lfortran 0.59.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 56,736 kB
  • sloc: cpp: 168,052; f90: 74,272; python: 17,537; ansic: 7,705; yacc: 2,345; sh: 1,334; fortran: 895; makefile: 37; javascript: 15
file content (54 lines) | stat: -rwxr-xr-x 1,492 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
#!/usr/bin/make -f

export DH_VERBOSE=1

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
BUILDDIR=debian/build

# The magic debhelper  rule
%:
	dh $@ --builddirectory=$(BUILDDIR) --buildsystem=cmake

execute_before_dh_auto_clean:
	rm -fr $(BUILDDIR) version

# -DWITH_XEUS=yes for Jupyter kernel support
# not currently compiling ?

# _Unwind_GetIP missing on armhf
UNWIND:= $(if $(filter $(DEB_TARGET_ARCH), armhf hurd-i386 sparc64 powerpc alpha hppa loong64 ),no,yes  )

override_dh_auto_configure:
	echo $(DEB_VERSION_UPSTREAM) > version
	./build0.sh
	mkdir -p $(BUILDDIR)
	dh_auto_configure --  \
		-DCMAKE_BUILD_TYPE=Debug \
		-DWITH_UNWIND=$(UNWIND) \
		-DWITH_RUNTIME_STACKTRACE=$(UNWIND) \
		-DWITH_STACKTRACE=$(UNWIND) \
		-DWITH_LLVM=$(UNWIND) \
		-DWITH_DWARFDUMP=yes  \
		-DWITH_JSON=yes \
		-DWITH_LSP=yes \
		-DWITH_FMT=yes \
		-DWITH_BFD=yes	\
		-DLLVM_DIR=/usr/lib/llvm-21/cmake \
		-DWITH_KOKKOS=yes \
		-DCMAKE_Fortran_MODULE_DIRECTORY=/usr/lib/$(DEB_HOST_MULTIARCH)/fortran/lfortran-mod-0


override_dh_gencontrol:
	dh_gencontrol -- -VBuilt-Using="`dpkg-query -f'$${source:Package} (= $${source:Version}), ' -W binutils-dev libiberty-dev`"

ifneq (,$(filter $(DEB_BUILD_ARCH),loong64 hurd-i386 hurd-amd64 sh4 x32 m68k ))
override_dh_installman:
	@echo "Not installing man pages; pandoc missing"
endif

override_dh_auto_test:
	@echo Bypass tests on this build

override_dh_dwz:
	@echo "DWZ fails on .debug_attr sections in some archs; don't use"