mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

gnu-make:oldbootstrap (2608B)


      1 #!/usr/bin/env pthbs-build
      2 #@pragma:nosandbox
      3 #@pragma:nopath
      4 #+{{pkg_install_name("musl-cross-make:oldbootstrap-1")}}
      5 #@untar:-z:sha256:dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3:.
      6 
      7 
      8 # - build script start -
      9 
     10 autotools_config() {
     11 	prefix={{versions}}/$pthbs_package
     12 	./configure -C \
     13 		--prefix="$prefix" \
     14 		--bindir="$prefix/command" \
     15 		--sbindir="$prefix/command" \
     16 		--infodir="$prefix/info" \
     17 		--localedir="$prefix/locale" \
     18 		--mandir="$prefix/man" \
     19 		--libdir="$prefix/library" \
     20 		--docdir="$prefix/doc/gnu-make" \
     21 		--datadir="$prefix/data" \
     22 		--datarootdir="$prefix/data" \
     23 		--localstatedir='/var/pthbs' \
     24 		"$@"
     25 
     26 }
     27 
     28 prefix={{versions}}/$pthbs_package
     29 dest=${pthbs_destdir%/}${prefix}
     30 cd 'make-4.4.1'
     31 
     32 
     33 mcm={{versions}}/{{pkg_install_name("musl-cross-make:oldbootstrap-1")}}
     34 
     35 export PATH="$mcm/command:$PATH"
     36 export CC="$mcm/command/{{triplet}}-gcc"
     37 export CXX="$mcm/command/{{triplet}}-g++"
     38 export CFLAGS="-D_GNU_SOURCE"
     39 export LDFLAGS="-static"
     40 
     41 autotools_config --disable-nls
     42 
     43 
     44 make -j${JOBS:-1} -l$((1+${JOBS:-1}))
     45 
     46 make DESTDIR="$pthbs_destdir" install
     47 
     48 
     49 
     50 
     51 
     52 cd "$pthbs_destdir{{versions}}/$pthbs_package"
     53 find -type d -o -print | awk -F/ '
     54 BEGIN {
     55 	x["./command/make"]=1
     56 	x["./man/man1/make.1"]=1
     57 }
     58 
     59 function r1(s) {
     60 	sub("^[.]/[^/]*", ".", s)
     61 	return s
     62 }
     63 function s1(repl, s) {
     64 	sub("^[.]/[^/]*", "./"repl, s)
     65 	return s
     66 }
     67 function link(src) {
     68 	x[$0]=0
     69 	printf "%s\t%s\n", $0, src
     70 	printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
     71 }
     72 $1!="."{exit 1}
     73 
     74 
     75 $2 == "config" { link($0); next }
     76 $2 == "keys" { link($0); next }
     77 $2 == "zsh" { link($0); next }
     78 $2 == "env" { link($0); next }
     79 $2 == "command" { link($0); next }
     80 $2 == "bin" { link(s1("command", $0)); next }
     81 
     82 $2 == "library.so" { link($0); next }
     83 $2 == "library" { link($0); next }
     84 $2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
     85 $2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next }
     86 
     87 $2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
     88 
     89 $2 == "man" { link($0); next }
     90 $2 == "info" { link($0); next }
     91 $2 == "doc" { link($0); next }
     92 $2 == "icons" { link($0); next }
     93 $2 == "terminfo" { link($0); next }
     94 $2 == "data" { link($0); next }
     95 $2 == "include" { link($0); next }
     96 
     97 { printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
     98 
     99 END {
    100 	for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
    101 	for(fname in x) {
    102 		if(x[fname]) {
    103 			printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
    104 			exit 3
    105 		}
    106 	}
    107 }' >.install-links.new
    108 mv .install-links.new .install-links
    109 
    110 {# extra line for matching hash #}