Makefile.am 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. MAINTAINERCLEANFILES = Makefile.in
  2. CLEANFILES = init.c DtFuncs.dtsh
  3. SUBDIRS = examples
  4. kshdir = ${libdir}/dtksh
  5. dist_ksh_SCRIPTS = DtFuncs.dtsh
  6. KSH93SRC = ./ksh93
  7. KSH93LIBSHELL = $(KSH93SRC)/lib/libshell.a
  8. bin_PROGRAMS = dtksh
  9. BUILT_SOURCES = init.c
  10. dtksh_CPPFLAGS = -I$(KSH93SRC)/include/ast -I$(KSH93SRC)/src/cmd/ksh93/include \
  11. -I$(KSH93SRC)/src/cmd/ksh93 -I${srcdir}/lib/DtPrint \
  12. -I${srcdir}/lib/DtHelp -Iksh93/src/cmd/ksh93/FEATURE \
  13. '-DAST_VERSION=20111111' -DSHOPT_STATS -DSHOPT_NAMESPACE \
  14. -DSHOPT_2DMATCH -DSHOPT_MULTIBYTE -DSHOPT_BGX -DSHOPT_AUDIT \
  15. -D_PACKAGE_ast -DSHOPT_DYNAMIC -D_BLD_shell -DSHOPT_KIA \
  16. -DKSHELL -DSHOPT_HISTEXPAND -DSHOPT_EDPREDICT -DSHOPT_ESH \
  17. -DSHOPT_VSH -DSHOPT_FIXEDARRAY \
  18. '-DERROR_CONTEXT_T=Error_context_t' -DSHOPT_SUID_EXEC \
  19. -D_API_ast=20100309 -DSHOPT_BRACEPAT -DBUILD_DTKSH
  20. dtksh_LDADD = $(DTCLIENTLIBS) ksh93/src/cmd/ksh93/pmain.o $(XTOOLLIB) \
  21. libshell.a $(KSH93SRC)/lib/libcmd.a $(KSH93SRC)/lib/libast.a \
  22. $(KSH93SRC)/lib/libdll.a
  23. if SOLARIS
  24. dtksh_LDADD += -lsecdb -lsocket -lnsl
  25. endif
  26. if AIX
  27. dtksh_CPPFLAGS += -D_IBMRPC_
  28. dtksh_LDFLAGS = -bE:dtksh.exp
  29. endif
  30. dtksh_SOURCES = init.c \
  31. widget.c \
  32. dtkcvt.c \
  33. dtkcmds.c \
  34. XtCvtrs.c \
  35. xmcvt.c \
  36. xmcmds.c \
  37. xmwidgets.c \
  38. extra.c \
  39. msgs.c
  40. # for the BSD's we do not want to pass CFLAGS since it includes a
  41. # -I/usr/local/incude directive. This breaks ksh's iconv
  42. # detection due to the weird way in which iconv seems to be handled on
  43. # the BSD's - both a libc impl (preferred), and a possibly external
  44. # GNU iconv impl installed in /usr/local.
  45. #
  46. # /usr/local/include is added to CFLAGS by the X11/Motif detection
  47. # logic - since that is where all of the needed headers are on the
  48. # BSDs.
  49. #
  50. # So until/unless that is fixed in ksh93, we will avoid sending
  51. # anything to the ksh build system except for SUIDEXECDEFINES
  52. if BSD
  53. KSH93_CCFLAGS=$(SUIDEXECDEFINES)
  54. else
  55. KSH93_CCFLAGS=$(CFLAGS) $(SUIDEXECDEFINES)
  56. endif
  57. ksh93/bin/ksh:
  58. ksh93/bin/package flat make CCFLAGS='$(KSH93_CCFLAGS)'
  59. init.c: ksh93/bin/ksh
  60. $(CP) ksh93/src/cmd/ksh93/sh/init.c ./
  61. libshell.a: $(KSH93SLIBSHELL) dtksh-init.o
  62. $(CP) $(KSH93LIBSHELL) libshell.a; \
  63. $(AR) d libshell.a init.o; \
  64. $(AR) cq libshell.a dtksh-init.o
  65. check-local:
  66. ./dtksh -c true && ksh93/bin/shtests --posix --utf8 SHELL=.libs/lt-dtksh
  67. clean-local:
  68. ksh93/bin/package clean
  69. DtFuncs.dtsh:
  70. $(CP) DtFuncs.sh DtFuncs.dtsh