diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 77 | ||||
-rw-r--r-- | Makefile.common | 15 |
2 files changed, 92 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1be41db --- /dev/null +++ b/Makefile @@ -0,0 +1,77 @@ +# Simplified Makefile for devscripts + +include Makefile.common + +DESTDIR = + +all: version doc make_scripts conf.default translated_manpages + +version: + rm -f version + dpkg-parsechangelog -SVersion > version + +conf.default: conf.default.in version + rm -f $@ $@.tmp + VERSION=`cat version` && sed -e "s/###VERSION###/$$VERSION/" $< \ + > $@.tmp && mv $@.tmp $@ + +translated_manpages: + $(MAKE) -C po4a/ + touch translated_manpages + +clean_translated_manpages: + # Update the POT/POs and remove the translated man pages + $(MAKE) -C po4a/ clean + rm -f translated_manpages + +clean: clean_scripts clean_doc clean_translated_manpages + rm -f version conf.default make_scripts + +doc: + $(MAKE) -C doc + +online-test: + $(MAKE) -C test/ online-test + +destructive-test: + $(MAKE) -C test/ $@ + +destructive-test-installed: + $(MAKE) -C test/ $@ + +test: + $(MAKE) test_scripts + $(MAKE) test_test + +test-installed: + $(MAKE) -C test/ $@ + +install: all install_scripts install_doc + install -d "$(DESTDIR)$(PERLMOD_DIR)" \ + "$(DESTDIR)$(DATA_DIR)" "$(DESTDIR)$(TEMPLATES_DIR)" \ + "$(DESTDIR)$(DOCDIR)" + for f in lib/*; do cp -a "$$f" "$(DESTDIR)$(PERLMOD_DIR)"; done + install -m0644 conf.default "$(DESTDIR)$(DATA_DIR)" + install -m0644 templates/README.mk-build-deps "$(DESTDIR)$(TEMPLATES_DIR)" + install -m0644 README "$(DESTDIR)$(DOCDIR)" + ln -sf edit-patch.1 "$(DESTDIR)$(MAN1DIR)/add-patch.1" + +test_test: + $(MAKE) -C test/ test + +make_scripts: version + $(MAKE) -C scripts/ + touch $@ +clean_scripts: clean_translated_manpages + $(MAKE) -C scripts/ clean +test_scripts: + $(MAKE) -C scripts/ test +install_scripts: + $(MAKE) -C scripts/ install DESTDIR=$(DESTDIR) + +clean_doc: clean_translated_manpages + $(MAKE) -C doc clean +install_doc: + $(MAKE) -C doc install DESTDIR=$(DESTDIR) + +.PHONY: online-test test test-installed diff --git a/Makefile.common b/Makefile.common new file mode 100644 index 0000000..904566f --- /dev/null +++ b/Makefile.common @@ -0,0 +1,15 @@ +GEN_MAN1S := bts.1 build-rdeps.1 chdist.1 debcheckout.1 debcommit.1 \ + deb-reversion.1 desktop2menu.1 dget.1 mass-bug.1 \ + mk-build-deps.1 mk-origtargz.1 namecheck.1 rmadison.1 sadt.1 svnpath.1 \ + tagpending.1 origtargz.1 transition-check.1 who-permits-upload.1 \ + git-deborig.1 hardening-check.1 + +PREFIX = /usr +BINDIR = $(PREFIX)/bin +DOCDIR = $(PREFIX)/share/doc/devscripts +MAN1DIR = $(PREFIX)/share/man/man1 +MAN5DIR = $(PREFIX)/share/man/man5 +PERLMOD_DIR = $(shell perl -MConfig -e 'print $$Config{vendorlib}') +DATA_DIR = $(PREFIX)/share/devscripts +TEMPLATES_DIR = $(DATA_DIR)/templates +SYSCONFDIR = /etc |