2 GITVERSION
=$(shell [ -d .git
] && git rev-list
--abbrev-commit
-n
1 HEAD |cut
-b
1-8)
5 datadir ?
= ${prefix}/share
6 pkglibdir ?
= ${datadir}/dracut
7 sysconfdir ?
= ${prefix}/etc
8 sbindir ?
= ${prefix}/sbin
9 mandir ?
= ${prefix}/share
/man
11 manpages
= dracut
.8 dracut.kernel
.7 dracut.conf
.5 dracut-catimages
.8 dracut-gencmdline
.8
13 .PHONY
: install clean archive rpm testimage
test all check AUTHORS
15 all: syncheck
$(manpages
) dracut.html
18 xsltproc
-o
$@
-nonet http
://docbook.sourceforge.net
/release
/xsl
/current
/manpages
/docbook.xsl
$<
20 dracut.html
: dracut.xml
$(manpages
)
21 xsltproc
-o dracut.html
--xinclude
-nonet \
22 --stringparam draft.mode yes \
23 --stringparam html.stylesheet http
://docs.redhat.com
/docs
/en-US
/Common_Content
/css
/default.css \
24 http
://docbook.sourceforge.net
/release
/xsl
/current
/xhtml
/docbook.xsl dracut.xml
27 mkdir
-p
$(DESTDIR
)$(pkglibdir
)
28 mkdir
-p
$(DESTDIR
)$(sbindir
)
29 mkdir
-p
$(DESTDIR
)$(sysconfdir
)
30 mkdir
-p
$(DESTDIR
)$(pkglibdir
)/modules.d
31 mkdir
-p
$(DESTDIR
)$(mandir)/man
{5,7,8}
32 install -m
0755 dracut
$(DESTDIR
)$(sbindir
)/dracut
33 install -m
0755 dracut-gencmdline
$(DESTDIR
)$(sbindir
)/dracut-gencmdline
34 install -m
0755 dracut-catimages
$(DESTDIR
)$(sbindir
)/dracut-catimages
35 install -m
0755 mkinitrd-dracut.sh
$(DESTDIR
)$(sbindir
)/mkinitrd
36 install -m
0755 lsinitrd
$(DESTDIR
)$(sbindir
)/lsinitrd
37 install -m
0644 dracut.conf
$(DESTDIR
)$(sysconfdir
)/dracut.conf
38 mkdir
-p
$(DESTDIR
)$(sysconfdir
)/dracut.conf.d
39 install -m
0755 dracut-functions
$(DESTDIR
)$(pkglibdir
)/dracut-functions
40 install -m
0755 dracut-logger
$(DESTDIR
)$(pkglibdir
)/dracut-logger
41 cp
-arx modules.d
$(DESTDIR
)$(pkglibdir
)
42 install -m
0644 dracut
.8 $(DESTDIR
)$(mandir)/man8
43 install -m
0644 dracut-catimages
.8 $(DESTDIR
)$(mandir)/man8
44 install -m
0644 dracut-gencmdline
.8 $(DESTDIR
)$(mandir)/man8
45 install -m
0644 dracut.conf
.5 $(DESTDIR
)$(mandir)/man5
46 install -m
0644 dracut.kernel
.7 $(DESTDIR
)$(mandir)/man7
53 $(RM
) dracut-
*.rpm dracut-
*.
tar.bz2
54 $(RM
) $(manpages
) dracut.html
57 archive
: dracut-
$(VERSION
)-$(GITVERSION
).
tar.bz2
59 dist: dracut-
$(VERSION
).
tar.gz
61 dracut-
$(VERSION
).
tar.bz2
:
62 git archive
--format
=tar $(VERSION
) --prefix=dracut-
$(VERSION
)/ |bzip2
> dracut-
$(VERSION
).
tar.bz2
64 dracut-
$(VERSION
).
tar.gz
:
65 git archive
--format
=tar $(VERSION
) --prefix=dracut-
$(VERSION
)/ |gzip
> dracut-
$(VERSION
).
tar.gz
67 dracut-
$(VERSION
)-$(GITVERSION
).
tar.bz2
:
68 git archive
--format
=tar HEAD
--prefix=dracut-
$(VERSION
)-$(GITVERSION
)/ |bzip2
> dracut-
$(VERSION
)-$(GITVERSION
).
tar.bz2
71 rpm
: clean dracut-
$(VERSION
).
tar.bz2
72 rpmbuild
--define "_topdir $$PWD" --define "_sourcedir $$PWD" --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" --define "_rpmdir $$PWD" -ba dracut.spec
73 rm -fr BUILD BUILDROOT
75 gitrpm
: dracut-
$(VERSION
)-$(GITVERSION
).
tar.bz2
76 echo
"%define gittag $(GITVERSION)" > dracut.spec.git
77 cat dracut.spec
>> dracut.spec.git
78 mv dracut.spec dracut.spec.bak
79 mv dracut.spec.git dracut.spec
80 rpmbuild
--define "_topdir $$PWD" --define "_sourcedir $$PWD" --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" --define "_rpmdir $$PWD" --define "gittag $(GITVERSION)" -ba dracut.spec ||
:
81 mv dracut.spec.bak dracut.spec
82 rm -fr BUILD BUILDROOT
85 @ret
=0;for i in dracut-logger modules.d
/99base
/init modules.d
/*/*.sh
; do \
86 [ "$${i##*/}" = "module-setup.sh" ] && continue
; \
87 [ "$${i##*/}" = "caps.sh" ] && continue
; \
88 dash
-n
"$$i" ; ret
=$$(($$ret+$$?
)); \
90 @ret
=0;for i in dracut modules.d
/02caps
/caps.sh modules.d
/*/module-setup.sh
; do \
91 bash
-n
"$$i" ; ret
=$$(($$ret+$$?
)); \
98 .
/dracut
-l
-a debug
-f test-
$(shell uname
-r
).img
$(shell uname
-r
)
99 @echo wrote test-
$(shell uname
-r
).img
102 .
/dracut
-l
-a debug
--kernel-only
-f test-kernel-
$(shell uname
-r
).img
$(shell uname
-r
)
103 @echo wrote test-
$(shell uname
-r
).img
104 .
/dracut
-l
-a debug
--no-kernel
-f test-dracut.img
$(shell uname
-r
)
105 @echo wrote test-dracut.img
108 .
/dracut
-H
-l
-a debug
-f test-
$(shell uname
-r
).img
$(shell uname
-r
)
109 @echo wrote test-
$(shell uname
-r
).img
112 git shortlog
--numbered
--summary
-e |while read a rest
; do echo
$$rest;done
> AUTHORS