~ubuntu-branches/ubuntu/trusty/apt/trusty

« back to all changes in this revision

Viewing changes to vendor/makefile

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-04-01 17:48:58 UTC
  • mfrom: (1.4.87 sid)
  • Revision ID: package-import@ubuntu.com-20140401174858-4mv29mm29zu22fn1
Tags: 1.0.1ubuntu1
merge with the debian/sid 1.0.1 version
(LP: #1302033)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
dirs: dirs/subdirs
15
15
manpages: manpages/subdirs
16
16
 
17
 
all/subdirs binary/subdirs doc/subdirs dirs/subdirs manpages/subdirs:
18
 
        $(MAKE) -C current $(patsubst %/subdirs,%,$@)
19
 
 
20
 
clean/subdirs veryclean/subdirs:
21
 
        test ! -e current || $(MAKE) -C current $(patsubst %/subdirs,%,$@)
 
17
all/subdirs binary/subdirs doc/subdirs dirs/subdirs manpages/subdirs clean/subdirs veryclean/subdirs:
 
18
        test ! -e current/makefile || $(MAKE) -C current $(patsubst %/subdirs,%,$@)
 
19
        test ! -e current/makefile.auto || $(MAKE) -C current -f makefile.auto $(patsubst %/subdirs,%,$@)
22
20
 
23
21
current:
24
22
        rm -f $@
29
27
                        break; \
30
28
                fi; \
31
29
        done
32
 
        # if we haven't found a specific, look for a deriving in hardcoded order
33
 
        test -e $@ || \
34
 
                (dpkg-vendor --derives-from ubuntu && cp ln -s ubuntu $@ ) || \
35
 
                (dpkg-vendor --derives-from tanglu && cp ln -s tanglu $@ ) || \
36
 
                ln -s debian $@
 
30
        # if we haven't found a specific, look for a deriving
 
31
        # we do ubuntu and debian last as those are the biggest families
 
32
        # and would therefore potentially 'shadow' smaller families
 
33
        # (especially debian as it sorts quiet early)
 
34
        if ! test -e $@; then \
 
35
                find -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2 | while read DISTRO; do \
 
36
                        if [ "$$DISTRO" = 'debian' -o "$$DISTRO" = 'ubuntu' ]; then continue; fi; \
 
37
                        if dpkg-vendor --derives-from $$DISTRO; then \
 
38
                                ln -s $$DISTRO $@; \
 
39
                                break; \
 
40
                        fi; \
 
41
                done; \
 
42
                test -e $@ || \
 
43
                        (dpkg-vendor --derives-from ubuntu && cp ln -s ubuntu $@ ) || \
 
44
                        ln -s debian $@; \
 
45
        fi
 
46
        if test ! -e current/makefile; then \
 
47
                sed "s#@@VENDOR@@#$(notdir $(shell readlink -f current))#" vendor.makefile > current/makefile.auto; \
 
48
        fi
37
49
 
38
50
.PHONY: clean veryclean all binary vendor
39
 
.NOPARALLEL:
40
51
 
41
52
clean: clean/current
42
53
 
43
 
clean/current:
44
 
        test ! -e current || $(MAKE) -C current clean
45
 
        rm -f current
 
54
clean/current: clean/subdirs
 
55
        rm -f current/makefile.auto current