File: Brasfile

package info (click to toggle)
cpipe 3.0.1-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 216 kB
  • sloc: ansic: 1,567; makefile: 45
file content (101 lines) | stat: -rw-r--r-- 2,776 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
########################################################################
#
# If you wonder what this strange file might be, go to
#   http://wsd.iitb.fhg.de/~kir/brashome/
# to find out that it is a kind of makefile, but with Tcl-syntax. It
# should however not be necessary to install cpipe. Just run make.
#
# $Revision: 1.7 $, $Date: 2001/12/09 10:35:41 $
########################################################################
include $::bras::base/c2o.rule
include $::bras::base/o2x.rule
include $::bras::base/cdeps.rule
include $::bras::base/cli2ch.rule
 
########################################################################

set VERSION [lindex [exec cat .version] 2]

getenv RPMDIR [file join [glob ~] rpm RPMS i386]
getenv TGZDIR . ;#[file join [glob ~] rpm SOURCES]

set TGZ [file join $TGZDIR cpipe-$VERSION.tar.gz]
set RPM [file join $RPMDIR cpipe-$VERSION-0.i386.rpm]

set CFLAGS {-O2 -W -Wall -ansi -pedantic}

########################################################################
## My assorted goodies for tcl have `forfile'
#package require agft
#namespace import ::agft::forfile

## find the list of all files cvs knows about
set CVSDEPS [::bras::cvsknown]
#set in [open "|cvs -q log -h" r]
# forfile line $in {
#   if {[regexp {^Working file: *(.*)} $line d file]} {
#     set f [string trim $file "\t "]
#     if {[file exist $f]} {
#       lappend CVSDEPS [string trim $file "\t "]
#     }
#   }
# }


########################################################################

Newer cpipe cmdline.o

Newer cpipe.1 cmdline.cli

Always clean {} {
  rm -f [glob -nocomplain *.o cmdline.\[ch\] *.dc *~] cpipe cpipe.1
}

Always tgz $TGZ {
  # just a link to make the tgz
}

Always rpm $RPM {
  # just a link to make the rpm
}

Newer $TGZ [concat $CVSDEPS cmdline.c cmdline.h cpipe.1] {
  ship -d $TGZDIR -F -I cmdline.c cmdline.h cpipe.1 -e cpipe.spec
}

Newer $RPM $TGZ {
  rpm --quiet -tb $TGZ
}

Newer index.html index.html.in {
  catch {file delete -force $target}
  set out [open $target w]
  puts $out "<!-- DO NOT EDIT, AUTOGENERATED FILE -->"
  close $out
  sed -e "s/|VERSION|/$VERSION/g" <index.html.in >>$target
  file attributes $target -permissions 0444
}

Newer CHANGES $TGZ {
  tar xzfO $TGZ cpipe-$VERSION/CHANGES >CHANGES  
}

Make publish {[updated {publish-www publish-tgz}]} .relax.

Make publish-www {[updated {publish-CHANGES publish-index}]} .relax.

Make publish-CHANGES {[updated CHANGES]} {
 scp CHANGES \
     pifpafpuf@shell.berlios.de:/home/groups/cpipe/htdocs/
}
Make publish-index {[updated index.html]} {
 scp index.html \
     pifpafpuf@shell.berlios.de:/home/groups/cpipe/htdocs/
  #scp index.html wsd:.public_html/cpipehome/ 2>@stderr
}

Make publish-tgz {[updated $TGZ]} {
  ncftpput ftp.berlios.de /incoming $TGZ
}