Ticket #39651: patch-Makefile.diff

File patch-Makefile.diff, 1.1 KB (added by macports@…, 11 years ago)

Add support for PREFIX and DISTDIR.

  • Makefile

    old new  
    77TEXTFILES = words.txt rhymes.txt multiple.txt
    88DBFILES = words.db rhymes.db multiple.db
    99
    10 RHYMEPATH = /usr/share/rhyme
    11 BINPATH = /usr/bin
    12 MANPATH = /usr/share/man/man1
     10RHYMEPATH = $(PREFIX)/share/rhyme
     11BINPATH   = $(PREFIX)/bin
     12MANPATH   = $(PREFIX)/share/man/man1
    1313
    1414OBJECTS = rhyme.o setup.o alloc.o getopt1.o getopt.o
    1515
    1616all: words.db rhymes.db multiple.db rhyme
    1717
    1818install: all
    19         install --mode=755 rhyme $(BINPATH)
    20         install --mode=755 -d $(RHYMEPATH)
    21         install --mode=644 words.db $(RHYMEPATH)
    22         install --mode=644 rhymes.db $(RHYMEPATH)
    23         install --mode=644 multiple.db $(RHYMEPATH)
    24         install --mode=644 rhyme.1 $(MANPATH)
     19        install -m 755 rhyme $(DESTDIR)$(BINPATH)
     20        install -m 755 -d $(DESTDIR)$(RHYMEPATH)
     21        install -m 644 words.db $(DESTDIR)$(RHYMEPATH)
     22        install -m 644 rhymes.db $(DESTDIR)$(RHYMEPATH)
     23        install -m 644 multiple.db $(DESTDIR)$(RHYMEPATH)
     24        install -m 644 rhyme.1 $(DESTDIR)$(MANPATH)
    2525
    2626uninstall:
    2727        rm -f $(BINPATH)/rhyme