$NetBSD: patch-aa,v 1.5 2016/04/01 10:27:54 jperkin Exp $ --- Makefile.orig 1994-12-15 01:53:00.000000000 +0000 +++ Makefile @@ -46,16 +46,16 @@ DATA = $(PROGRAM).data NINSTPKG = $(PROGRAM).pkg # where to install this stuff -DEST = /usr +DEST = ${DESTDIR}$(PREFIX) #DEST = $(HOME)/local DESTBIN = $(DEST)/bin -DESTLIB = $(DEST)/lib -DESTMAN = $(DEST)/man +DESTLIB = $(DEST)/libdata/brs +DESTMAN = $(DEST)/${PKGMANDIR} DESTMAN1 = $(DESTMAN)/man1 # I use environment variables for these... #CFLAGS = -g -CFLAGS = -O2 -fwritable-strings -DDESTLIB=\"$(DESTLIB)\" +CFLAGS += -fwritable-strings -DDESTLIB=\"$(DESTLIB)\" # release directories. Nobody should care about this but me FTPHOME = /mnt/ftp @@ -66,7 +66,7 @@ NINSTPKGDIR = $(NINSTDIR)/packages # This is only used by the author when making a new release ftp-able. INSTALL = .do cp -LD = cc +LD = $(CC) MAKEFILE = Makefile @@ -398,31 +398,12 @@ ninstall: $(NINSTPKG) # The "install" target could be of general use. That's why there are # no explicit dependencies here. They just confuse things... install: - @if [ ! -r $(DEST) ]; then mkdir $(DEST); fi - @echo Installing $(PROGRAM) in $(DESTBIN) - @-strip $(PROGRAM) - @if [ ! -r $(DESTBIN) ]; then mkdir $(DESTBIN); fi - @if [ $(DESTBIN) != . ]; then \ - ((cd $(DESTBIN);rm -f $(PROGRAM)); \ - cp $(PROGRAM) $(DESTBIN)); \ - chown bin $(DESTBIN)/$(PROGRAM); \ - chgrp bin $(DESTBIN)/$(PROGRAM); \ - chmod 755 $(DESTBIN)/$(PROGRAM); fi - @echo Installing $(DATA) and $(DATA).conc in $(DESTLIB) - @if [ ! -r $(DESTLIB) ]; then mkdir $(DESTLIB); fi - @if [ $(DESTLIB) != . ]; then \ - cp $(DATA) $(DATA).conc $(DESTLIB); \ - chown bin $(DESTLIB)/$(DATA) $(DESTLIB)/$(DATA).conc; \ - chgrp bin $(DESTLIB)/$(DATA) $(DESTLIB)/$(DATA).conc; \ - chmod 644 $(DESTLIB)/$(DATA) $(DESTLIB)/$(DATA).conc; fi - @if [ ! -r $(DESTMAN) ]; then mkdir $(DESTMAN); fi - @echo Installing $(MAN) in $(DESTMAN1) - @if [ ! -r $(DESTMAN1) ]; then mkdir $(DESTMAN1); fi - @if [ $(DESTMAN1) != . ]; then \ - cp $(MAN) $(DESTMAN1)/$(MAN); \ - chown bin $(DESTMAN1)/$(MAN); \ - chgrp bin $(DESTMAN1)/$(MAN); \ - chmod 644 $(DESTMAN1)/$(MAN); fi + $(BSD_INSTALL_PROGRAM_DIR) $(DESTBIN) + $(BSD_INSTALL_PROGRAM) $(PROGRAM) $(DESTBIN)/ + $(BSD_INSTALL_DATA_DIR) $(DESTLIB) + $(BSD_INSTALL_DATA) $(DATA) $(DATA).conc $(DESTLIB)/ + $(BSD_INSTALL_MAN_DIR) $(DESTMAN1) + $(BSD_INSTALL_MAN) $(MAN) $(DESTMAN1)/ uninstall:; @echo Un-installing $(PROGRAM), $(DATA) and $(MAN) rm -f $(DESTBIN)/$(PROGRAM)