File: Makefile.in

package info (click to toggle)
slice 1.3.2-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 724 kB
  • ctags: 472
  • sloc: perl: 3,335; ansic: 3,054; sh: 437; makefile: 248; yacc: 105
file content (207 lines) | stat: -rw-r--r-- 5,342 bytes parent folder | download
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
##
##  Makefile -- SLICE Makefile
##

# ------------------------------------------------
#   DEFINITIONS
# ------------------------------------------------

@SET_MAKE@
SHELL = /bin/sh

top_srcdir      = @top_srcdir@
srcdir          = @srcdir@
VPATH           = @srcdir@

PATH_PERL       = @PATH_PERL@
INSTALL         = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA    = @INSTALL_DATA@
MKDIR           = ./etc/mkinstalldirs

prefix          = @prefix@
exec_prefix     = @exec_prefix@
bindir          = @bindir@
libdir          = @libdir@
mandir          = ${exec_prefix}/man

SLICE_VERSION   = @SLICE_VERSION@

NEWVERS = \
	./etc/newvers -l perl -p SLICE $$OPT slice_vers.pl; \
	V=`./etc/newvers -l perl -D slice_vers.pl`;\
	sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README

UPDATEVERS = \
	V=`./etc/newvers -l perl -d slice_vers.pl`;\
	./etc/newvers -l perl -p SLICE -r $$V slice_vers.pl; \
	V=`./etc/newvers -l perl -D slice_vers.pl`;\
	sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README

_GETDISTINFO = \
    _version=`$(top_srcdir)/etc/newvers -lperl -d slice_vers.pl`; \
    _date=`date '+%y%m%d_%H%M'`;

_BUILDDIST = \
    _cwd=`pwd`; \
    echo "Creating tarball..."; \
    cd $(top_srcdir); \
    gtar --no-recursion -cvf - `find * -depth -print | sort` |\
    tardy --user_number=1000  --user_name=rse \
          --group_number=1000 --group_name=en \
          --prefix=$${_distname} - |\
    gzip --best >/tmp/$${_tarball}; mv /tmp/$${_tarball} $$_cwd/$${_tarball}; \
    echo "Done"; \
    cd $$_cwd; ls -l $${_tarball};

# ------------------------------------------------
#   THE DEFAULT TARGETS
# ------------------------------------------------

all: slice slice.1 lib_subdir

# ------------------------------------------------
#   THE CONFIGURATION SUPPORT
# ------------------------------------------------

config: configure

configure: configure.in 
	rm -f configure
	autoconf configure.in >configure
	./etc/fixconfigure configure
	chmod 770 configure

# ------------------------------------------------
#   THE PROGRAM
# ------------------------------------------------

slice: slice_boot.pl slice_main.pl slice_term.pl slice_util.pl \
       slice_setup.pl slice_pass1.pl slice_pass2.pl slice_pass3.pl
	./etc/expand slice_main.pl |\
	sed -e "s|\@path_perl\@|$(PATH_PERL)|" -e '/@(#)/d' -e '/^;#/d' \
	>slice
	chmod a+x slice

slice_term.pl: slice_term.y
	pbyacc -l -P slice_term.y
	sed -e "s/\'@\'/\'\\\@\'/g" <y.tab.pl >slice_term.pl
	rm y.tab.pl


# ------------------------------------------------
#   THE DOCUMENTATION
# ------------------------------------------------

slice.1: slice.pod
	sed -e 's|\@SLICE_VERSION\@|$(SLICE_VERSION)|g' <slice.pod >/tmp/slice; \
	(cd /tmp; pod2man --section=1 \
	        --center="Ralf S. Engelschall" \
			--release="EN Tools" \
			slice ) >slice.1; rm -f /tmp/slice

slice.1.txt: slice.1
	groff -Tascii -man slice.1 >slice.1.txt

slice.1.ps: slice.1
	groff -Tps -man slice.1 >slice.1.ps

# ------------------------------------------------
#   THE PERL LIBRARY FILES
# ------------------------------------------------

lib_subdir:
	@echo "==> lib (all)"; cd lib; $(MAKE) LDLOADLIBS="-lc"; echo "<== lib"

lib_subdir_install:
	@echo "==> lib (install)"; cd lib; $(MAKE) install; echo "<== lib"

lib_subdir_clean:
	@echo "==> lib (clean)"; cd lib; $(MAKE) clean; echo "<== lib"
	@echo "==> t (clean)"; cd t; $(MAKE) clean; echo "<== t"

lib_subdir_distclean:
	@echo "==> lib (distclean)"; cd lib; $(MAKE) distclean; echo "<== lib"
	@echo "==> t (distclean)"; cd t; $(MAKE) distclean; echo "<== t"

# ------------------------------------------------
#   TEST SUITE
# ------------------------------------------------

test: all
	@echo "==> t (test)"; cd t; make test; echo "<== t"

# ------------------------------------------------
#   DISTRIBUTION
# ------------------------------------------------

release: distclean fixperm
	@$(_GETDISTINFO) \
    _distname="slice-$${_version}"; \
    _tarball="$${_distname}.tar.gz"; \
    echo "Release Distribution: SLICE Version $$_version"; \
    $(_BUILDDIST)

snap: 
	@$(_GETDISTINFO) \
    _distname="slice-$${_version}-$${_date}-SNAP"; \
    _tarball="$${_distname}.tar.gz"; \
    echo "Snap of whole source tree: SLICE Version $$_version as of $$_date"; \
    $(_BUILDDIST)

new-version:
	OPT=-iv; $(NEWVERS)

new-revision:
	OPT=-ir; $(NEWVERS)

new-patchlevel:
	OPT=-iP; $(NEWVERS)

new-release:
	OPT=-r$(R); $(NEWVERS)

update-version:
	$(UPDATEVERS)

fixperm:
	./etc/fixperm *

# ------------------------------------------------
#   INSTALLATION
# ------------------------------------------------

install: all
	$(MKDIR) $(bindir)
	$(MKDIR) $(libdir)
	$(MKDIR) $(mandir)/man1
	$(INSTALL_PROGRAM) slice $(bindir)/slice
	$(INSTALL_DATA) slice.1 $(mandir)/man1/slice.1
	@$(MAKE) lib_subdir_install

# ------------------------------------------------
#   CLEANUP
# ------------------------------------------------

clean: 
	-rm -f slice
	-rm -f slice.1 
	@$(MAKE) lib_subdir_clean

distclean: 
	@$(MAKE) clean
	@$(MAKE) lib_subdir_distclean
	-rm -f slice.1.ps
	-rm -f slice.1.txt
	-rm -f config.cache
	-rm -f config.log
	-rm -f config.status
	-rm -f Makefile
	-rm -f slice_boot.pl
	-rm -f etc/expand

realclean: 
	@$(MAKE) distclean
	-rm -f slice_term.pl

##EOF##