diff options
Diffstat (limited to 'xc/config/cf/Imake.rules')
-rw-r--r-- | xc/config/cf/Imake.rules | 109 |
1 files changed, 93 insertions, 16 deletions
diff --git a/xc/config/cf/Imake.rules b/xc/config/cf/Imake.rules index 1b0c4a462..ee1466d20 100644 --- a/xc/config/cf/Imake.rules +++ b/xc/config/cf/Imake.rules @@ -5,7 +5,7 @@ XCOMM XCOMM XCOMM XCOMM -XCOMM rules: $XFree86: xc/config/cf/Imake.rules,v 3.62 1999/10/13 16:49:01 dawes Exp $ +XCOMM rules: $XFree86: xc/config/cf/Imake.rules,v 3.64 2000/02/13 06:15:16 dawes Exp $ /* * MACHINE-INDEPENDENT RULES; DO NOT MODIFY @@ -85,6 +85,10 @@ XCOMM rules: $XFree86: xc/config/cf/Imake.rules,v 3.62 1999/10/13 16:49:01 dawe * InstallNamedProgNoClobber (srcname,dstname,dest) * MakeFlagsToShellFlags (makeflags,shellcmd) * MakeNamedTargetSubdir (dir,flags,subname) + * LinkConfDirectoryLong (mdir,cdir,rdir,ldir,opath,npath) + * LinkConfDirectory (mdir,cdir,rdir,ldir) + * LinkConfFileLong (cfile,lfile,opath,npath) + * LinkConfFile (cfile,lfile) * LinkFileList (step,list,dir,sub) * LinkVarDirectory (mdir,cdir,rdir,ldir) * InstallMultipleDestFlags (step,list,dest,flags) @@ -1409,44 +1413,96 @@ step:: list @@\ for i in list; do (set -x; RemoveFile($$i); $(LN) sub/$$i .); done #endif + /* - * LinkVarDirectory + * LinkConfDirectoryLong * - * Make links from $LIBDIR (<ProjectRoot>/lib/X11) to /var/X11/ - * For example /usr/X11R6/lib/X11/xdm ==> /var/X11/xdm so that X + * Make links from opath (usually <ProjectRoot>/lib/X11) to npath + * For example /usr/X11R6/lib/X11/xdm ==> /etc/X11/xdm so that X * binaries can be mounted from a read-only volume like a CD-ROM; * but files that may need to be edited can be stored locally on * read-write media. If someone has an existing installation, be - * careful and move existing files to the new location in /var. + * careful and move existing files to the new location in /etc. + * XXX Need to make the installation script do this when installing + * binary distributions. * * Since the link is used in the installation process, we need to * make the link relative in order to honor $(DESTDIR) if it is set. */ -#ifndef LinkVarDirectory -#if HasVarDirectory && HasSymLinks -#define LinkVarDirectory(mdir,cdir,rdir,ldir) @@\ +#ifndef LinkConfDirectoryLong +#if UseSeparateConfDir && HasSymLinks +#define LinkConfDirectoryLong(mdir,cdir,rdir,ldir,opath,npath) @@\ install:: @@\ - MakeDir(Concat($(DESTDIR)$(LIBDIR)/,cdir)) @@\ - MakeDir(Concat($(DESTDIR)$(VARDIR)/,mdir)) @@\ + MakeDir(Concat($(DESTDIR),opath/cdir)) @@\ + MakeDir(Concat($(DESTDIR),npath/mdir)) @@\ @MakeFlagsToShellFlags(i,set +e); \ @@\ - if [ -d Concat($(DESTDIR)$(LIBDIR)/,cdir) ]; then \ @@\ - RELPATH=`echo Concat($(LIBDIR)/,cdir) | \ @@\ + if [ -d Concat($(DESTDIR),opath/cdir) ]; then \ @@\ + RELPATH=`echo opath/cdir | \ @@\ sed -e 's:^.::' -e 's:[^/.][^/]*:..:'g`; \ @@\ - cd Concat($(DESTDIR)$(LIBDIR)/,cdir); \ @@\ + cd Concat($(DESTDIR),opath/cdir); \ @@\ if [ -d rdir -a ! -h rdir ]; then \ @@\ (cd rdir; tar cf - . | \ @@\ - (cd Concat($(DESTDIR)$(VARDIR)/,mdir);\ @@\ + (cd Concat($(DESTDIR),npath/mdir); \ @@\ tar xf -; exit 0); exit 0); \ @@\ fi; \ @@\ $(RM) -r rdir; \ @@\ - $(LN) Concat($${RELPATH}$(VARDIR)/,mdir) ldir; \ @@\ + $(LN) Concat($${RELPATH},npath/mdir) ldir; \ @@\ + fi +#else +#define LinkConfDirectoryLong(mdir,cdir,rdir,ldir,opath,npath) +#endif +#endif + +#ifndef LinkConfDirectory +#define LinkConfDirectory(mdir,cdir,rdir,ldir) LinkConfDirectoryLong(mdir,cdir,rdir,ldir,$(LIBDIR),$(CONFDIR)) +#endif + +#ifndef LinkVarDirectory +#define LinkVarDirectory(mdir,cdir,rdir,ldir) LinkConfDirectoryLong(mdir,cdir,rdir,ldir,$(LIBDIR),$(VARDIR)) +#endif + +/* + * LinkConfFileLong + * + * Make links from opath (<ProjectRoot>/lib/X11) to npath + * For example /usr/X11R6/lib/X11/xxx ==> /etc/X11/xxx so that X binaries + * can be mounted from a read-only volume like a CD-ROM; + * but files that may need to be edited can be stored locally on + * read-write media. If someone has an existing installation, be + * careful and move existing files to the new location in /etc. + * XXX Need to make the installation script do this when installing + * binary distributions. + * + * Since the link is used in the installation process, we need to + * make the link relative in order to honor $(DESTDIR) if it is set. + */ +#ifndef LinkConfFileLong +#if UseSeparateConfDir && HasSymLinks +#define LinkConfFileLong(cfile,lfile,opath,npath) @@\ +install:: @@\ + MakeDir(Concat($(DESTDIR),opath)) @@\ + MakeDir(Concat($(DESTDIR),npath)) @@\ + @MakeFlagsToShellFlags(i,set +e); \ @@\ + if [ -d Concat($(DESTDIR),opath) ]; then \ @@\ + RELPATH=`echo opath | \ @@\ + sed -e 's:^.::' -e 's:[^/.][^/]*:..:'g`; \ @@\ + cd Concat($(DESTDIR),opath); \ @@\ + if [ -f lfile -a ! -h lfile ]; then \ @@\ + cp -p lfile Concat($(DESTDIR),npath/cfile; \ @@\ + fi; \ @@\ + $(RM) -r lfile; \ @@\ + $(LN) Concat($${RELPATH},npath/cfile) lfile; \ @@\ fi #else -#define LinkVarDirectory(mdir,cdir,rdir,ldir) +#define LinkConfFileLong(cfile,lfile,opath,npath) #endif #endif +#ifndef LinkConfFile +#define LinkConfFile(cfile,lfile) LinkConfFileLong(cfile,lfile,$(LIBDIR),$(CONFDIR)) +#endif + /* * InstallMultipleDestFlags - generate rules to install multiple files at * once during a particular step in the build using a specific set of install @@ -1768,6 +1824,16 @@ Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\ LintLibReferences(varname,libname,libsource) #endif + /* + * ProjectUnsharedFontLibReferences - unshared font libraries + */ +#ifndef ProjectUnsharedFontLibReferences +#define ProjectUnsharedFontLibReferences() @@\ +DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(Xfont)) @@\ +FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\ +LintLibReferences(XFONT,Xfont,$(FONTLIBSRC)) +#endif + /* * SharedLibDependencies - shared library dependencies */ @@ -1776,6 +1842,17 @@ LintLibReferences(varname,libname,libsource) #endif /* + * SharedFontLibReferences - shared font libraries + */ +#ifndef SharedFontLibReferences +#define SharedFontLibReferences() @@\ +SOFONTREV = SharedFontRev @@\ +DEPFONTLIB = SharedLibDependencies(Xfont,$(FONTLIBSRC),SOFONTREV) @@\ +FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\ +LintLibReferences(XFONT,Xfont,$(FONTLIBSRC)) +#endif + +/* * SharedDSLibDependencies - shared library dependencies with data separation */ #ifndef SharedDSLibDependencies |