From be9c86487d9e27bed668d6af08b5d30d875ec300 Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Tue, 29 Oct 2019 18:12:17 +0000 Subject: [PATCH] wmbattery: add `dist` target. Running `make dist` creates a gzipped tar-ball. Signed-off-by: Jeremy Sowden --- wmbattery/Makefile.in | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/wmbattery/Makefile.in b/wmbattery/Makefile.in index fbb8b4b..5b9a3a3 100644 --- a/wmbattery/Makefile.in +++ b/wmbattery/Makefile.in @@ -7,6 +7,10 @@ icondir = @datadir@/icons/wmbattery man1dir = @mandir@/man1 srcdir = @srcdir@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ + CC = @CC@ CFLAGS = @CFLAGS@ -Wall @Xlib_CFLAGS@ @Xext_CFLAGS@ @libXpm_CFLAGS@ CPPFLAGS = @CPPFLAGS@ -DACPI_APM -DICONDIR=\"$(icondir)\" @@ -36,6 +40,26 @@ install: all uninstall: rm -rf $(bindir)/wmbattery $(man1dir)/wmbattery.1 $(icondir) +dist: + @test -d $(PACKAGE_NAME)-$(PACKAGE_VERSION) \ + && rm -fr $(PACKAGE_NAME)-$(PACKAGE_VERSION) || : + @$(INSTALL) -d $(PACKAGE_NAME)-$(PACKAGE_VERSION) + @$(INSTALL) -d $(PACKAGE_NAME)-$(PACKAGE_VERSION)/autoconf + @find . -type f \ + ! -name autogen ! -name configure ! -name .gitignore \ + ! -name config.status ! -name config.cache ! -name config.log \ + ! -name config.h ! -name Makefile \ + ! -name $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \ + ! -path './autoconf/*' \ + ! -path './autom4te.cache/*' \ + ! -path './$(PACKAGE_NAME)-$(PACKAGE_VERSION)/*' \ + -exec $(INSTALL_DATA) '{}' $(PACKAGE_NAME)-$(PACKAGE_VERSION) \; + @$(INSTALL_PROGRAM) autogen configure $(PACKAGE_NAME)-$(PACKAGE_VERSION) + @$(INSTALL_PROGRAM) autoconf/install-sh $(PACKAGE_NAME)-$(PACKAGE_VERSION)/autoconf + @tar cf - $(PACKAGE_NAME)-$(PACKAGE_VERSION) \ + | gzip >$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz + @rm -fr $(PACKAGE_NAME)-$(PACKAGE_VERSION) + OBJS=wmbattery.o acpi.o sonypi.o ifdef USE_HAL -- 2.11.4.GIT