#!/usr/bin/make -f include ../source.mk tables = \ africa \ antarctica \ asia \ australasia \ europe \ northamerica \ southamerica \ etcetera \ backward \ factory nop: @: build: for t in $(tables); do \ /usr/sbin/zic -d dest/usr/share/zoneinfo \ -L /dev/null -y yearistype.sh \ src/$${t} || exit $?; \ done /usr/sbin/zic -d dest/usr/share/zoneinfo -p America/New_York touch $@ install: build cp src/iso3166.tab src/zone.tab dest/usr/share/zoneinfo (cd src && grep '^Link' $(tables)) | while read type dest src etc; do \ rm -f "dest/usr/share/zoneinfo/$${src}"; \ link="$${src}" up=''; \ while [ "$${link#*/}" != "$${link}" ] && \ [ "$${link%%/*}" = "$${dest%%/*}" ]; do \ link="$${link#*/}"; \ dest="$${dest#*/}"; \ done; \ while [ "$${link#*/}" != "$${link}" ]; do \ link="$${link#*/}"; \ up="../$${up}"; \ done; \ ln -sf "$${up}$${dest}" \ "dest/usr/share/zoneinfo/$${src}"; \ done for t in $(tables); do \ exec 3>../tzdata-$${t}.pkg/files; \ grep '^Zone' src/$${t} | while read type zone etc; do \ printf '/usr/share/zoneinfo/%s\n' "$${zone}" >&3; \ done; \ grep '^Link' src/$${t} | while read type link zone etc; do \ printf '/usr/share/zoneinfo/%s\n' "$${zone}" >&3; \ done; \ exec 3>&-; \ done ln -sf . dest/usr/share/zoneinfo/posix oh-fixperms oh-installfiles for t in $(tables); do \ rm -f ../tzdata-$${t}.pkg/files; \ done