Changeset c858ba4e


Ignore:
Timestamp:
09/13/2023 06:10:38 AM (8 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, 12.1-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
48d8f5a
Parents:
a9dc972
git-author:
Xi Ruoyao <xry111@…> (09/13/2023 06:08:06 AM)
git-committer:
Xi Ruoyao <xry111@…> (09/13/2023 06:10:38 AM)
Message:

build: Add "make dist"

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.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    ra9dc972 rc858ba4e  
    11lfs-bootscripts-*.tar.xz
     2lfs-*.tar.xz
    23conditional.ent
    34version.ent
  • Makefile

    ra9dc972 rc858ba4e  
    210210all: book nochunks pdf dump-commands
    211211
    212 .PHONY : all book dump-commands nochunks pdf profile-html tmpdir validate md5sums wget-list version
    213 
     212dist:
     213        $(Q)DIST=/tmp/LFS-RELEASE ./git-version.sh $(REV)
     214        $(Q)rm -f lfs-$$(</tmp/LFS-RELEASE).tar.xz
     215        $(Q)tar cJf lfs-$$(</tmp/LFS-RELEASE).tar.xz \
     216                $(shell git ls-tree HEAD . --name-only) version.ent \
     217                -C /tmp LFS-RELEASE \
     218                --transform "s,^,lfs-$$(</tmp/LFS-RELEASE)/,"
     219        $(Q)echo "Generated XML tarball lfs-$$(</tmp/LFS-RELEASE).tar.xz"
     220
     221.PHONY : all book dump-commands nochunks pdf profile-html tmpdir validate md5sums wget-list version dist
     222
  • git-version.sh

    ra9dc972 rc858ba4e  
    1818    # Either it's not a git repository, or git is unavaliable.
    1919    # Just workaround.
     20
     21        if [ -e LFS-RELEASE ]; then
     22                exit 0
     23        fi
     24
    2025    echo "<![ %sysv; ["                                    >  version.ent
    2126    echo "<!ENTITY version           \"unknown\">"         >> version.ent
     
    6671echo "<!ENTITY releasedate       \"$full_date\">"          >> version.ent
    6772echo "<!ENTITY copyrightdate     \"1999-$year\">"          >> version.ent
     73
     74[ -z "$DIST" ] || echo $version > "$DIST"
Note: See TracChangeset for help on using the changeset viewer.