~ubuntu-branches/ubuntu/hardy/silo/hardy-updates

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Fabio M. Di Nitto
  • Date: 2007-10-25 09:28:08 UTC
  • mfrom: (15.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071025092808-1yhj12t7s4zqsfu5
Tags: 1.4.13a+git20070930-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build with -fno-stack-protector.
  - Change silo.postinst to automatically update the boot block without
    invoking siloconfig and keep asking questions on upgrades.
  - Convert silo.conf to use /dev/disk/by-uuid.
  - Ubuntu maintainer foobar.
  - Fix debian/rules call to dh_installdocs.
  - Drop the requirement of gcc-4.1 and start using default gcc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include Rules.make
 
2
 
 
3
 
 
4
# These only get built on Linux
 
5
ifeq ($(OPSYS),Linux)
 
6
  SUBDIRS  = common first second first-isofs tilo
 
7
  MANPAGES = maketilo.1 tilo.1
 
8
endif
 
9
 
 
10
# These get built on Linux and Solaris
 
11
MANPAGES += silo.8 silo.conf.5
 
12
SUBDIRS  += silo
 
13
 
 
14
all dep depend clean:
 
15
        @for I in $(SUBDIRS); do $(MAKE) -C $$I $@ || exit 1; done
 
16
 
 
17
ifeq ($(OPSYS),$(findstring $(OPSYS),Linux Solaris))
 
18
install:
 
19
        install -d -m755 $(DESTDIR)/etc $(DESTDIR)/sbin $(DESTDIR)/usr/sbin
 
20
        install -m755 silo/silo $(DESTDIR)/sbin
 
21
        install -m755 silo/silocheck $(DESTDIR)/usr/sbin
 
22
        [ -f $(DESTDIR)/etc/silo.conf ] || \
 
23
                install -m644 etc/silo.conf $(DESTDIR)/etc/
 
24
ifeq ($(OPSYS),Linux)
 
25
        install -d -m755 $(DESTDIR)/boot $(DESTDIR)/usr/bin
 
26
        install -m644 first/*.b second/*.b first-isofs/*.b $(DESTDIR)/boot/
 
27
        install -m755 tilo/maketilo $(DESTDIR)/usr/bin/
 
28
        install -m755 tilo/tilo.sh $(DESTDIR)/usr/bin/tilo
 
29
endif
 
30
        for manpage in $(MANPAGES); do \
 
31
                sect=`echo $$manpage | sed 's/.*\([1-8]\)$$/\1/'`; \
 
32
                install -d -m755 $(DESTDIR)/usr/share/man/man$$sect; \
 
33
                install -m644 man/$$manpage $(DESTDIR)/usr/share/man/man$$sect/; \
 
34
        done
 
35
        if test x"$(DESTDIR)" = x; then \
 
36
                echo "You need to run 'silo -f' now, to update the boot block" 1>&2; \
 
37
        fi
 
38
else
 
39
install:
 
40
        @echo SILO is only supported on SPARC Linux and Solaris.
 
41
endif
 
42
 
 
43
tag:
 
44
        svn copy -m "Tag $(VERSION)" svn://svn.sparc-boot.org/silo/trunk \
 
45
                svn://svn.sparc-boot.org/silo/tags/v$(VERSION)
 
46
 
 
47
# This is just for me to make release tarballs
 
48
release: ../silo-loaders-$(VERSION).tar.gz ../silo-$(VERSION).tar.gz ../silo-$(VERSION).tar.bz2
 
49
        rm -rf ../silo-$(VERSION) boot
 
50
 
 
51
../silo-loaders-$(VERSION).tar%:
 
52
        rm -rf ../silo-$(VERSION)
 
53
        svn export svn://svn.sparc-boot.org/silo/tags/v$(VERSION) \
 
54
                ../silo-$(VERSION)
 
55
        install -d ../silo-$(VERSION)/boot
 
56
        for I in first first-isofs second; do $(MAKE) -C ../silo-$(VERSION)/$$I all || exit 1; done;
 
57
        install -d ../silo-$(VERSION)/boot
 
58
        (cd ../silo-$(VERSION); install -m644 first/*.b first-isofs/*.b second/*.b boot/)
 
59
        (cd ../silo-$(VERSION); \
 
60
                case "$*" in .gz) foo="gzip -c9";; .bz2) foo="bzip2 -c9";; *) foo=cat;; esac; \
 
61
                tar cf - boot | $$foo > $@; \
 
62
        )
 
63
        rm -rf ../silo-$(VERSION)
 
64
 
 
65
../silo-$(VERSION).tar%: clean
 
66
        rm -rf ../silo-$(VERSION)
 
67
        svn export svn://svn.sparc-boot.org/silo/tags/v$(VERSION) \
 
68
                ../silo-$(VERSION)
 
69
        case "$*" in .gz) foo="gzip -c9";; .bz2) foo="bzip2 -c9";; *) foo=cat;; esac; \
 
70
                (cd ../ && tar cf - silo-$(VERSION)) | $$foo > $@
 
71
        rm -rf ../silo-$(VERSION)