File: Makefile

package info (click to toggle)
clearsilver 0.10.5-1.4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,272 kB
  • ctags: 3,138
  • sloc: ansic: 24,586; python: 4,233; sh: 2,502; cs: 1,429; ruby: 819; java: 735; makefile: 603; perl: 120; lisp: 34; sql: 21
file content (131 lines) | stat: -rw-r--r-- 3,488 bytes parent folder | download | duplicates (6)
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
#
# Neotonic Source Kit
#
# Copyright (C) 2001 Neotonic and Brandon Long
#
#

NEOTONIC_ROOT = .

include rules.mk

SUBDIRS = util cs cgi $(BUILD_WRAPPERS)

OUTDIRS = bin libs

# These are blank here... but populated under automated build
VERSION =
RELEASE =

all: cs $(BUILD_WRAPPERS)

rules.mk: configure
	./configure

configure: configure.in
	./autogen.sh

cs: output_dir
	@for mdir in $(SUBDIRS); do \
	  if test -d $$mdir; then \
	    if test -f $$mdir/Makefile.PL -a ! -f $$mdir/Makefile; then \
	      cd $$mdir; $(PERL) Makefile.PL PREFIX=$(prefix) INSTALLDIRS=vendor; cd ..; \
	    fi; \
	    $(MAKE) -C $$mdir PREFIX=$(prefix); \
	  fi; \
	done

install: all
	./mkinstalldirs $(DESTDIR)$(cs_includedir)
	./mkinstalldirs $(DESTDIR)$(bindir)
	./mkinstalldirs $(DESTDIR)$(libdir)
	./mkinstalldirs $(DESTDIR)$(mandir)/man3
	$(INSTALL) -m 644 ClearSilver.h $(DESTDIR)$(cs_includedir)/
	$(INSTALL) -m 644 cs_config.h $(DESTDIR)$(cs_includedir)/
	$(INSTALL) -m 644 man/man3/*.3 $(DESTDIR)$(mandir)/man3/
	@for mdir in $(SUBDIRS); do \
	  if test -d $$mdir; then \
	    if test -f $$mdir/Makefile.PL -a ! -f $$mdir/Makefile; then \
	      cd $$mdir; $(PERL) Makefile.PL PREFIX=$(prefix) INSTALLDIRS=vendor; cd ..; \
	    fi; \
	    $(MAKE) -C $$mdir PREFIX=$(prefix) install; \
	  fi; \
	done

depend:
	@for mdir in $(SUBDIRS); do \
	  if test ! -f $$mdir/Makefile.PL; then \
	    $(MAKE) -C $$mdir depend; \
	  fi; \
	done

newdepend: killdepend
	@echo "*******************************************"
	@echo "** Building dependencies..."
	@for mdir in $(SUBDIRS); \
		do $(MAKE) -C $$mdir depend; \
	done

killdepend:
	@echo "*******************************************"
	@echo "** Removing Old dependencies..."
	@find . -name "Makefile.depends" -print | $(XARGS) rm %

.PHONY: man
man:
	@mkdir -p man/man3
	@for mdir in $(SUBDIRS); do \
		scripts/document.py --owner "ClearSilver" --outdir man/man3/ $$mdir/*.h; \
	done

.PHONY: hdf
hdf:
	@mkdir -p docs/hdf
	@for mdir in $(SUBDIRS); do \
		scripts/document.py --hdf --owner "ClearSilver" --outdir docs/hdf/ $$mdir/*.h; \
	done

changelog:
	p4 changes -l ./...
	

clean:
	-@for mdir in $(SUBDIRS); do \
	  $(MAKE) -C $$mdir clean; \
	done

distclean:
	-@for mdir in $(SUBDIRS); do \
	  $(MAKE) -C $$mdir distclean; \
	done
	-@for mdir in $(OUTDIRS); do \
		rm -rf $$mdir/*; \
	done
	rm -f config.cache config.log config.status rules.mk cs_config.h
	rm -rf autom4te.cache

output_dir:
	@for mdir in $(OUTDIRS); do \
		mkdir -p $$mdir; \
	done

CS_DISTDIR = clearsilver-0.10.5
CS_LABEL = CLEARSILVER-0_10_5
CS_FILES = README README.python INSTALL LICENSE CS_LICENSE rules.mk.in Makefile acconfig.h autogen.sh config.guess config.sub configure.in cs_config.h.in mkinstalldirs install-sh ClearSilver.h
CS_DIRS = util cs cgi python scripts mod_ecs imd java-jni perl ruby dso csharp ports contrib m4

cs_dist:
	@if p4 labels Makefile | grep "${CS_LABEL}"; then \
	  echo "release ${CS_LABEL} already exists"; \
	  echo "   to rebuild, type:  p4 label -d ${CS_LABEL}"; \
	  exit 1; \
	fi; 
	rm -rf $(CS_DISTDIR)
	p4 label $(CS_LABEL)
	p4 labelsync -l$(CS_LABEL) $(CS_FILES) $(addsuffix /..., $(CS_DIRS))
	mkdir -p $(CS_DISTDIR)
	tar -cf - `p4 files $(CS_FILES) $(addsuffix /..., $(CS_DIRS)) | cut -d'#' -f 1 | sed -e "s|//depot/google3/third_party/clearsilver/core/||"` | (cd $(CS_DISTDIR); tar -xf -)
	$(MAKE) -C $(CS_DISTDIR) man distclean
	chmod -R u+w $(CS_DISTDIR)
	chmod -R a+r $(CS_DISTDIR)
	tar chozf $(CS_DISTDIR).tar.gz $(CS_DISTDIR)