File: Makefile.in

package info (click to toggle)
camas 1.0.30-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,288 kB
  • ctags: 358
  • sloc: ansic: 1,354; perl: 297; makefile: 201; sh: 196
file content (173 lines) | stat: -rw-r--r-- 5,726 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
# @configure_input@
SRCDIR=@srcdir@
VPATH=@srcdir@
prefix=@prefix@
CAUDIUMDIR=@CAUDIUMDIR@
DESTDIR=
EXTRAVER=

@SET_MAKE@

INSTALL=@INSTALL@

# Used to avoid make compatibility problems.
BIN_TRUE=":"
#extern tools
all:
	-@$(BIN_TRUE)

force:
	-@$(BIN_TRUE)

autodefvardocs:
	(cd $(SRCDIR); $(PIKE) tools/defvar2autodoc.pike `find server/modules/ -name "*.pike"` )

# These are here for compatibility with the easy-start makefile
easy: all
	-@$(BIN_TRUE)

hard: all
	-@$(BIN_TRUE)

install: all install_only 
	-@$(BIN_TRUE)

install_only: 
	@$(SRCDIR)/mkdir -p $(DESTDIR)/$(CAUDIUMDIR)/modules/camas
	@$(SRCDIR)/mkdir -p $(DESTDIR)/$(CAUDIUMDIR)/etc/modules/CAMAS.pmod
	@$(SRCDIR)/mkdir -p $(DESTDIR)/$(CAUDIUMDIR)/etc/include/camas
	cp -pr $(SRCDIR)/server/modules/camas/ $(DESTDIR)/$(CAUDIUMDIR)/modules/
	cp -pr $(SRCDIR)/server/etc/modules/CAMAS.pmod/ $(DESTDIR)/$(CAUDIUMDIR)/etc/modules/
	cp -pr $(SRCDIR)/server/etc/include/camas/ $(DESTDIR)/$(CAUDIUMDIR)/etc/include/
	cd server ; \
	for f in `find . -name '*' -type f`; do \
	    install -d -m 755 $(DESTDIR)/$(CAUDIUMDIR)/`dirname $$f` ; \
	    install -m 644 $$f $(DESTDIR)/$(CAUDIUMDIR)/$$f ; \
	done
	@find $(DESTDIR)/$(CAUDIUMDIR) -name CVS -print | xargs rm -rf
	@echo "CAMAS installed."

clean:
	rm -f $srcdir/tools/camas/calta

spotless: clean
	find . '(' -name '#*#' -o -name '*~' -o -name '.*~' -o -name '*.bak'\
        -o -name '.pine-debug*' -o -name '.*.bak' -o -name core -o -name \
	config.cache -o -name config.status -o -name config.log -o -name \
	"*.a" -o -name configure ')'  -print -exec /bin/rm '{}'  ';'

./Makefile: $(SRCDIR)/Makefile.in config.status
	CONFIG_FILES=Makefile CONFIG_HEADERS="" ./config.status
	@echo "Run make again"
	@exit 1

$(SRCDIR)/ChangeLog.gz:
	cd $(SRCDIR); pike tools/make_changelog.pike | gzip -9 > ChangeLog.gz

only_bump_version:  force
	@if test -f $(SRCDIR)/server/modules/camas/camas.pike.new; then \
	  echo Deleting old $(SRCDIR)/server/modules/camas/camas.pike.new...; \
	  rm $(SRCDIR)/server/modules/camas/camas.pike.new || exit 1; \
	else : ; fi
	@(cd $(SRCDIR)/server/modules/camas; \
	  echo Bumping Camas version...; \
	  build=`sed <camas.pike -e'/__camas_build__/s/[^0-9]*//gp' -ed|head -1`; \
	  newbuild=`echo $$build 1+p|dc`; \
	  sed <camas.pike -e"/__camas_build__/s/$$build/$$newbuild/" >camas.pike.new; \
	  checkbuild=`sed <camas.pike.new -e'/__camas_build__/s/[^0-9]*//gp' -ed|head -1`; \
	  if test "x$$newbuild" = "x$$checkbuild"; then \
	    mv -f camas.pike.new camas.pike || exit 1; \
	    echo "Successfull bump to build $$newbuild."; \
	  else \
	    echo "Version bump failed: $$newbuild != $$checkbuild."; \
	    exit 1; \
	  fi; \
	  version=`sed <camas.pike -e'/__camas_version__/s/[^.0-9]*//gp' -ed|head -1`; \
	  cvs ci -m "Version bumped to $$version.$$newbuild by bump_version." camas.pike || exit 1; \
	  echo "Camas $$version.$$newbuild" >../../../VERSION; \
	  cat ../../../VERSION; \
	)

