kernel/iscsi: Do not conditionalize on undefined names.
[dragonfly.git] / etc / Makefile.usr
1 # Makefile.usr - installed as /usr/Makefile
2 #
3 # Provides simple targets to download and maintain /usr/src, /usr/pkgsrc etc.
4
5 GITHOST?=git.dragonflybsd.org
6
7 help all:
8         @echo "HELP:"
9         @echo ""
10 .if exists(${.CURDIR}/pkgsrc/.git)
11 .if exists(${.CURDIR}/pkgsrc/Makefile)
12         @echo "    make pkgsrc-update          - update your pkgsrc repo from the net"
13 .else
14         @echo "    make pkgsrc-checkout        - initial checkout of your pre-packaged"
15         @echo "                                  pkgsrc repo."
16         @echo "    make pkgsrc-update          - update your pkgsrc repo from the net"
17         @echo "                                  after the initial checkout."
18 .endif
19 .else
20         @echo "    make pkgsrc-create          - fetch initial pkgsrc repo from the net"
21         @echo "    make pkgsrc-create-shallow  - fetch initial history-free pkgsrc repo"
22         @echo "    make pkgsrc-create-repo     - fetch pkgsrc repo only, no checkout"
23         @echo "    make pkgsrc-update          - update your pkgsrc repo from the net"
24 .endif
25         @echo ""
26 .if exists(${.CURDIR}/src/.git)
27 .if exists(${.CURDIR}/src/Makefile)
28         @echo "    make src-update             - update your src repo from the net"
29 .else
30         @echo "    make src-checkout           - initial checkout of your pre-packaged src repo"
31         @echo "    make src-update             - update your src repo from the net"
32         @echo "                                  after the initial checkout."
33 .endif
34 .else
35         @echo "    make src-create             - fetch initial src repo from the net"
36         @echo "    make src-create-shallow     - fetch initial history-free src repo"
37         @echo "    make src-create-repo        - fetch src repo only, no checkout"
38         @echo "    make src-update             - update your src repo from the net"
39 .endif
40         @echo ""
41 .if exists(${.CURDIR}/src-sys.tar.bz2)
42         @echo "    make release-sys-extract - extract the pre-packaged sys-only sources"
43 .endif
44         @echo ""
45         @echo "If automating please feel free to run git pull's from cron."
46         @echo "We prefer once a day but you can run them more often if you"
47         @echo "desire."
48         @echo ""
49         @echo "If you have a repo previously maintained via CVS you should"
50         @echo "rm -rf it (save any local modifications) and then use the"
51         @echo "make src-create and/or make pkgsrc-create to set up the initial"
52         @echo "git repo."
53
54 pkgsrc-create-repo:
55         @echo "If problems occur you may have to rm -rf pkgsrc and try again."
56         @echo ""
57         mkdir -p ${.CURDIR}/pkgsrc
58         cd ${.CURDIR}/pkgsrc && git init
59         cd ${.CURDIR}/pkgsrc && \
60                 git remote add origin git://${GITHOST}/pkgsrcv2.git
61         cd ${.CURDIR}/pkgsrc && git fetch origin
62         cd ${.CURDIR}/pkgsrc && git branch master origin/master
63
64 pkgsrc-create: pkgsrc-create-repo
65         cd ${.CURDIR}/pkgsrc && git checkout master
66         cd ${.CURDIR}/pkgsrc && git pull
67
68 pkgsrc-create-shallow:
69         @echo "If problems occur you may have to rm -rf pkgsrc and try again."
70         @echo ""
71         mkdir -p ${.CURDIR}/pkgsrc
72         cd ${.CURDIR}/pkgsrc && git init
73         cd ${.CURDIR}/pkgsrc && \
74                 git remote add origin git://${GITHOST}/pkgsrcv2.git
75         cd ${.CURDIR}/pkgsrc && git fetch --depth=1 origin
76         cd ${.CURDIR}/pkgsrc && git branch master origin/master
77         cd ${.CURDIR}/pkgsrc && git checkout master
78         cd ${.CURDIR}/pkgsrc && git pull
79
80 pkgsrc-checkout:
81         cd ${.CURDIR}/pkgsrc && git checkout master
82
83 pkgsrc-update:
84         cd ${.CURDIR}/pkgsrc && git pull
85
86 src-create-repo:
87         @echo "If problems occur you may have to rm -rf src and try again."
88         @echo ""
89         mkdir -p ${.CURDIR}/src
90         cd ${.CURDIR}/src && git init
91         cd ${.CURDIR}/src && \
92                 git remote add origin git://${GITHOST}/dragonfly.git
93         cd ${.CURDIR}/src && git fetch origin
94         cd ${.CURDIR}/src && git branch master origin/master
95
96 src-create: src-create-repo
97         cd ${.CURDIR}/src && git checkout master
98         cd ${.CURDIR}/src && git pull
99
100 src-create-shallow:
101         @echo "If problems occur you may have to rm -rf src and try again."
102         @echo ""
103         mkdir -p ${.CURDIR}/src
104         cd ${.CURDIR}/src && git init
105         cd ${.CURDIR}/src && \
106             git remote add origin git://${GITHOST}/dragonfly.git
107         cd ${.CURDIR}/src && git fetch --depth=1 origin
108         cd ${.CURDIR}/src && git branch master origin/master
109         cd ${.CURDIR}/src && git checkout master
110         cd ${.CURDIR}/src && git pull
111
112 src-checkout:
113         cd ${.CURDIR}/src && git checkout master
114
115 src-update:
116         cd ${.CURDIR}/src && git pull
117
118 release-sys-extract:
119         cd ${.CURDIR} && tar xvpjf src-sys.tar.bz2
120