NAME = chkfontpath VERSION=$(shell rpm -q --qf '%{version}\n' --specfile $(NAME).spec | head -1) RELEASE=$(shell rpm -q --qf '%{release}\n' --specfile $(NAME).spec | head -1) CVSTAG = r$(subst .,-,$(VERSION)) CVSROOT = $(shell cat CVS/Root 2>/dev/null || :) CFLAGS +=$(RPM_OPT_FLAGS) -Wall -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE LOADLIBES = -lpopt SUBDIRS = man all: subdirs $(NAME) subdirs: for d in $(SUBDIRS); do \ (cd $$d; $(MAKE)) \ || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac;\ done && test -z "$$fail" authconfig: $(NAME).c install: mkdir -p $(INSTROOT)$(BINDIR) $(INSTROOT)$(MANDIR)/man8 install -m 755 $(NAME) $(INSTROOT)$(BINDIR)/$(NAME) for d in $(SUBDIRS); do \ (cd $$d; $(MAKE) INSTROOT=$(INSTROOT) install) \ || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac;\ done && test -z "$$fail" clean: rm -f $(NAME) make -C po clean tag: cvs tag $(CVSTAG) . force-tag: cvs tag -F $(CVSTAG) . archive: @rm -rf /tmp/$(NAME)-$(VERSION) /tmp/$(NAME) @cd /tmp; cvs -d $(CVSROOT) export -r $(CVSTAG) $(NAME) @mv /tmp/$(NAME) /tmp/$(NAME)-$(VERSION) @dir=$$PWD; cd /tmp; tar zcvf $$dir/$(NAME)-$(VERSION).tar.gz \ $(NAME)-$(VERSION) @rm -rf /tmp/$(NAME)-$(VERSION) @echo "The archive is in $(NAME)-$(VERSION).tar.gz" srpm: @echo Creating src.rpm @mkdir -p $(HOME)/rpmbuild/$(NAME)-$(VERSION) @mv $(NAME)-$(VERSION).tar.gz $(HOME)/rpmbuild/$(NAME)-$(VERSION)/ @cp $(NAME).spec $(HOME)/rpmbuild/$(NAME)-$(VERSION)/ @pushd $(HOME)/rpmbuild/$(NAME)-$(VERSION) &> /dev/null ; rpmbuild --nodeps -bs $(NAME).spec ; popd &> /dev/null @echo SRPM is: $(HOME)/rpmbuild/SRPMS/$(NAME)-$(VERSION)-$(RELEASE).src.rpm