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.
74 lines
2.5 KiB
Plaintext
74 lines
2.5 KiB
Plaintext
XCOMM $XConsortium: Imakefile /main/10 1996/10/28 12:05:34 cde-hp $
|
|
#define IHaveSubdirs
|
|
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
|
|
|
|
SUBDIRS = dtcopy
|
|
|
|
MakeSubdirs($(SUBDIRS))
|
|
ForceSubdirs($(SUBDIRS))
|
|
DependSubdirs($(SUBDIRS))
|
|
|
|
|
|
DEFINES = -DMULTIBYTE -DXK_MISCELLANY -DSHAPE -D_ILS_MACROS -DSUN_PERF \
|
|
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
|
|
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
|
|
-DKORNSHELL=\"$(KORNSHELL)\"
|
|
|
|
INCLUDES = -I./dtcopy
|
|
|
|
DEPLIBS = DepDtClientLibs
|
|
LOCAL_LIBRARIES = DtClientLibs
|
|
SYS_LIBRARIES = DtClientSysLibs DtClientExtraLibs
|
|
|
|
#ifdef AlphaArchitecture
|
|
EXTRA_DEFINES = -D_TOOLTALK
|
|
#endif
|
|
|
|
#if defined (SunArchitecture)
|
|
EXTRA_CCOPTIONS = -xF
|
|
#endif
|
|
|
|
#if defined(LinuxArchitecture)
|
|
EXTRA_INCLUDES = -I/usr/include/freetype2
|
|
#endif
|
|
|
|
#if defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture)
|
|
EXTRA_INCLUDES = -I$(XPROJECTROOT)/include/freetype2
|
|
#endif
|
|
|
|
SRCS = ChangeDir.c ChangeDirP.c Command.c Common.c \
|
|
Desktop.c Directory.c Encaps.c File.c \
|
|
FileDialog.c FileManip.c FileMgr.c FileOp.c \
|
|
Filter.c FilterP.c Find.c FindP.c \
|
|
Help.c HelpCB.c HelpP.c IconWindow.c \
|
|
IconicPath.c Main.c Menu.c MkDir.c \
|
|
ModAttr.c ModAttrP.c MultiView.c OverWrite.c \
|
|
Prefs.c PrefsP.c SharedMsgs.c SharedProcs.c \
|
|
ToolTalk.c Trash.c Utils.c fsDialog.c \
|
|
version.c
|
|
|
|
DTCOPY_OBJS = dtcopy/sharedFuncs.o dtcopy/fsrtns.o
|
|
|
|
OBJS = ChangeDir.o ChangeDirP.o Command.o Common.o \
|
|
Desktop.o Directory.o Encaps.o File.o \
|
|
FileDialog.o FileManip.o FileMgr.o FileOp.o \
|
|
Filter.o FilterP.o Find.o FindP.o \
|
|
Help.o HelpCB.o HelpP.o IconWindow.o \
|
|
IconicPath.o Main.o Menu.o MkDir.o \
|
|
ModAttr.o ModAttrP.o MultiView.o OverWrite.o \
|
|
Prefs.o PrefsP.o SharedMsgs.o SharedProcs.o \
|
|
ToolTalk.o Trash.o Utils.o fsDialog.o \
|
|
version.o $(DTCOPY_OBJS)
|
|
|
|
ComplexProgramTarget(dtfile)
|
|
|
|
LOCAL_CPP_DEFINES = -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
|
|
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP)
|
|
|
|
CPP_TARGETS = dtfile.config dtfile_error
|
|
|
|
AllTarget($(CPP_TARGETS))
|
|
|
|
CppSourceFile(dtfile.config,dtfile.config.cpp,$(LOCAL_CPP_DEFINES),)
|
|
MakeScriptFromCpp(dtfile_error,$(LOCAL_CPP_DEFINES))
|