fontaliases: use copy rather than symlink since bdftopcf can't handle those
authorJon Trulson <jon@radscan.com>
Tue, 3 Apr 2018 18:55:23 +0000 (12:55 -0600)
committerJon Trulson <jon@radscan.com>
Tue, 3 Apr 2018 19:03:26 +0000 (13:03 -0600)
bdftopcf specifically will not read symbolic links.  This causes it to
fail when creating the programs/fontaliases/*/C/dtinfo.pcf.Z file and
subsequently, the fonts.dir file.

So, we add a new Imake macro: CopySourceFile(), to copy rather than
symlink the dtinfo.bdf file so these operations can complete
successfully.  The dtinfo.bdf file is only 5KB, so there's very little
impact having an extra copy created during a build.

cde/config/cf/Imake.rules
cde/programs/dtinfo/dtinfo/install/lib/fonts/Imakefile
cde/programs/fontaliases/bdf/fonts.tmpl

index 78e18343553cd063ecb0feaef2730129ddbbd08d..42323f7480f4fa5fe09b3f7dbb49f958091f5fcb 100644 (file)
@@ -134,6 +134,7 @@ XCOMM rules:  $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
  * NormalLintTarget            (srclist)
  * LintTarget                  ()
  * LinkSourceFile              (src,dir)
+ * CopySourceFile              (src,dir)
  * LinkFile                    (tofile,fromfile)
  * MakeSubincludesForBuild     (step,dir,srclist)
  * LangNamedTargetSubdirs      (lang,name,dirs,verb,flags,subname)
@@ -2075,6 +2076,26 @@ clean::                                                                  @@\
 #endif
 
 
+/*
+ * CopySourceFile - snag source file from some other directory
+ */
+#ifndef CopySourceFile
+#define CopySourceFile(src,dir)                                                @@\
+src:  dir/src                                                          @@\
+       RemoveFile($@)                                                  @@\
+       $(CP) $? $@                                                     @@\
+                                                                       @@\
+NoConfigRec(src)                                                       @@\
+                                                                       @@\
+includes:: src                                                         @@\
+                                                                       @@\
+depend:: src                                                           @@\
+                                                                       @@\
+clean::                                                                        @@\
+       RemoveFile(src)
+#endif
+
+
 /*
  * LinkFile - link a file
  */
index af671a9766b05d51c306f9d0bd404d4b21560cef..ba9c97f1afa792e6f868edefe12a8f5c142a4a99 100644 (file)
@@ -7,7 +7,7 @@ MKFONTDIR = $(XPROJECTROOT)/bin/mkfontdir
 
 OBJS = FontObj(dtinfo)
 
-LinkSourceFile(dtinfo.bdf,$(CDESRC)/fontaliases/bdf)
+CopySourceFile(dtinfo.bdf,$(CDESRC)/fontaliases/bdf)
 
 MakeFonts()
 
index 2369453d8759e558218f9b68cf4c43664d25915f..537c78445ec7789a915a6361a17d9e0464eb2c59 100644 (file)
@@ -6,7 +6,7 @@ XCOMM $XConsortium: fonts.tmpl /main/2 1996/09/13 17:55:52 drk $
 
 OBJS = FontObj(dtinfo) $(LOCAL_OBJS)
 
-LinkSourceFile(dtinfo.bdf,$(CDESRC)/fontaliases/bdf)
+CopySourceFile(dtinfo.bdf,$(CDESRC)/fontaliases/bdf)
 
 MakeFonts()