050_install.diff 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. diff -ur langdrill-0.3/src/Makefile langdrill-0.3/src/Makefile
  2. --- langdrill-0.3/src/Makefile 2018-03-19 09:36:36.277390675 -0700
  3. +++ langdrill-0.3/src/Makefile 2018-03-19 09:55:06.065284069 -0700
  4. @@ -1,6 +1,5 @@
  5. ###### Files & Directories
  6. DESTDIR=
  7. -MY_DEBIAN_SYSTEM=
  8. SRC = main.cc\
  9. @@ -20,21 +19,10 @@
  10. `vdk-config-2 --cflags` \
  11. -Wall
  12. -###### Test for Debian GNU/Linux
  13. -# If your system is not Debian GNU/Linux please modify the values after
  14. -# "else" statement. Modifying the values before else is useless, unless
  15. -# you also set MY_DEBIAN_SYSTEM=1
  16. -ifeq ($(MY_DEBIAN_SYSTEM),1)
  17. - MY_MESSAGE_OF_THE_DAY=">>" $(TARGET) compilled for Debian GNU/Linux system. "<<"
  18. - DRILL_DIR=$(DESTDIR)/usr/share/langdrill
  19. - BIN_DIR=$(DESTDIR)/usr/bin
  20. - MAN_DIR=$(DESTDIR)/usr/share/man/man1
  21. -else
  22. - MY_MESSAGE_OF_THE_DAY=">>" $(TARGET) compilled for NON-Debian GNU/Linux system. "<<"
  23. - DRILL_DIR=$(DESTDIR)/usr/local/share/langdrill
  24. - BIN_DIR=$(DESTDIR)/usr/local/bin
  25. - MAN_DIR=$(DESTDIR)/usr/local/man/man1
  26. -endif
  27. +PREFIX ?= /usr/local
  28. +DRILL_DIR ?= $(PREFIX)/share/langdrill
  29. +BIN_DIR ?= $(PREFIX)/bin
  30. +MAN_DIR ?= $(PREFIX)/share/man
  31. CC = g++
  32. CFLAGS = -g
  33. @@ -62,21 +50,18 @@
  34. rm -f $(TARGET) core *~
  35. $(TARGET): tarclean $(OBJ)
  36. - @echo $(MY_MESSAGE_OF_THE_DAY)
  37. $(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
  38. run: tarclean $(OBJ)
  39. - @echo $(MY_MESSAGE_OF_THE_DAY)
  40. $(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
  41. ./$(TARGET)
  42. build: clean tarclean $(OBJ)
  43. - @echo $(MY_MESSAGE_OF_THE_DAY)
  44. $(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
  45. install: all
  46. - install -d $(BIN_DIR) $(DRILL_DIR) $(MAN_DIR)
  47. - install ./$(TARGET) $(BIN_DIR)
  48. - install -m644 $(DRILL_SUP) $(DRILL_DIR)
  49. - ln -sf japanese.drill $(DRILL_DIR)/$(DRILL_DEF)
  50. - install -m644 $(MAN_PAGE) $(MAN_DIR)
  51. + install -d $(DESTDIR)$(BIN_DIR) $(DESTDIR)$(DRILL_DIR) $(DESTDIR)$(MAN_DIR)/man1
  52. + install ./$(TARGET) $(DESTDIR)$(BIN_DIR)
  53. + install -m644 $(DRILL_SUP) $(DESTDIR)$(DRILL_DIR)
  54. + ln -sf japanese.drill $(DESTDIR)$(DRILL_DIR)/$(DRILL_DEF)
  55. + install -m644 $(MAN_PAGE) $(DESTDIR)$(MAN_DIR)/man1