PNAME = automake PVER = $(shell cat VERSION) ARCH := $(patsubst i%86,i386,$(shell uname -m)) ifeq (x86_64, $(ARCH)) LIB = lib64 else LIB = lib endif PREFIX = /usr BINDIR = $(PREFIX)/bin LIBDIR = $(PREFIX)/${LIB} DATADIR = $(PREFIX)/share DOCDIR = $(DATADIR)/doc/${PNAME}-${PVER} INSTALL = install LN_S = ln -s CAT = cat GZIP = gzip -9 WRAPPER = am-wrapper.sh PROGRAMS = aclocal automake all: install: $(INSTALL) -d $(DESTDIR)/${BINDIR} $(INSTALL) -d $(DESTDIR)/${LIBDIR} $(INSTALL) -d $(DESTDIR)/${LIBDIR}/misc $(INSTALL) -d $(DESTDIR)/${DATADIR} $(INSTALL) -d $(DESTDIR)/${DOCDIR} $(INSTALL) -m 0755 ${WRAPPER} $(DESTDIR)/${LIBDIR}/misc/ for i in ${PROGRAMS}; do $(LN_S) ../$(LIB)/misc/${WRAPPER} $(DESTDIR)/$(BINDIR)/$$i; done $(CAT) ChangeLog | $(GZIP) > $(DESTDIR)/${DOCDIR}/ChangeLog.gz $(CAT) VERSION | $(GZIP) > $(DESTDIR)/${DOCDIR}/VERSION.gz check: .PHONY = all check install