--- getopt/trunk/Makefile 2005/11/07 22:09:10 259 +++ getopt/trunk/Makefile 2014/11/23 10:50:39 368 @@ -5,9 +5,8 @@ bindir=$(prefix)/bin mandir=$(prefix)/man man1dir=$(mandir)/man1 -libdir=$(prefix)/lib sharedir=$(prefix)/share -getoptdir=$(libdir)/getopt +getoptdir=$(sharedir)/getopt localedir=$(sharedir)/locale # Define this to 0 to use the getopt(3) routines in this package. @@ -16,7 +15,11 @@ # Define this to 1 if you do not have the gettext routines WITHOUT_GETTEXT=0 - +# For creating the archive +PACKAGE=getopt +VERSION=1.1.5 +BASENAME=$(PACKAGE)-$(VERSION) +UNLIKELYNAME=a8vwjfd92 SHELL=/bin/sh @@ -26,10 +29,10 @@ INSTALL=install MSGFMT=msgfmt -LANGUAGES = cs de es fr it ja nl pt_BR +LANGUAGES = ca cs da de es et eu fi fr gl hu id it ja nl pl pt_BR ru sl sv tr uk vi zh_CN zh_TW MOFILES:=$(patsubst %,po/%.mo,$(LANGUAGES)) -CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITH_GETTEXT=$(WITH_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX +CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITHOUT_GETTEXT=$(WITHOUT_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"$(PACKAGE)\" -Dprogram_version=\"$(VERSION)\" ifeq ($(LIBCGETOPT),0) CPPFLAGS+=-I./gnu endif @@ -71,7 +74,7 @@ getopt-test.bash getopt-test.tcsh \ $(DESTDIR)$(getoptdir) -ifeq ($(WITH_GETTEXT),1) +ifeq ($(WITHOUT_GETTEXT),0) all_po: $(MOFILES) install_po: all_po $(INSTALL) -m 755 -d $(DESTDIR)$(localedir) @@ -93,3 +96,16 @@ %.mo: %.po $(MSGFMT) -o $@ $< + +# You need GNU tar for this to work! +.PHONY: package +package: clean + $(RM) -r $(UNLIKELYNAME) + mkdir $(UNLIKELYNAME) + ln -s .. $(UNLIKELYNAME)/$(BASENAME) + cd $(UNLIKELYNAME) && tar cfvzp ../$(BASENAME).tar.gz --exclude='CVS' --exclude='*.tar.gz' --exclude=$(UNLIKELYNAME) $(BASENAME)/* + $(RM) -r $(UNLIKELYNAME) + +.PHONY: test +test: all + ./run-tests