File: Makefile

package info (click to toggle)
createrepo 0.4.11-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze, wheezy
  • size: 216 kB
  • ctags: 192
  • sloc: python: 1,581; makefile: 295; sh: 2
file content (170 lines) | stat: -rw-r--r-- 4,055 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
PACKAGE = createrepo
VERSION = 0.4.11
SHELL = /bin/sh
top_srcdir = .
srcdir = .
prefix = /usr
exec_prefix = ${prefix}

bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
docdir = 
includedir = ${prefix}/include
oldincludedir = /usr/include
mandir = ${prefix}/share/man

pkgdatadir = $(datadir)/$(PACKAGE)
pkglibdir = $(libdir)/$(PACKAGE)
pkgincludedir = $(includedir)/$(PACKAGE)
top_builddir = 

# all dirs
DIRS = $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(mandir)


# INSTALL scripts 
INSTALL         = install -p --verbose 
INSTALL_BIN     = $(INSTALL) -m 755 
INSTALL_DIR     = $(INSTALL) -m 755 -d 
INSTALL_DATA    = $(INSTALL) -m 644 
INSTALL_MODULES = $(INSTALL) -m 755 -D 
RM              = rm -f

SUBDIRS = bin docs

MODULES = $(srcdir)/genpkgmetadata.py \
		  $(srcdir)/dumpMetadata.py \
		  $(srcdir)/readMetadata.py \
		  $(srcdir)/modifyrepo.py

.SUFFIXES: .py .pyc
.py.pyc: 
	python -c "import py_compile; py_compile.compile($*.py)"


all: $(MODULES)
	for subdir in $(SUBDIRS) ; do \
	  $(MAKE) -C $$subdir VERSION=$(VERSION) PACKAGE=$(PACKAGE) DESTDIR=$(DESTDIR); \
	done

check: 
	pychecker $(MODULES) || exit 0 

install: all installdirs
	$(INSTALL_MODULES) $(srcdir)/$(MODULES) $(DESTDIR)$(pkgdatadir)
	for subdir in $(SUBDIRS) ; do \
	  $(MAKE) -C $$subdir install VERSION=$(VERSION) PACKAGE=$(PACKAGE); \
	done

installdirs:
	for dir in $(DIRS) ; do \
      $(INSTALL_DIR) $$dir ; \
	done


uninstall:
	for module in $(MODULES) ; do \
	  $(RM) $(pkgdatadir)/$$module ; \
	done
	for subdir in $(SUBDIRS) ; do \
	  $(MAKE) -C $$subdir uninstall VERSION=$(VERSION) PACKAGE=$(PACKAGE); \
	done

clean:
	$(RM)  *.pyc *.pyo
	for subdir in $(SUBDIRS) ; do \
	  $(MAKE) -C $$subdir clean VERSION=$(VERSION) PACKAGE=$(PACKAGE); \
	done

distclean: clean
	$(RM) -r .libs
	$(RM) core
	$(RM) *~
	for subdir in $(SUBDIRS) ; do \
	  $(MAKE) -C $$subdir distclean VERSION=$(VERSION) PACKAGE=$(PACKAGE); \
	done

mostlyclean:
	$(MAKE) clean


maintainer-clean:
	$(MAKE) distclean
	$(RM) $(srcdir)/configure


dist:
	olddir=`pwd`; \
	distdir=$(PACKAGE)-$(VERSION); \
	$(RM) -r .disttmp; \
	$(INSTALL_DIR) .disttmp; \
	$(INSTALL_DIR) .disttmp/$$distdir; \
	$(MAKE) distfiles
	distdir=$(PACKAGE)-$(VERSION); \
	cd .disttmp; \
	tar -cvz > ../$$distdir.tar.gz $$distdir; \
	cd $$olddir
	$(RM) -r .disttmp

daily:
	olddir=`pwd`; \
	distdir=$(PACKAGE); \
	$(RM) -r .disttmp; \
	$(INSTALL_DIR) .disttmp; \
	$(INSTALL_DIR) .disttmp/$$distdir; \
	$(MAKE) dailyfiles
	day=`/bin/date +%Y%m%d`; \
	distdir=$(PACKAGE); \
	tarname=$$distdir-$$day ;\
	cd .disttmp; \
	perl -pi -e "s/\#DATE\#/$$day/g" $$distdir/$(PACKAGE)-daily.spec; \
	echo $$day; \
	tar -cvz > ../$$tarname.tar.gz $$distdir; \
	cd $$olddir
	$(RM) -rf .disttmp

dailyfiles:
	distdir=$(PACKAGE); \
	cp \
	$(srcdir)/*.py \
	$(srcdir)/Makefile \
	$(srcdir)/ChangeLog \
	$(srcdir)/COPYING \	
	$(srcdir)/COPYING.lib \		
	$(srcdir)/README \
	$(srcdir)/$(PACKAGE).spec \
	$(top_srcdir)/.disttmp/$$distdir
	for subdir in $(SUBDIRS) ; do \
	  $(MAKE) -C $$subdir dailyfiles VERSION=$(VERSION) PACKAGE=$(PACKAGE); \
	done

distfiles:
	distdir=$(PACKAGE)-$(VERSION); \
	cp \
	$(srcdir)/*.py \
	$(srcdir)/Makefile \
	$(srcdir)/ChangeLog \
	$(srcdir)/COPYING \
	$(srcdir)/COPYING.lib \
	$(srcdir)/README \
	$(srcdir)/$(PACKAGE).spec \
	$(top_srcdir)/.disttmp/$$distdir
	for subdir in $(SUBDIRS) ; do \
	  $(MAKE) -C $$subdir distfiles VERSION=$(VERSION) PACKAGE=$(PACKAGE); \
	done

archive: dist

.PHONY: todo
todo:
	@echo ---------------===========================================
	@grep -n TODO\\\|FIXME `find . -type f` | grep -v grep
	@echo ---------------===========================================
.PHONY: all install install-strip uninstall clean distclean mostlyclean maintainer-clean info dvi dist distfiles check installcheck installdirs daily dailyfiles