1999-10-01 15:15:25 +08:00
|
|
|
#############################################################################
|
|
|
|
# File : Makefile
|
|
|
|
# Package : rpmlint
|
|
|
|
# Author : Frederic Lepied
|
|
|
|
# Created on : Mon Sep 30 13:20:18 1999
|
|
|
|
# Version : $Id$
|
|
|
|
# Purpose : rules to manage the files.
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
BINDIR=/usr/bin
|
|
|
|
LIBDIR=/usr/share/rpmlint
|
2006-04-09 04:17:35 +08:00
|
|
|
ETCDIR=/etc
|
2006-03-24 05:23:34 +08:00
|
|
|
MANDIR=/usr/share/man
|
1999-10-16 19:10:52 +08:00
|
|
|
|
2006-04-11 05:24:08 +08:00
|
|
|
FILES = rpmlint *.py INSTALL README README.devel COPYING \
|
2006-03-30 05:35:46 +08:00
|
|
|
Makefile config rpmdiff rpmlint.bash-completion rpmlint.1
|
2006-04-11 05:24:08 +08:00
|
|
|
GENERATED = AUTHORS ChangeLog
|
2001-05-18 23:07:26 +08:00
|
|
|
|
|
|
|
PACKAGE=rpmlint
|
2006-03-29 14:04:14 +08:00
|
|
|
|
|
|
|
# update this variable to create a new release
|
2006-06-29 05:19:16 +08:00
|
|
|
VERSION := 0.77
|
2006-03-29 14:04:14 +08:00
|
|
|
TAG := $(shell echo "V$(VERSION)" | tr -- '-.' '__')
|
2006-04-10 23:01:57 +08:00
|
|
|
SVNBASE = $(shell svn info . | grep URL | sed -e 's/[^:]*:\s*//' -e 's,/\(trunk\|tags/.\+\)$$,,')
|
1999-10-01 15:15:25 +08:00
|
|
|
|
2006-02-06 23:08:24 +08:00
|
|
|
# for the [A-Z]* part
|
2006-02-06 23:09:35 +08:00
|
|
|
LC_ALL:=C
|
2006-02-06 23:08:24 +08:00
|
|
|
export LC_ALL
|
|
|
|
|
1999-10-01 15:15:25 +08:00
|
|
|
all:
|
2006-04-04 21:52:38 +08:00
|
|
|
python ./compile.py "$(LIBDIR)/" [A-Z]*.py
|
2005-09-11 07:24:25 +08:00
|
|
|
@for f in [A-Z]*.py; do if grep -q '^[^#]*print ' $$f; then echo "print statement in $$f:"; grep -Hn '^[^#]*print ' $$f; exit 1; fi; done
|
1999-10-01 15:15:25 +08:00
|
|
|
|
|
|
|
clean:
|
2006-04-09 05:10:54 +08:00
|
|
|
rm -f *~ *.pyc *.pyo AUTHORS ChangeLog
|
1999-10-01 15:15:25 +08:00
|
|
|
|
|
|
|
install:
|
2006-04-09 04:17:35 +08:00
|
|
|
-mkdir -p $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(ETCDIR)/$(PACKAGE) $(DESTDIR)$(ETCDIR)/bash_completion.d $(DESTDIR)$(MANDIR)/man1
|
2003-05-09 20:34:28 +08:00
|
|
|
cp -p *.py *.pyo $(DESTDIR)$(LIBDIR)
|
2005-03-14 18:50:05 +08:00
|
|
|
rm -f $(DESTDIR)$(LIBDIR)/compile.py*
|
2002-04-25 04:10:12 +08:00
|
|
|
if [ -z "$(POLICY)" ]; then \
|
|
|
|
sed -e 's/@VERSION@/$(VERSION)/' < rpmlint.py > $(DESTDIR)$(LIBDIR)/rpmlint.py ; \
|
|
|
|
else \
|
|
|
|
sed -e 's/@VERSION@/$(VERSION)/' -e 's/policy=None/policy="$(POLICY)"/' < rpmlint.py > $(DESTDIR)$(LIBDIR)/rpmlint.py; \
|
|
|
|
fi
|
2003-05-09 20:34:28 +08:00
|
|
|
cp -p rpmlint rpmdiff $(DESTDIR)$(BINDIR)
|
2006-04-09 04:17:35 +08:00
|
|
|
cp -p config $(DESTDIR)$(ETCDIR)/$(PACKAGE)
|
|
|
|
cp -p rpmlint.bash-completion $(DESTDIR)$(ETCDIR)/bash_completion.d/rpmlint
|
2006-03-24 05:23:34 +08:00
|
|
|
cp -p rpmlint.1 $(DESTDIR)$(MANDIR)/man1/rpmlint.1
|
1999-10-01 15:15:25 +08:00
|
|
|
|
2001-11-15 00:33:03 +08:00
|
|
|
verify:
|
2002-02-10 08:46:28 +08:00
|
|
|
pychecker *.py
|
2001-11-15 00:33:03 +08:00
|
|
|
|
2006-07-05 22:53:19 +08:00
|
|
|
.PHONY: test
|
|
|
|
|
|
|
|
test:
|
|
|
|
./test.sh
|
|
|
|
|
2002-04-25 04:10:12 +08:00
|
|
|
version:
|
2006-03-29 14:04:14 +08:00
|
|
|
@echo "$(VERSION)"
|
2001-05-18 23:07:26 +08:00
|
|
|
|
|
|
|
|
2006-04-09 04:25:57 +08:00
|
|
|
dist: cleandist localcopy tar
|
2001-05-18 23:07:26 +08:00
|
|
|
|
|
|
|
cleandist:
|
|
|
|
rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2
|
|
|
|
|
2006-04-11 05:24:08 +08:00
|
|
|
localcopy: $(FILES) $(GENERATED)
|
2001-05-18 23:07:26 +08:00
|
|
|
mkdir $(PACKAGE)-$(VERSION)
|
2006-04-11 05:24:08 +08:00
|
|
|
cp -p $(FILES) $(GENERATED) $(PACKAGE)-$(VERSION)
|
2001-05-18 23:07:26 +08:00
|
|
|
|
2006-04-09 04:21:44 +08:00
|
|
|
tar: localcopy
|
2006-03-28 04:09:45 +08:00
|
|
|
tar cv --owner=root --group=root -f $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION)
|
2001-05-18 23:07:26 +08:00
|
|
|
bzip2 -9vf $(PACKAGE)-$(VERSION).tar
|
|
|
|
rm -rf $(PACKAGE)-$(VERSION)
|
|
|
|
|
|
|
|
export:
|
2006-03-28 03:57:19 +08:00
|
|
|
svn export $(SVNBASE)/tags/$(TAG) $(PACKAGE)-$(VERSION)
|
2001-05-18 23:07:26 +08:00
|
|
|
|
2006-03-28 04:03:21 +08:00
|
|
|
tag:
|
2006-03-28 04:45:19 +08:00
|
|
|
@if svn list $(SVNBASE)/tags/$(TAG) &>/dev/null ; then \
|
|
|
|
echo "ERROR: tag \"$(TAG)\" probably already exists" ; \
|
|
|
|
exit 1 ; \
|
|
|
|
else \
|
|
|
|
echo 'svn copy -m "Tag $(TAG)." . $(SVNBASE)/tags/$(TAG)' ; \
|
|
|
|
svn copy -m "Tag $(TAG)." . $(SVNBASE)/tags/$(TAG) ; \
|
|
|
|
fi
|
1999-10-01 15:15:25 +08:00
|
|
|
|
2006-04-11 05:24:08 +08:00
|
|
|
AUTHORS: authors.xml authors.xsl
|
2006-04-09 05:10:12 +08:00
|
|
|
xsltproc authors.xsl authors.xml | sort -u > $@
|
|
|
|
|
2006-04-11 05:24:08 +08:00
|
|
|
ChangeLog: $(FILES) authors.xml
|
2006-04-11 05:28:12 +08:00
|
|
|
svn2cl --authors=authors.xml --group-by-day --strip-prefix=trunk
|
2000-07-30 01:58:52 +08:00
|
|
|
|
1999-10-01 15:15:25 +08:00
|
|
|
# Makefile ends here
|