mirror of
https://github.com/Poltern/lfs-ru.git
synced 2024-10-18 11:50:21 +03:00
build: Add "make dist"
git-version: Always skip creating version.ent if LFS-RELEASE exists added .gitignore For creating a tarball without .git directory easier. The tarball will include version.ent and LFS-RELEASE files so the book rendered from it won't show "unknown" for all dates
This commit is contained in:
parent
b6ffaf1760
commit
458b3417be
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
lfs-bootscripts-*.tar.xz
|
||||||
|
lfs-*.tar.xz
|
||||||
|
conditional.ent
|
||||||
|
version.ent
|
||||||
|
appendices/*.script
|
||||||
|
*.swp
|
||||||
|
fop.log
|
31
Makefile
31
Makefile
@ -206,17 +206,26 @@ $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml \
|
|||||||
version:
|
version:
|
||||||
$(Q)./git-version.sh $(REV)
|
$(Q)./git-version.sh $(REV)
|
||||||
|
|
||||||
#dump-commands: validate
|
dump-commands: validate
|
||||||
# @echo "Dumping book commands..."
|
@echo "Dumping book commands..."
|
||||||
#
|
|
||||||
# $(Q)rm -rf $(DUMPDIR)
|
|
||||||
#
|
|
||||||
# $(Q)xsltproc --output $(DUMPDIR)/ \
|
|
||||||
# stylesheets/dump-commands.xsl \
|
|
||||||
# $(RENDERTMP)/lfs-full.xml
|
|
||||||
# @echo "Dumping book commands complete in $(DUMPDIR)"
|
|
||||||
|
|
||||||
all: book nochunks pdf # dump-commands
|
$(Q)rm -rf $(DUMPDIR)
|
||||||
|
|
||||||
.PHONY : all book dump-commands nochunks pdf profile-html tmpdir validate md5sums wget-list version
|
$(Q)xsltproc --output $(DUMPDIR)/ \
|
||||||
|
stylesheets/dump-commands.xsl \
|
||||||
|
$(RENDERTMP)/lfs-full.xml
|
||||||
|
@echo "Dumping book commands complete in $(DUMPDIR)"
|
||||||
|
|
||||||
|
all: book nochunks pdf dump-commands
|
||||||
|
|
||||||
|
dist:
|
||||||
|
$(Q)DIST=/tmp/LFS-RELEASE ./git-version.sh $(REV)
|
||||||
|
$(Q)rm -f lfs-$$(</tmp/LFS-RELEASE).tar.xz
|
||||||
|
$(Q)tar cJf lfs-$$(</tmp/LFS-RELEASE).tar.xz \
|
||||||
|
$(shell git ls-tree HEAD . --name-only) version.ent \
|
||||||
|
-C /tmp LFS-RELEASE \
|
||||||
|
--transform "s,^,lfs-$$(</tmp/LFS-RELEASE)/,"
|
||||||
|
$(Q)echo "Generated XML tarball lfs-$$(</tmp/LFS-RELEASE).tar.xz"
|
||||||
|
|
||||||
|
.PHONY : all book dump-commands nochunks pdf profile-html tmpdir validate md5sums wget-list version dist
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$1" = sysv ]; then
|
if [ "$1" = sysv ]; then
|
||||||
SYSV="INCLUDE"
|
SYSV="INCLUDE"
|
||||||
@ -14,6 +14,10 @@ fi
|
|||||||
echo "<!ENTITY % sysv \"$SYSV\">" > conditional.ent
|
echo "<!ENTITY % sysv \"$SYSV\">" > conditional.ent
|
||||||
echo "<!ENTITY % systemd \"$SYSTEMD\">" >> conditional.ent
|
echo "<!ENTITY % systemd \"$SYSTEMD\">" >> conditional.ent
|
||||||
|
|
||||||
|
if [ -e LFS-RELEASE ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if ! git status > /dev/null; then
|
if ! git status > /dev/null; then
|
||||||
# Either it's not a git repository, or git is unavaliable.
|
# Either it's not a git repository, or git is unavaliable.
|
||||||
# Just workaround.
|
# Just workaround.
|
||||||
@ -65,3 +69,5 @@ echo "<!ENTITY version \"$versiond\">" >> version.ent
|
|||||||
echo "]]>" >> version.ent
|
echo "]]>" >> version.ent
|
||||||
echo "<!ENTITY releasedate \"$full_date\">" >> version.ent
|
echo "<!ENTITY releasedate \"$full_date\">" >> version.ent
|
||||||
echo "<!ENTITY copyrightdate \"1999-$year\">" >> version.ent
|
echo "<!ENTITY copyrightdate \"1999-$year\">" >> version.ent
|
||||||
|
|
||||||
|
[ -z "$DIST" ] || echo $version > "$DIST"
|
||||||
|
Loading…
Reference in New Issue
Block a user