summaryrefslogtreecommitdiffstats
path: root/fpga/xilinx/programmer/bit2svf/debian/rules
blob: 53d36e89c553e99e257ed482bb5fb7736619f93f (plain)
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#! /usr/bin/make -f
# Generated automatically from debian/packages
# by yada v0.9, of Tue, 07 Dec 1999

buildarch := $(shell dpkg --print-architecture)

ifneq "$(buildarch)" "i386"
buildarch := any
endif

.PHONY: default
default:
	@echo "Specify a target:"; \
	echo " build              compile the package"; \
	echo " binary             make all binary packages"; \
	echo " binary-arch        make all architecture-dependent binary packages"; \
	echo " binary-indep       make all architecture-independent binary packages"; \
	echo " clean              clean up the source package"; \
	echo; \
	echo " install-tree       compile the package and create the install trees"; \
	echo " clean-install-tree clean up only under debian/"; \
	echo

# Build the package and prepare the install tree

.PHONY: build-only build
build-only: debian/build-stamp
build: build-only

# Make sure these rules and the control file are up-to-date

.PHONY: rules control
rules: debian/rules
debian/rules: debian/yada debian/packages
	chmod +x debian/yada
	debian/yada rebuild rules

control: debian/control
debian/control: debian/yada debian/packages
	chmod +x debian/yada
	debian/yada rebuild control

debian/build-stamp:
	@[ -f debian/yada -a -f debian/rules ]
	@umask 022 && (\
	echo -E 'eval "yada () { perl $$(pwd)/debian/yada \"\$$@\"; }"; set -e; set -v';\
	echo -E 'echo "Hecho!"') | /bin/sh
	touch debian/build-stamp

.PHONY: install-tree
install-tree: install-tree-$(buildarch)
install-tree-i386: \
	debian/tmp-bit2svf/DEBIAN/control
install-tree-any:

debian/tmp-bit2svf/DEBIAN/control: debian/build-stamp debian/control
	rm -rf debian/tmp-bit2svf
	umask 022 && install -d debian/tmp-bit2svf/DEBIAN
	chmod +x debian/yada
	install -d debian/tmp-bit2svf/usr/share/doc/bit2svf
	umask 022; debian/yada generate copyright \
	                       >debian/tmp-bit2svf/usr/share/doc/bit2svf/copyright
	install -m 644 -p debian/changelog \
	                  debian/tmp-bit2svf/usr/share/doc/bit2svf/changelog
	@umask 022 && export PACKAGE="bit2svf" \
	    && export ROOT="$$(pwd)/debian/tmp-bit2svf" \
	    && export CONTROL="$$(pwd)/debian/tmp-bit2svf/DEBIAN" && (\
	echo -E 'eval "yada () { perl $$(pwd)/debian/yada \"\$$@\"; }"; set -e; set -v';\
	echo -E 'yada install -bin bit2svf';\
	echo -E 'yada install -bin dumpbit';\
	echo -E 'yada install -bin -unstripped jbit';\
	echo -E 'yada install -into /usr/share/bit2svf/ templates/*.svft';\
	echo -E 'yada install -into /usr/share/bit2svf/ templates/DEVICES';\
	echo -E 'yada install -doc README.es';\
	echo -E 'yada install -doc README.en';\
	echo -E 'yada install -doc -subdir templates templates/README.es';\
	echo -E 'yada install -doc -subdir templates templates/README.en') | /bin/sh
	debian/yada compress bit2svf
	find debian/tmp-bit2svf -type f -print \
	  | sed -n 's/^debian\/tmp-bit2svf\(\/etc\/.*\)$$/\1/p' \
	    > debian/tmp-bit2svf/DEBIAN/conffiles
	if test ! -s debian/tmp-bit2svf/DEBIAN/conffiles; then rm -f debian/tmp-bit2svf/DEBIAN/conffiles; fi
	debian/yada generate maintscripts bit2svf
	umask 022 && dpkg-gencontrol -isp -pbit2svf -Pdebian/tmp-bit2svf

# Build package files

.PHONY: binary binary-arch binary-indep
binary: binary-arch binary-indep
binary-arch: binary-arch-$(buildarch)

.PHONY: binary-arch-i386
binary-arch-i386: \
	binary-package-bit2svf
.PHONY: binary-arch-any
binary-arch-any:
binary-indep:

.PHONY: binary-package-bit2svf
binary-package-bit2svf: check-root debian/tmp-bit2svf/DEBIAN/control
	@[ -f debian/yada -a -f debian/rules ]
	chown -R 0.0 debian/tmp-bit2svf
	chmod -R u=rwX,go=rX debian/tmp-bit2svf
	@if [ -d debian/tmp-bit2svf/usr/doc/bit2svf ]; then \
	  echo "*** Yada warning: /usr/doc/bit2svf should be /usr/share/doc/bit2svf";\
	fi
	dpkg-deb --build debian/tmp-bit2svf ..

.PHONY: check-root
check-root:
	@[ `id -u` = 0 ] || (echo "You must be root to do this!"; false)

# Clean up afterwards

.PHONY: clean clean-install-tree clean-build
clean: clean-install-tree clean-build debian/control debian/rules

clean-build:
	@[ -f debian/yada -a -f debian/rules ]
	rm -f debian/build-stamp debian/depends-stamp
	@umask 022 && (\
	echo -E 'eval "yada () { perl $$(pwd)/debian/yada \"\$$@\"; }"; set -e; set -v';\
	echo -E 'echo "Nada para borrar!"') | /bin/sh

clean-install-tree: debian/rules
	@[ -f debian/yada -a -f debian/rules ]
	rm -f debian/install-tree-stamp
	rm -rf debian/tmp* debian/files* debian/substvars