File: Makefile.cvs

package info (click to toggle)
scmxx 0.9.0-2.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,964 kB
  • ctags: 1,111
  • sloc: ansic: 11,892; sh: 2,784; xml: 2,690; makefile: 253
file content (60 lines) | stat: -rw-r--r-- 1,873 bytes parent folder | download | duplicates (5)
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
PROJECT=scmxx
ACCONFIGHEADERSOUT=$(shell grep ^AC_CONFIG_HEADER configure.in | cut -f 2 -d'[' | cut -f 1 -d']')
ACCONFIGHEADERSIN=$(patsubst  %, %.in, $(ACCONFIGHEADERSOUT))
ACCONFIGFILESOUT=$(shell grep ^AC_CONFIG_FILES configure.in | cut -f 2 -d'(' | cut -f 1 -d')')
ACCONFIGFILESIN=$(patsubst  %, %.in, $(ACCONFIGHEADERSOUT))
AHCONFIGFILE=$(shell echo $(ACCONFIGHEADERSIN) | cut -f 1 -d " ")

.PHONY: all
all: configure $(AHCONFIGFILE) $(PROJECT).spec winsetup-cygwin.iss winsetup-mingw.iss

aclocal.m4:
	aclocal --force

configure: configure.in acsite.m4
	autoconf -Wall
	@rm -rf autom4te.cache

config.status: configure config.guess config.sub install-sh $(AHCONFIGFILE)
	./configure --no-create $(CONFIG_OPTS)

$(AHCONFIGFILE): configure.in acsite.m4
	autoheader -Wall
	@touch $@
	@rm -rf autom4te.cache

.INTERMEDIATE: version.txt
version.txt: configure
	echo -n $(shell ./configure --version | grep ^$(PROJECT) | cut -f 3 -d " ") >$@

$(PROJECT).spec: version.txt $(PROJECT).spec.in
	sed -e 's/^Version:.*$$/Version:     $(shell cat version.txt)/' $@.in >$@

%.iss: version.txt %.iss.in
	sed -e 's/^AppVerName.*$$/AppVerName=SCMxx $(shell cat version.txt)/' \
	    -e 's/^OutputBaseFilename=.*$$/OutputBaseFilename=scmxx-$(shell cat version.txt)-win32-setup/' \
	    $@.in >$@

.PHONY: run-config.status
run-config.status: config.status $(ACCONFIGHEADERSIN) $(ACCONFIGFILESIN)
	./config.status

$(ACCONFIGFILESOUT): config.status
	./config.status

.PHONY: clean
clean: Makefile
	-$(MAKE) clean
	-rm -f *~
	-rm -rf autom4te.cache config.cache config.log config.status
	-rm -f $(ACCONFIGHEADERSOUT)
	-rm -f $(ACCONFIGFILESOUT)

.PHONY: distclean
distclean: Makefile
	-$(MAKE) distclean
	-rm -f *~
	-rm -rf autom4te.cache config.cache config.log config.status
	-rm -f $(ACCONFIGHEADERSOUT)
	-rm -f $(ACCONFIGFILESOUT)
	-rm -f configure $(AHCONFIGFILE) $(PROJECT).spec