Imakefile 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. XCOMM $TOG: Imakefile /main/22 1999/01/18 10:38:29 samborn $
  2. #define IHaveSubdirs
  3. #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)"
  4. CDE_RELEASE = 2.2.0
  5. SUBDIRS = config util logs include lib programs databases admin
  6. DOCSUBDIRS = config doc
  7. MakeSubdirs($(SUBDIRS))
  8. DependSubdirs($(SUBDIRS))
  9. #define IHaveSpecialMakefileTarget
  10. Makefile:: xmakefile
  11. ImakeDependency(xmakefile)
  12. xmakefile:: Imakefile
  13. RMoveToBakFile(xmakefile)
  14. $(IMAKE_CMD) -s xmakefile -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  15. VerifyOS::
  16. @echo ""
  17. @echo Building on OSName.
  18. @echo ""
  19. includes::
  20. MakeDir($(BUILDINCDIR))
  21. XCOMM
  22. XCOMM Watch out!!! Make sure you do make includes after removing X11....
  23. XCOMM
  24. clean::
  25. $(RM) -r $(BUILDINCDIR)
  26. $(RM) -r $(BUILDLIBDIR)
  27. WORLDOPTS =
  28. MAKE_OPTS = -f xmakefile
  29. XCOMM
  30. XCOMM install; create the directories that we're going to need
  31. XCOMM
  32. DIRS_TO_CREATE = $(USRLIBDIR) $(BINDIR) $(INCDIR) $(USRINCDIR) $(LIBDIR) $(XAPPLOADDIR)
  33. MakeDirectories(install, $(DIRS_TO_CREATE))
  34. XCOMM
  35. XCOMM Everything builds everything in the SUBDIRS directories
  36. XCOMM
  37. Everything::
  38. @echo ""
  39. @echo "Rebuilding Release $(CDE_RELEASE) of CDE"
  40. @echo ""
  41. @date
  42. @echo ""
  43. MakeImakeDir()
  44. -$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak
  45. $(MAKE) $(MFLAGS) -f xmakefile.bak xmakefile
  46. $(MAKE) $(MFLAGS) $(MAKE_OPTS) Makefiles
  47. $(MAKE) $(MFLAGS) $(MAKE_OPTS) Makefiles.doc
  48. $(MAKE) $(MFLAGS) $(MAKE_OPTS) includes
  49. $(MAKE) $(MFLAGS) $(MAKE_OPTS) includes.doc
  50. $(MAKE) $(MFLAGS) $(MAKE_OPTS) depend
  51. $(MAKE) $(MFLAGS) $(MAKE_OPTS) depend.doc
  52. $(MAKE) $(MFLAGS) $(MAKE_OPTS) $(WORLDOPTS)
  53. $(MAKE) $(MFLAGS) $(MAKE_OPTS) $(WORLDOPTS) all.doc
  54. @echo ""
  55. @date
  56. @echo ""
  57. @echo "Rebuild of Release $(CDE_RELEASE) of CDE complete."
  58. @echo ""
  59. Everything.dev::
  60. @echo ""
  61. @echo "Rebuilding Release $(CDE_RELEASE) of CDE excluding DOC"
  62. @echo ""
  63. @date
  64. @echo ""
  65. MakeImakeDir()
  66. -$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak
  67. $(MAKE) $(MFLAGS) -f xmakefile.bak xmakefile
  68. $(MAKE) $(MFLAGS) $(MAKE_OPTS) Makefiles
  69. $(MAKE) $(MFLAGS) $(MAKE_OPTS) includes
  70. $(MAKE) $(MFLAGS) $(MAKE_OPTS) depend
  71. $(MAKE) $(MFLAGS) $(MAKE_OPTS) $(WORLDOPTS)
  72. @echo ""
  73. @date
  74. @echo ""
  75. @echo "Rebuild of Release $(CDE_RELEASE) of CDE excluding DOC complete."
  76. @echo ""
  77. XCOMM clean out link tree looking for stuff that should get checked in
  78. dangerous_strip_clean::
  79. make -k clean clean.doc
  80. find . -type l -exec rm {} \;
  81. find . \( \! \( -type d -o -name Makefile \) \) -print
  82. XCOMM special target to determine if the xmakefile exists.
  83. XCOMM Works on both Unix and NMAKE.EXE
  84. xmakefile-exists::
  85. XCOMM
  86. XCOMM Everything.doc builds everything in the DOCSUBDIRS directories
  87. XCOMM
  88. Everything.doc::
  89. @echo ""
  90. @echo "Rebuilding Release $(CDE_RELEASE) of DOC"
  91. @echo ""
  92. @date
  93. @echo ""
  94. MakeImakeDir()
  95. -$(RM) xmakefile.bak; $(MV) xmakefile xmakefile.bak
  96. $(MAKE) $(MFLAGS) -f xmakefile.bak xmakefile
  97. $(MAKE) $(MFLAGS) $(MAKE_OPTS) Makefiles.doc
  98. $(MAKE) $(MFLAGS) $(MAKE_OPTS) includes.doc
  99. $(MAKE) $(MFLAGS) $(MAKE_OPTS) depend.doc
  100. $(MAKE) $(MFLAGS) $(MAKE_OPTS) $(WORLDOPTS) all.doc
  101. @echo ""
  102. @date
  103. @echo ""
  104. @echo "Rebuild of Release $(CDE_RELEASE) of DOC complete."
  105. @echo ""
  106. NamedTargetSubdirs(install.doc,$(DOCSUBDIRS),"installing",DESTDIR=$(DESTDIR),install)
  107. NamedTargetSubdirs(install.man.doc,$(DOCSUBDIRS),"installing man pages",DESTDIR=$(DESTDIR),install.man)
  108. NamedCleanSubdirs(clean.doc,$(DOCSUBDIRS))
  109. NamedTagSubdirs(tags.doc,$(DOCSUBDIRS))
  110. MakeMakeSubdirs($(DOCSUBDIRS),Makefiles.doc)
  111. NamedTargetSubdirs(includes.doc,$(DOCSUBDIRS),including,NullParameter,includes)
  112. NamedTargetSubdirs(depend.doc,$(DOCSUBDIRS),depending,NullParameter,depend)
  113. NamedMakeSubdirs(all.doc, $(DOCSUBDIRS))