File: rules

package info (click to toggle)
inform6-compiler 6.42-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,712 kB
  • sloc: ansic: 30,343; makefile: 58; sh: 48
file content (83 lines) | stat: -rwxr-xr-x 2,220 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#! /usr/bin/make -f
#
# debian/rules
# Part of Debian ‘inform6-compiler’ package.
#
# This is free software, and you are welcome to redistribute it under
# certain conditions; see the end of this file for copyright
# information, grant of license, and disclaimer of warranty.

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

package_resources_dir = /usr/share/inform6
inform_library = ${package_resources_dir}/library
inform_modules = ${package_resources_dir}/modules

export CFLAGS
CFLAGS += -DInclude_Directory="\"${inform_library}\""
CFLAGS += -DModule_Directory="\"${inform_modules}\""
CFLAGS += -O2

ifeq ($(dpkg-architecture --query DEB_HOST_ARCH_BITS),64)
# From ‘header.h’: “for Unix under gcc”
	CFLAGS += -DUNIX
else
# From ‘header.h’: “for 64-bit Unix under gcc”
	CFLAGS += -DUNIX64
endif  # DEB_HOST_ARCH_BITS

TEXT_SUFFIX = .txt
MARKDOWN_SUFFIX = .md
readme_document_name = README
readme_document_source = $(addsuffix ${MARKDOWN_SUFFIX}, \
	${readme_document_name})
readme_document = $(addsuffix ${TEXT_SUFFIX}, \
	${readme_document_name})
GENERATED_FILES += ${readme_document}

MAKEFILE = ${CURDIR}/Makefile
GENERATED_FILES += ${MAKEFILE}

PANDOC = pandoc

%:
	dh $@


.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	dh_auto_clean
	$(RM) ${GENERATED_FILES}

.PHONY: override_dh_auto_build
override_dh_auto_build:
	cp ${CURDIR}/debian/Makefile.upstream ${MAKEFILE}
	dh_auto_build

.PHONY: override_dh_installchangelogs
override_dh_installchangelogs:
	dh_installchangelogs ReleaseNotes.html

%${TEXT_SUFFIX}: %${MARKDOWN_SUFFIX}
	$(PANDOC) --from markdown --to plain $^ > $@

override_dh_installdocs: ${readme_document}
	dh_installdocs


# Copyright © 2009–2025 Ben Finney <bignose@debian.org>
#
# This is free software; you may copy, modify, and/or distribute this
# work under the terms of the GNU General Public License as published
# by the Free Software Foundation; version 3 of that License or later.
# No warranty expressed or implied.
# See the file '/usr/share/common-licenses/GPL-3' for details.


# Local variables:
# mode: makefile
# coding: utf-8
# End:
# vim: filetype=make fileencoding=utf-8 :