File: Makefile.in

package info (click to toggle)
slice 1.3.8-12
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 864 kB
  • ctags: 452
  • sloc: ansic: 3,310; perl: 2,263; sh: 869; makefile: 296; yacc: 127
file content (247 lines) | stat: -rw-r--r-- 6,753 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
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
##
##  Makefile -- SLICE Makefile
##

@SET_MAKE@
SHELL = /bin/sh

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

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

SUBDIRS         = lib t

#   installation tools
SHTOOL          = $(top_srcdir)/etc/shtool
INSTALL_SCRIPT  = $(SHTOOL) install -c -m 755
INSTALL_DATA    = $(SHTOOL) install -c -m 644
MKDIR           = $(SHTOOL) mkdir -p -f -m 755
VERSION_TOOL    = $(SHTOOL) version
FIXPERM         = $(SHTOOL) fixperm

prefix          = @prefix@
exec_prefix     = $(prefix)
bindir          = $(prefix)/bin
libsubdir       = @libsubdir@
libdir          = $(prefix)/lib$(libsubdir)
mandir          = @mandir@

PATH_PERL       = @PATH_PERL@
INSTALLPRIVLIB  = @INSTALLPRIVLIB@
INSTALLARCHLIB  = @INSTALLARCHLIB@

_REPLACEVARS = \
    sed -e "s|\@PATH_PERL\@|$(PATH_PERL)|" -e '/@(\#)/d' -e '/^;\#/d' \
        -e "s|\@INSTALLPRIVLIB\@|$(INSTALLPRIVLIB)|" \
        -e "s|\@INSTALLARCHLIB\@|$(INSTALLARCHLIB)|" \

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

all: etc/expand slice slice.1 all-recursive
	@:> .build-ok

etc/expand: etc/expand.in
	@$(_REPLACEVARS) etc/expand.in > $@
	@chmod a+x $@

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

slice: etc/expand 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 | $(_REPLACEVARS) >slice
	chmod a+x slice

slice_term.pl: slice_term.y
	pbyacc -l -P slice_term.y 2>/dev/null \
     || pbyacc -l -P SliceTermParser slice_term.y && mv SliceTermParser.pm y.tab.pl
	sed -e "s/'@'/'\\\@'/g" <y.tab.pl >slice_term.pl
	rm y.tab.pl

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

slice.1: slice.pod
	set -e; \
	V=`$(VERSION_TOOL) -l perl -d long slice_vers.pl`; \
	pod2man --section=1 \
	        --center="Ralf S. Engelschall" \
	        --release="EN Tools" slice.pod |\
	sed -e 's|@SLICE_VERSION\\fR@|'"$$V"'\\fR|' >$@

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

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

test:
	@[ -f .build-ok ] || $(MAKE) all
	@echo "==> t ($@)"; \
	cd t && $(MAKE) $@; \
	echo "<== t"

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

install:
	@[ -f .build-ok ] || $(MAKE) all
	$(MKDIR) $(bindir)
	$(MKDIR) $(libdir)
	$(MKDIR) $(mandir)/man1
	$(INSTALL_SCRIPT) slice $(bindir)/slice
	$(INSTALL_DATA) slice.1 $(mandir)/man1/slice.1
	@$(MAKE) install-recursive prefix=$(prefix)

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

clean: clean-recursive
	-rm -f slice
	-rm -f slice.1 
	-rm -f etc/expand
	-rm -f .build-ok

distclean: clean distclean-recursive
	-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

realclean: distclean
	-rm -f slice_term.pl

# ------------------------------------------------
#   RECURSIVE CALLS
# ------------------------------------------------

all-recursive install-recursive:
	@set -e; set dummy $(MAKEFLAGS); amf=$$2; \
	target=`echo $@ | sed s/-recursive//`; \
	for dir in $(SUBDIRS); do \
	    if [ -f $$dir/Makefile ]; then \
	        echo "===> $$dir ($$target)"; \
	        (cd $$dir && $(MAKE) $$target prefix=$(prefix)) \
	        || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
	        echo "<=== $$dir"; \
	    else :; \
	    fi; \
	done && test -z "$$fail"

clean-recursive distclean-recursive:
	@target=`echo $@ | sed s/-recursive//`; \
	for dir in $(SUBDIRS); do \
	    if [ -f $$dir/Makefile ]; then \
	        echo "===> $$dir ($$target)"; \
	        (cd $$dir && $(MAKE) $$target); \
	        echo "<=== $$dir"; \
	    else :; \
	    fi; \
	done

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

config: configure

configure: configure.ac
	rm -f $@
	autoconf $? >$@
	./etc/fixconfigure $@
	chmod 770 $@

etc/shtool:
	shtoolize -o $@ install mkdir version echo fixperm

# ------------------------------------------------
#   THE RELEASE STUFF
# ------------------------------------------------

TAR    = tar       # where to find GNU Tar
FIND   = find      # where to find a good Find tool
TARDY  = tarcust   # where to find the Tarcust tool
GZIP   = gzip      # where to find GNU Zip
NAME   = barbier   # name of maintainer who rolls the tarball

EXCLUDE_FILES = .cvsignore CVS slice-*.tar.gz

NEWVERS = \
    $(VERSION_TOOL) -l perl -n Slice -p slice_ $$OPT slice_vers.pl; \
    V=`$(VERSION_TOOL) -l perl -d long slice_vers.pl`;\
    sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README

UPDATEVERS = \
    V=`$(VERSION_TOOL) -l perl -d short slice_vers.pl`;\
    $(VERSION_TOOL) -l perl -n Slice -p slice_ -s $$V slice_vers.pl; \
    V=`$(VERSION_TOOL) -l perl -d long slice_vers.pl`;\
    sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README

_GETDISTINFO = \
    _version=`$(VERSION_TOOL) -l perl -d short slice_vers.pl`; \
    _date=`date '+%Y%m%d_%H%M'`;

_BUILDDIST = \
    _cwd=`pwd`; \
    echo "Creating tarball..."; \
    cd $(top_srcdir) && \
    $(TAR) --no-recursion -cvf - `cat MANIFEST` |\
    $(TARDY) --user_number=0  --user_name=$(NAME) \
             --group_number=0 --group_name=slice \
             --prefix=$${_distname} - |\
    $(GZIP) --best - >$${_tarball}; \
    echo "Done"; \
    cd $$_cwd && ls -l $${_tarball}

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

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

new-version:
	@V="$(VERSION)"; \
	if [ ".$$V" != . ]; then \
		OPT="-s$$V"; \
	else \
		OPT="-e"; \
	fi; \
	$(NEWVERS)

update-version:
	$(UPDATEVERS)

fixperm:
	$(FIXPERM) *

manifest: distclean
	x=`echo $(EXCLUDE_FILES) |\
	   sed -e 's;/;\\\\/;g' -e 's#[         ]\{1,\}#/d -e /#g'`; \
	$(FIND) * -type f -depth -print |\
	sed -e /$$x/d | sort >MANIFEST

##EOF##