File: rules

package info (click to toggle)
lfortran 0.58.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,512 kB
  • sloc: cpp: 162,179; f90: 68,251; python: 17,476; ansic: 6,278; yacc: 2,334; sh: 1,317; fortran: 892; makefile: 33; javascript: 15
file content (49 lines) | stat: -rwxr-xr-x 1,345 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
#!/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 ),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-$(DEB_VERSION_UPSTREAM)


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

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"