~ubuntu-branches/ubuntu/oneiric/rootskel-gtk/oneiric

« back to all changes in this revision

Viewing changes to Makefile.inc

  • Committer: Bazaar Package Importer
  • Author(s): Frans Pop
  • Date: 2005-11-07 15:35:07 UTC
  • Revision ID: james.westby@ubuntu.com-20051107153507-gugndtpokf551ecs
Tags: 0.04
Load mouse modules for powerpc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
outdir = $(DESTDIR)/$(dir)
 
2
 
 
3
define check_destdir
 
4
@if [ -z "$(DESTDIR)" ]; then \
 
5
  echo "You *must* give a DESTDIR!"; \
 
6
  exit 1; \
 
7
fi
 
8
endef
 
9
 
 
10
build: build-local build-recursive
 
11
 
 
12
build-local::
 
13
 
 
14
install: install-auto install-local install-recursive
 
15
 
 
16
install-auto: $(outdir) install-auto-dirs install-auto-files install-auto-files-exec
 
17
 
 
18
install-auto-dirs:
 
19
        $(call check_destdir)
 
20
        @list='$(subdirs_empty)'; for file in $$list; do \
 
21
          echo "install -d -m755 $(outdir)/$$file"; \
 
22
          install -d -m755 $(outdir)/$$file; \
 
23
        done
 
24
 
 
25
install-auto-files:
 
26
        $(call check_destdir)
 
27
        @list='$(files)'; for file in $$list; do \
 
28
          case $$file in \
 
29
            *:*) in=`echo "$$file" | sed 's,[^:]*:,,'` \
 
30
                 out=$(outdir)/`echo "$$file" | sed 's,:.*,,'`;; \
 
31
            *) in=$$file out=$(outdir);; \
 
32
          esac; \
 
33
          echo "install -m644 $$in $$out"; \
 
34
          install -m644 $$in $$out; \
 
35
        done
 
36
 
 
37
install-auto-files-exec:
 
38
        $(call check_destdir)
 
39
        @list='$(files_exec)'; for file in $$list; do \
 
40
          case $$file in \
 
41
            *:*) in=`echo "$$file" | sed 's,[^:]*:,,'` \
 
42
                 out=$(outdir)/`echo "$$file" | sed 's,:.*,,'`;; \
 
43
            *) in=$$file out=$(outdir);; \
 
44
          esac; \
 
45
          echo "install -m755 $$in $$out"; \
 
46
          install -m755 $$in $$out; \
 
47
        done
 
48
 
 
49
install-local::
 
50
 
 
51
clean: clean-local clean-recursive
 
52
 
 
53
clean-local::
 
54
 
 
55
build-recursive clean-recursive install-recursive:
 
56
        @target=`echo $@ | sed s/-recursive//`; \
 
57
        list='$(subdirs)'; \
 
58
        for subdir in $$list; do \
 
59
          echo "Making $$target in $$subdir"; \
 
60
          (cd $$subdir && $(MAKE) $$target) || exit 1; \
 
61
        done
 
62
 
 
63
$(outdir):
 
64
        install -d $(outdir)
 
65