/* * tardy - a tar post-processor * Copyright (C) 1998-2002, 2004 Peter Miller; * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * * MANIFEST: instructions to cook(1), how to build archive set */ /* * some earlier versions of groff don't grok the -c (compatibility) option, * but the ones that do, also grok this environment variable. */ setenv GROFF_NO_SGR = -c; version_shorter = [split "." [version_short]] _ _; version_shorter = [unsplit "." [wordlist 1 2 [version_shorter]]]; project_short = [fromto %.[version_short] % [project]]; project_minus = [project_short]-[version_short]; /* * Integration builds also make the shar files for distribution. */ if [not [defined baseline]] then all = [all] integration-build-targets; integration-build-targets: [integration-build-targets]; integration-build-targets = archive/[project_minus].tar.gz archive/[project_minus].spec archive/[project_minus].README archive/[project_minus].lsm archive/[project_short].gif [fromto web.src/%0%.roff archive/%0%.html [match_mask web.src/%0%.roff [source_files]] ] archive/changelog.txt ; /* * These recipes build a Makefile for a user. They do not build a * Makefile useful for a development build, because no arch * information is included in the Makefile. */ makefile-per-file = [prepost "" ",M" [source_files]]; Makefile.in: etc/Makefile.head etc/Makefile.sh etc/Makefile.awk [vs_file] [makefile-per-file] { cat [resolve etc/Makefile.head [makefile-per-file]] > [target]; sh [resolve etc/Makefile.sh] [source_files] | [awk] -f [resolve etc/Makefile.awk] >> [target]; } %0%,M: etc/Makefi.file.sh etc/Makefile.awk { sh [resolve etc/Makefi.file.sh] %0% [resolve %0%] ['if' [in %0%,Md [need]] 'then' [resolve %0%,Md]] | [awk] -f [resolve etc/Makefile.awk] > [target]; } changes_file = etc/CHANGES.[version_short]; source_file_order = README [sort [stringset [changes_file] [source_files] [project_short].spec BUILDING Makefile.in MANIFEST common/config.h.in common/patchlevel.h configure etc/version.so install-sh /* debian/changelog */ - README ] ]; archive/Part01.gz: [source_file_order] set shallow { parts = [glob "archive/Part*"]; if [parts] then rm [parts] set clearstat; /* assumes shar.3.49 available */ shar -n[project] -a -c -oarchive/Part -L50 [resolve [source_file_order]]; gzip -9 -v archive/Part*; } archive/[project_minus].tar.gz: [source_file_order] [arch]/bin/tardy set shallow { if [exists archive/[project_minus].tar] then rm archive/[project_minus].tar set clearstat; tar cf - [resolve [source_file_order]] | [arch]/bin/tardy -una Peter -gna Miller -unu 0 -gnu 0 [prepost "-rp=" "" [search_list]] -p [project_minus] -ms 0644 -mc 07022 -now > archive/[project_minus].tar; gzip -9 -v archive/[project_minus].tar; } patch_files = [fromto %0% %0%,P [source_files] etc/CHANGES.[version_short]]; patch_files = [vs_file],P [stringset [patch_files] - [vs_file],P]; archive/[project_minus].patch.gz: [patch_files] set shallow { if [exists archive/[project_minus].patch] then rm archive/[project_minus].patch set clearstat; sh [resolve etc/patches.sh] [resolve [patch_files]] > archive/[project_minus].patch; gzip -9 -v archive/[project_minus].patch; } [vs_file],P: [vs_file] { echo "Index:" [vs_file] > [target]; prev = [collect aegis -list version -p [project] -c [change] | [awk] -F"'\"'" "'/previous/{print $2}'" ]; echo "'Prereq: \""[prev]"\"'" >> [target]; echo "'#define PATCHLEVEL \""[prev]"\"'" | diff -c - [vs_file] | sed '1,2d' >> [target]; } %0%,P: %0% if [exists [resolve %0%]] { aegis -cp %0% -delta 1 -output patch.orig -p [project] -c [change] || cp /dev/null patch.orig; sh [resolve etc/patch.file.sh] patch.orig [resolve %0%] %0% > [target]; rm patch.orig; } [changes_file]: etc/CHANGES.sh [vs_file] { sh [resolve etc/CHANGES.sh] [project] > [target]; } MANIFEST: etc/MANIFEST.sh [stringset [source_file_order] - [target]] { sh [resolve etc/MANIFEST.sh [source_file_order]] > [target]; } archive/%.html: web.src/%.roff: etc/ssp.awk [vs_file] set shallow { roffpp [prepost "-I" "/etc" [search_list]] [resolve web.src/%.roff] | groff -Tascii -t -P-bhu | [awk] -f [resolve etc/ssp.awk] > [target]; } archive/[project_minus].lsm: etc/version.so; archive/[project_short].html: etc/version.so; [project_short].spec: etc/spec.sh set shallow { version\=[version_short] sh [resolve etc/spec.sh] [source_files] > [target]; } archive/[project_minus].spec: [project_short].spec set shallow { cat [resolve [need]] > [target]; } archive/[project_minus].README: README set shallow { cat [resolve [need]] > [target]; } archive/[project_short].gif: etc/[project_short].gif.uue set shallow { uudecode -o [target] [resolve [need]]; } %0%.cc,M:: %0%.cc,Md; %1/%0%2.cc,Md: %1/%0%2.cc { c_incl -nc /* no cache */ -ns /* no system */ -eia /* empty if absent */ [stringset [c++_include_flags] [prepost "-I" /[arch]/%1 [search_list]] [prepost "-I" "/%1" [search_list]] ] [resolve %1/%0%2.cc] -nsri /* no source relative includes */ [prepost "-rlp=" "" [search_list]] /* remove leading path */ -rlp [arch] /* remove leading architecture */ -o [target]; } archive/changelog.txt: [vs_file] etc/ssp.awk { aereport change-log -p tardy -c 1 -pl\=66 -pw\=80 -tw\=1 | awk -f [resolve etc/ssp.awk] > [target]; } if [find_command png2ico] then { integration-build-targets += archive/favicon.ico; archive/favicon.ico: archive/[project_short].gif set shallow { giftopnm [resolve archive/[project_short].gif] | pnmgamma 2.0 | pnmscale -xysize 16 16 > temp1.pnm; pnmquant 16 temp1.pnm | pnmtopng > temp16.png; giftopnm [resolve archive/[project_short].gif] | pnmgamma 2.0 | pnmscale -xysize 32 32 > temp1.pnm; pnmquant 16 temp1.pnm | pnmtopng > temp32.png; png2ico [target] temp16.png temp32.png; rm temp1.pnm temp16.png temp32.png; } }