bump_version: force only_bump_version
	@(cd $(SRCDIR); \
	  echo Tagging...; \
	  cvs tag `cat VERSION | tr 'A-Z. ' 'a-z__'`||exit 1; \
	)
	@touch bump_version


same_version: force
	@cd $(SRCDIR)/server/modules/camas; \
	 build=`sed <camas.pike -e'/__camas_build__/s/[^0-9]*//gp' -ed|head -1`; \
	 version=`sed <camas.pike -e'/__camas_version__/s/[^.0-9]*//gp' -ed|head -1`; \
	 echo "Camas $$version.$$build" >../../../VERSION;

date_version: force
	@cd $(SRCDIR)/server/modules/camas; \
	 build=`sed <camas.pike -e'/__camas_build__/s/[^0-9]*//gp' -ed|head -1`; \
	 version=`sed <camas.pike -e'/__camas_version__/s/[^.0-9]*//gp' -ed|head -1`; \
	 echo "Camas $$version.$$build `date '+%Y%m%d'`-cvs" >../../../VERSION;

force_update: force
	@rm $(SRCDIR)/ChangeLog.gz \
	    $(SRCDIR)/VERSION bump_version bump_version.stamp \
	    2>/dev/null || true
	@echo Prepared for version update.

pre_dist: bump_version

same_pre_dist: same_version

faked_pre_dist:
	echo "CAMAS 1.0-pre" > $(SRCDIR)/VERSION

date_pre_dist:  date_version

copy_dist: $(SRCDIR)/ChangeLog.gz
	@if test -f $(SRCDIR)/VERSION; then :; else \
	  echo 'You need to make pre_dist first!'; \
	  exit 1; \
	fi
	@version=`cat $(SRCDIR)/VERSION | tr 'A-Z ' 'a-z-'`${rc}; \
	if ls -d $$version* >/dev/null 2>&1; then \
	  echo Deleting old distributions...; \
	  rm -rf $$version* || exit 1; \
	else :; fi; \
	mkdir $$version; \
	echo Copying files...; \
	(cd $(SRCDIR); tar cf - .)|(cd $$version; tar xf -; ./autogen.sh); \
	if test "`echo $$version| sed s/cvs//`" = "$$version" -a \
		"`echo $$version| sed s/test//`" = "$$version" ; then \
         echo "Non-test/devel version. Removing CVS directories.";\
	 find $$version/. -type d -name 'CVS' -print0 |xargs -0 rm -rf; \
	else \
	 echo "Making sure CVS root is anonymous...";\
	 for f in `find $$version/. -type f -path '*/CVS/Root' -print`; do\
	   echo $$f;\
           (cat $$f | sed 's/[^@]*\(.*\)/:pserver:anonymous\1/' >$$f.new)&&\
	   mv $$f.new $$f; \
         done;\
        fi;\
	echo Cleaning up the copied sources...; \
	for f in `find $$version/. -type f -name '*~' -print` \
	  `find $$version/. -type f -name '.#*' -print` \
	  `find $$version/. -type f -name '#*#' -print`; do \
	  echo $$f; rm $$f || exit 1; \
	done; \
	echo Removing debian stuff...; \
	rm -rf $$version/debian

tar_dist:
	@version=`cat $(SRCDIR)/VERSION | tr 'A-Z ' 'a-z-'`${rc}; \
	echo -n "Building tarfile..."; \
	tar cf $$version.tar $$version; \
	echo -n "tar.gz..."; \
	gzip -9 < $$version.tar >$$version.tar.gz; \
	echo -n "tar.bz2..."; \
	bzip2 -9 < $$version.tar >$$version.tar.bz2; \
	echo "done."; \
	rm $$version.tar

dist: copy_dist tar_dist
	@echo "Distribution build complete. Don't forget to run "
	@echo "'make only_bump_version' if this is not a test release."