| @@ -1,26 +1,26 @@ | | | @@ -1,26 +1,26 @@ |
1 | # $NetBSD: print-plist.mk,v 1.33 2017/06/14 16:23:09 prlw1 Exp $ | | 1 | # $NetBSD: print-plist.mk,v 1.34 2018/03/11 14:53:10 rillig Exp $ |
2 | | | 2 | # |
3 | ### | | 3 | # Automatic PLIST generation |
4 | ### Automatic PLIST generation | | 4 | # - files & symlinks first |
5 | ### - files & symlinks first | | 5 | # - empty directories are handled properly |
6 | ### - empty directories are handled properly | | 6 | # - dirs from mtree files are excluded |
7 | ### - dirs from mtree files are excluded | | 7 | # - substitute for platform or package specifics substrings |
8 | ### - substitute for platform or package specifics substrings | | 8 | # |
9 | ### | | 9 | # Usage: |
10 | ### Usage: | | 10 | # - make install |
11 | ### - make install | | 11 | # - make print-PLIST | brain >PLIST |
12 | ### - make print-PLIST | brain >PLIST | | 12 | # |
13 | ### | | 13 | # Keywords: plist print-plist |
14 | | | 14 | |
15 | _PRINT_PLIST_AWK_SUBST={ | | 15 | _PRINT_PLIST_AWK_SUBST={ |
16 | _PRINT_PLIST_AWK_SUBST+= \ | | 16 | _PRINT_PLIST_AWK_SUBST+= \ |
17 | gsub(/${PKGNAME_NOREV}/, "$${PKGNAME}"); \ | | 17 | gsub(/${PKGNAME_NOREV}/, "$${PKGNAME}"); \ |
18 | gsub(/${PKGVERSION:S/./\./g:C/nb[0-9]*$$//}/, "$${PKGVERSION}");\ | | 18 | gsub(/${PKGVERSION:S/./\./g:C/nb[0-9]*$$//}/, "$${PKGVERSION}");\ |
19 | gsub(/^${PKGLOCALEDIR}\/locale/, "share/locale"); \ | | 19 | gsub(/^${PKGLOCALEDIR}\/locale/, "share/locale"); \ |
20 | gsub("^${PKGGNUDIR:S/\/$$//}/", "gnu/"); \ | | 20 | gsub("^${PKGGNUDIR:S/\/$$//}/", "gnu/"); \ |
21 | gsub("^${PKGINFODIR}/", "info/"); \ | | 21 | gsub("^${PKGINFODIR}/", "info/"); \ |
22 | gsub("^${PKGMANDIR}/", "man/"); | | 22 | gsub("^${PKGMANDIR}/", "man/"); |
23 | | | 23 | |
24 | _PRINT_PLIST_AWK_SUBST+=} | | 24 | _PRINT_PLIST_AWK_SUBST+=} |
25 | | | 25 | |
26 | _PRINT_PLIST_AWK_IGNORE= ($$0 ~ /^${PKG_DBDIR:S|^${PREFIX}/||:S|/|\\/|g}\//) | | 26 | _PRINT_PLIST_AWK_IGNORE= ($$0 ~ /^${PKG_DBDIR:S|^${PREFIX}/||:S|/|\\/|g}\//) |