This patch removes instances of hardcoded
invocation of /bin/ksh and allows to
replace it with, for, example,
/usr/local/bin/ksh93
Also "ksh93" is accepted whenever "ksh" is.
Tested using the following /bin/ksh:
----8<----
WHAT=`ps -o command= -p $PPID`
msg="Something tried to call /bin/ksh: $PPID: $WHAT"
print -u2 "$msg"
logger user.warn "$msg"
exit 99
----8<----
(Warning: first two lines are FreeBSD specific)
Scripts from Makefiles should now be executed either
with
$(KORNSHELL) korn-shell-script
or
$(SHELL) bourne-shell-script
therefore #!/bin/ksh has not been changed everywhere.
/usr/dt/bin/ scripts have been converted (e.g. Xsession)
Whenever possible Imake and CPP facilities have been used.
For C and C++ programs KORNSHELL needs to be defined to
"/path/to/your/ksh" (with quotes) so that it can make
a valid C constant.
Therefore, when adding KORNSHELL to Imakefile for C files,
you have to add
CXXEXTRA_DEFINES = -DKORNSHELL=\"$(KORNSHELL)\"
or similar (for example, see programs/dtprintinfo)
But for simple shell script substitution we usually change
LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
-DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)
to:
LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
-DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
-DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
-DKORNSHELL=$(KORNSHELL) \
-DXPROJECTROOT=X11ProjectRoot
since we don't want quotes for shell scripts.
40 lines
979 B
Plaintext
40 lines
979 B
Plaintext
XCOMM $XConsortium: Imakefile /main/4 1996/04/21 19:52:09 drk $
|
|
#define DoNormalLib YES
|
|
#define DoSharedLib NO
|
|
#define DoDebugLib NO
|
|
#define DoProfileLib NO
|
|
#define LibName MotifUI
|
|
#define LibHeaders NO
|
|
#define LibInstall NO
|
|
|
|
#define CplusplusSource YES
|
|
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
|
|
|
|
INCLUDES = -I. -I..
|
|
|
|
#ifdef RsArchitecture
|
|
EXTRA_DEFINES = -DHAS_EXCEPTIONS
|
|
#endif
|
|
|
|
CXXEXTRA_DEFINES = -DKORNSHELL=\"$(KORNSHELL)\"
|
|
|
|
SRCS = Application.C Button.C ComboBoxObj.C \
|
|
Container.C Debug.c Dialog.C \
|
|
DtDND.C Group.C HelpSystem.C \
|
|
Icon.c IconObj.C LabelObj.C \
|
|
MainWindow.C Menu.C MenuBar.C \
|
|
MotifThread.C MotifUI.C Prompt.C \
|
|
ScaleObj.C Sep.C WorkArea.c
|
|
|
|
OBJS = Application.o Button.o ComboBoxObj.o \
|
|
Container.o Debug.o Dialog.o \
|
|
DtDND.o Group.o HelpSystem.o \
|
|
Icon.o IconObj.o LabelObj.o \
|
|
MainWindow.o Menu.o MenuBar.o \
|
|
MotifThread.o MotifUI.o Prompt.o \
|
|
ScaleObj.o Sep.o WorkArea.o
|
|
|
|
#include <Library.tmpl>
|
|
|
|
DependTarget()
|