$OpenBSD: patch-config_cf_host_def,v 1.2 2009/12/14 18:03:36 jasper Exp $ --- config/cf/host.def.orig Mon Jan 7 19:10:03 2002 +++ config/cf/host.def Thu Dec 10 00:20:05 2009 @@ -1,13 +1,128 @@ #define TopLevelProject Motif -#define ProjectRoot /usr/X11R6 +#define ProjectRoot ${PREFIX} #define X11ProjectRoot /usr/X11R6 -#define VirtualBindingsPath /usr/X11R6/lib/X11/bindings +#define VirtualBindingsPath ${PREFIX}/lib/X11/bindings #define ImportX11 YES -#define USE_BYACC YES #define NoMessageCatalog YES #define ForceNormalLib YES #define DebugLibXm NO #define DebugLibMrm NO #define DebugLibUil NO -#define LexLib -lfl #define ExtraWidgets YES + +#define DependCmd /usr/X11R6/bin/makedepend +#define ExtraLoadOptions -L$(BUILDLIBDIR) + +/* + * install man page after processing through eqn and tbl + */ +#define InstallMotifManPage(file,section) @@\ +all:: file.section.new @@\ + @@\ +file.section.new:: file.section @@\ + @if [ -f file.section ]; then \ @@\ + cat file.section | $(NEQN) | $(TBL) > file.section.new; \ @@\ + fi @@\ + @@\ +install.man:: @@\ + MakeDir($(DESTDIR)$(MANDIR)) @@\ + -@if [ -f file.section.new ]; then \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.section.new $(DESTDIR)$(MANDIR)/file.$(MANSUFFIX); \ @@\ + fi @@\ + @@\ +clean:: @@\ ++ RemoveFile(file.section.new) + +/* + * install unformated man page + */ +#define InstallManPage(file,destdir) @@\ +InstallNamedTarget(install.man,file.man,$(INSTMANFLAGS),destdir,file.$(MANSUFFIX)) + +/* + * don't make it dependent on 'bootstrap' imake. we already have our own. + */ +#define MakeMakeSubdirs(dirs,target) @@\ +$(ONESUBDIR)/Makefile: @@\ + @MakeFlagsToShellFlags(n,executeit="no"); \ @@\ + cd $(ONESUBDIR) && \ @@\ + if [ "$$executeit" != "no" ]; then \ @@\ + $(IMAKE) -I$(IMAKEPREFIX)$(IRULESRC) $(IMAKE_DEFINES) -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ @@\ + fi; @@\ + @@\ +target:: @@\ + -@MakeFlagsToShellFlags(ik,set +e); \ @@\ + MakeFlagsToShellFlags(n,executeit="no"); \ @@\ + for i in dirs ;\ @@\ + do \ @@\ + case "$(CURRENT_DIR)" in \ @@\ + .) curdir= ;; \ @@\ + *) curdir=$(CURRENT_DIR)/ ;; \ @@\ + esac; \ @@\ + echo "making Makefiles in $$curdir$$i..."; \ @@\ + itmp=`echo $$i | sed -e 's;^\./;;g' -e 's;/\./;/;g'`; \ @@\ + curtmp="$(CURRENT_DIR)" \ @@\ + toptmp=""; \ @@\ + case "$$itmp" in \ @@\ + ../?*) \ @@\ + while echo "$$itmp" | grep '^\.\./' > /dev/null;\ @@\ + do \ @@\ + toptmp="/`basename $$curtmp`$$toptmp"; \ @@\ + curtmp="`dirname $$curtmp`"; \ @@\ + itmp="`echo $$itmp | sed 's;\.\./;;'`"; \ @@\ + done \ @@\ + ;; \ @@\ + esac; \ @@\ + case "$$itmp" in \ @@\ + */?*/?*/?*/?*) newtop=../../../../..;; \ @@\ + */?*/?*/?*) newtop=../../../..;; \ @@\ + */?*/?*) newtop=../../..;; \ @@\ + */?*) newtop=../..;; \ @@\ + *) newtop=..;; \ @@\ + esac; \ @@\ + newtop="$$newtop$$toptmp"; \ @@\ + case "$(TOP)" in \ @@\ + /?*) imaketop=$(TOP) \ @@\ + imakeprefix= ;; \ @@\ + .) imaketop=$$newtop \ @@\ + imakeprefix=$$newtop/ ;; \ @@\ + *) imaketop=$$newtop/$(TOP) \ @@\ + imakeprefix=$$newtop/ ;; \ @@\ + esac; \ @@\ + RemoveFile($$i/Makefile.bak); \ @@\ + if [ -f $$i/Makefile ]; then \ @@\ + echo " $(MV) Makefile Makefile.bak"; \ @@\ + if [ "$$executeit" != "no" ]; then \ @@\ + $(MV) $$i/Makefile $$i/Makefile.bak; \ @@\ + fi; \ @@\ + fi; \ @@\ + $(MAKE) $(MFLAGS) $(MAKE_OPTS) ONESUBDIR=$$i ONECURDIR=$$curdir IMAKETOP=$$imaketop IMAKEPREFIX=$$imakeprefix $$i/Makefile; \ @@\ + if [ -d $$i ] ; then \ @@\ + cd $$i; \ @@\ + $(MAKE) $(MFLAGS) Makefiles; \ @@\ + cd $$newtop; \ @@\ + else \ @@\ + exit 1; \ @@\ + fi; \ @@\ + done +#endif /* BeforeVendorCF */ + +#ifdef AfterVendorCF +#ifndef ImakeCmd +/* + * This should not happen. But in case it really happens, we need this + * definition otherwise we are forced to build 'bootstrp' imake. + */ +# define ImakeCmd /usr/X11R6/bin/imake -DPorts +#endif + +/* + * Do we install preformatted man page? + */ +#undef ManSourcePath +#define ManSourcePath $(MANPATH)/man + +#undef ConfigDir +#define ConfigDir ${PREFIX}/lib/X11/config + +#endif /* AfterVendorCF */