commit 11c92ec0b6e8f7b3aa92de15a98b56ed01b41bce from: Alexander Arkhipov date: Tue May 30 17:31:15 2023 UTC remove config.mk commit - eadd1a7fedf057b4a3940c5293143d6fea51b5a9 commit + 11c92ec0b6e8f7b3aa92de15a98b56ed01b41bce blob - c2688f57cb241d4e52e4e964a6cdc783cf389dff blob + 4356923605637a1f69f37b331390b43846d46594 --- Makefile +++ Makefile @@ -1,30 +1,36 @@ -include config.mk +include version.mk BIN = rmc MAN = $(BIN:=.1) +PREFIX ?= $(DESTDIR)/usr/local +MANPREFIX ?= $(PREFIX)/man + +INSTALL ?= install + +bindir = $(PREFIX)/bin +mandir = $(MANPREFIX)/man1 + all: - @echo edit config.mk and type \`make install\' to install rmc + @echo type \`make install\' to install rmc install: - mkdir -p $(DESTDIR)$(PREFIX)/bin - cp $(BIN) $(DESTDIR)$(PREFIX)/bin - chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN) - mkdir -p $(DESTDIR)$(MANPREFIX)/man1 - cp $(MAN) $(DESTDIR)$(MANPREFIX)/man1 - chmod 644 $(DESTDIR)$(MANPREFIX)/man1/$(MAN) + mkdir -p $(bindir) + $(INSTALL) -m 755 $(BIN) $(bindir) + mkdir -p $(mandir) + $(INSTALL) -m 644 $(MAN) $(mandir) uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) - rm -f $(DESTDIR)$(MANPREFIX)/man1/$(MAN) + cd $(bindir) && rm -f $(BIN) + cd $(mandir) && rm -f $(MAN) clean: -rm -f *.tar.gz dist: clean - mkdir -p rmc$(VERSION) - cp -rf Makefile config.mk README $(MAN) $(BIN) rmc$(VERSION) - tar cf - rmc$(VERSION) | gzip >rmc$(VERSION).tar.gz - rm -rf rmc$(VERSION) + mkdir -p rmc$(V) + cp -rf Makefile version.mk README COPYING $(MAN) $(BIN) rmc$(V) + tar cf - rmc$(V) | gzip >rmc$(V).tar.gz + rm -rf rmc$(V) -.PHONY: install uninstall clean dist +.PHONY: all install uninstall clean dist blob - c128ea37070d92c67491eef90e39186fba67f416 (mode 644) blob + /dev/null --- config.mk +++ /dev/null @@ -1,6 +0,0 @@ -VERSION = 03 - -PREFIX = /usr/local -MANPREFIX = $(PREFIX)/man -# Linux -#MANPREFIX = $(PREFIX)/share/man blob - /dev/null blob + 69f204f69b15f5fb5381df575d74bcc1646dab7a (mode 644) --- /dev/null +++ version.mk @@ -0,0 +1 @@ +V = 03