GNUmakefile.in 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # DT PS Tree
  2. #
  3. # Douglas Thrift
  4. #
  5. # @configure_input@
  6. # Copyright 2010 Douglas Thrift
  7. #
  8. # Licensed under the Apache License, Version 2.0 (the "License");
  9. # you may not use this file except in compliance with the License.
  10. # You may obtain a copy of the License at
  11. #
  12. # http://www.apache.org/licenses/LICENSE-2.0
  13. #
  14. # Unless required by applicable law or agreed to in writing, software
  15. # distributed under the License is distributed on an "AS IS" BASIS,
  16. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. # See the License for the specific language governing permissions and
  18. # limitations under the License.
  19. VPATH := @srcdir@
  20. srcdir := @srcdir@
  21. top_builddir := @top_builddir@
  22. CPPFLAGS := @CPPFLAGS@ $(filter -DPACKAGE_TARNAME% -DPACKAGE_VERSION% -DHAVE_NCURSES% -DHAVE_TERM% -DHAVE_STRUCT_KINFO_PROC% -DHAVE_KINFO_NEWABI% -DHAVE_DECL_KERN_PROC_PROC% -DHAVE_DECL_KERN_PROC_KTHREAD%,@DEFS@)
  23. CXX := @CXX@
  24. CXXFLAGS := @CXXFLAGS@ -Wall -Wno-long-long -Wno-parentheses
  25. LDFLAGS := @LDFLAGS@
  26. LDLIBS := @LIBS@
  27. PACKAGE_TARNAME := @PACKAGE_TARNAME@
  28. PACKAGE_VERSION := @PACKAGE_VERSION@
  29. TARNAME := $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
  30. INSTALL := @INSTALL@
  31. INSTALL_PROGRAM := @INSTALL_PROGRAM@
  32. INSTALL_DATA := @INSTALL_DATA@
  33. HELP2MAN := @HELP2MAN@
  34. REALPATH := @REALPATH@
  35. BSDTAR := @BSDTAR@
  36. prefix := @prefix@
  37. exec_prefix := @exec_prefix@
  38. bindir := @bindir@
  39. sbindir := @sbindir@
  40. libexecdir := @libexecdir@
  41. datarootdir := @datarootdir@
  42. datadir := @datadir@
  43. sysconfdir := @sysconfdir@
  44. sharedstatedir := @sharedstatedir@
  45. localstatedir := @localstatedir@
  46. includedir := @includedir@
  47. oldincludedir := @oldincludedir@
  48. docdir := @docdir@
  49. infodir := @infodir@
  50. htmldir := @htmldir@
  51. dvidir := @dvidir@
  52. pdfdir := @pdfdir@
  53. psdir := @psdir@
  54. libdir := @libdir@
  55. localedir := @localedir@
  56. mandir := @mandir@
  57. man1dir := ${mandir}/man1
  58. .PHONY: all man dist install uninstall clean distclean
  59. all: dtpstree
  60. ifneq ($(HELP2MAN),:)
  61. ifneq ($(REALPATH),:)
  62. man: $(srcdir)/man1/dtpstree.1
  63. $(srcdir)/man1/%.1: % %.man
  64. $(HELP2MAN) -I $(filter %.man,$^) -Nn '$(shell sed -e '$$ s|^// ||p;d' $(srcdir)/$<.cpp)' -v -Vs $(shell $(REALPATH) $<) | sed -e 's/^\\fB\\-\([a-zA-Z]\)\([A-Z][A-Z]*\)\\fR/\\fB\\-\1\\fI\2\\fR/;s/^\\fB\\-\([a-zA-Z]\)\[\([A-Z][A-Z]*\)\]\\fR/\\fB\\-\1\\fR[\\fI\2\\fR]/;s/^\([A-Z][A-Z]*\), \\fB\\-\\-/\\fI\1\\fR, \\fB\\-\\-/' > $@
  65. endif
  66. endif
  67. ifneq ($(BSDTAR),:)
  68. dist: man
  69. $(BSDTAR) -cf $(TARNAME).tar.bz2 -js '/^\./$(TARNAME)/' -vX .gitignore --exclude='.git*' .
  70. $(BSDTAR) -cf $(TARNAME).tar.xz -Js '/^\./$(TARNAME)/' -vX .gitignore --exclude='.git*' .
  71. endif
  72. install: all
  73. $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
  74. $(INSTALL_PROGRAM) -s dtpstree $(DESTDIR)$(bindir)
  75. $(INSTALL_DATA) $(srcdir)/man1/dtpstree.1 $(DESTDIR)$(man1dir)
  76. uninstall:
  77. rm -f $(DESTDIR)$(bindir)/dtpstree
  78. rm -f $(DESTDIR)$(man1dir)/dtpstree.1
  79. clean:
  80. rm -f dtpstree $(wildcard *core)
  81. distclean: clean
  82. rm -f GNUmakefile config.log config.status makefile