Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
978 B

  1. .POSIX:
  2. include config.mk
  3. all: scroll
  4. config.h:
  5. cp config.def.h config.h
  6. scroll: scroll.c config.h
  7. install: scroll
  8. mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
  9. cp -f scroll $(DESTDIR)$(BINDIR)
  10. cp -f scroll.1 $(DESTDIR)$(MANDIR)/man1
  11. uninstall:
  12. rm -f $(DESTDIR)$(BINDIR)/scroll $(DESTDIR)$(MANDIR)/man1/scroll.1
  13. test: scroll ptty
  14. # check usage
  15. if ./ptty ./scroll -h; then exit 1; fi
  16. # check exit passthrough of child
  17. if ! ./ptty ./scroll true; then exit 1; fi
  18. if ./ptty ./scroll false; then exit 1; fi
  19. ./up.sh
  20. clean:
  21. rm -f scroll ptty
  22. distclean: clean
  23. rm -f config.h scroll-$(VERSION).tar.gz
  24. dist: clean
  25. mkdir -p scroll-$(VERSION)
  26. cp -R README scroll.1 TODO Makefile config.mk config.def.h \
  27. ptty.c scroll.c up.sh up.log \
  28. scroll-$(VERSION)
  29. tar -cf - scroll-$(VERSION) | gzip > scroll-$(VERSION).tar.gz
  30. rm -rf scroll-$(VERSION)
  31. .c:
  32. $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< -lutil
  33. .PHONY: all install test clean distclean dist