File: rules

package info (click to toggle)
intel2gas 1.3.3-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 460 kB
  • ctags: 128
  • sloc: cpp: 1,286; makefile: 71
file content (46 lines) | stat: -rwxr-xr-x 1,656 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
#!/usr/bin/make -f
DOCDIR=debian/tmp/usr/share/doc/intel2gas

build:
	if [ ! -f debian/rules ]; then echo "wrong dir!"; exit 1; fi
	./configure --prefix=/usr
	$(MAKE) CFLAGS="-O2 -g -Wall"
	touch build

clean:
	if [ ! -f debian/rules ]; then echo "wrong dir!"; exit 1; fi
	-rm -f build
	-$(MAKE) distclean
	-rm -rf debian/tmp debian/files* debian/substvars

binary-indep: build
	if [ ! -f debian/rules ]; then echo "wrong dir!"; exit 1; fi
	if [ ! $$UID = 0 ]; then echo "not root!"; exit 1; fi

binary-arch: build
	if [ ! -f debian/rules ]; then echo "wrong dir!"; exit 1; fi
	if [ ! $$UID = 0 ]; then echo "not root!"; exit 1; fi
	-rm -rf debian/tmp
	install -d -m 755 -o root -g root debian/tmp debian/tmp/DEBIAN \
	$(DOCDIR) debian/tmp/usr/share/man/man1
	$(MAKE) install prefix=debian/tmp/usr	
# fix weird permissions inherited from upstream...
	chmod -R 0644 debian/tmp/usr/share/intel2gas/{i2g,g2i,m2g}/*
	install -p -o root -g root -m 644 debian/copyright README BUGS \
	DATAFILES TODO THANKS $(DOCDIR)
	install -p -o root -g root -m 644 debian/changelog \
	$(DOCDIR)/changelog.Debian
	install -p -o root -g root -m 644 ChangeLog $(DOCDIR)/changelog
# there is no proper manpage for intel2gas...i'll do a minimal one
	install -p -o root -g root -m 644 debian/intel2gas.man debian/tmp/usr/share/man/man1/intel2gas.1
	gzip -9 debian/tmp/usr/share/man/man1/intel2gas.1
# fixme: changelog and changelog.debian??
# those two are bigger than 4k...
	gzip -9 $(DOCDIR)/{DATAFILES,README,changelog*}
	dpkg-shlibdeps intel2gas
	dpkg-gencontrol -isp
	dpkg --build debian/tmp ..

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean