site.def: Only build C/en_US locales by default for Linux
[oweals/cde.git] / cde / config / cf / Imake.rules
index 6b21cd70df4534dd4aad99d5f3625cc2be091b12..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)
@@ -154,6 +155,7 @@ XCOMM rules:  $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
  * MakeLintSubdirs             (dirs,target,subtarget)
  * LintSubdirs                 (dirs)
  * MakeLintLibSubdirs          (dirs)
+ * MakeMakeOneSubdirs          ()
  * MakeMakeSubdirs             (dirs,target)
  * MakefileSubdirs             (dirs)
  * CppScriptTarget             (dst,src,defs,deplist)
@@ -162,6 +164,9 @@ XCOMM rules:  $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
  * CppSourceFile               (dst,src,defs,deplist)
  * MakeDirectories             (step,dirs)
  * AllTarget                   (depends)
+ * MakeImakeDir                        ()
+ * DoUDB_SCRIPT3               (target, file, script, build)
+ * DoUDB_SCRIPT4               (target, file, script, build)
  *
  *
  * The following are in specific <os>Lib.rules:
@@ -175,6 +180,16 @@ XCOMM rules:  $TOG: Imake.rules /main/227 1998/02/02 12:07:57 kaleb $
 
 #define NullParameter
 
+/* stringify macro */
+#ifndef STR
+# if defined(__llvm__)
+# define STR2(x)       #x
+# else
+# define STR2(x)       "x"
+# endif
+#define STR(x) STR2(x)
+#endif
+
 /* if [ -d ] or [ ! -d ] causes make to fail, define this as - */
 #ifndef DirFailPrefix
 #define DirFailPrefix
@@ -210,7 +225,7 @@ XCOMM special target for clearmake                                  @@\
  * Concat - concatenates two strings.
  */
 #ifndef Concat
-#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
+#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #define Concat(a,b)a##b
 #else
 #define Concat(a,b)a/**/b
@@ -221,7 +236,7 @@ XCOMM special target for clearmake                                  @@\
  * Concat3 - concatenates three strings.
  */
 #ifndef Concat3
-#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
+#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #define Concat3(a,b,c)a##b##c
 #else
 #define Concat3(a,b,c)a/**/b/**/c
@@ -232,7 +247,7 @@ XCOMM special target for clearmake                                  @@\
  * Concat4 - concatenates four strings.
  */
 #ifndef Concat4
-#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
+#if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #define Concat4(a,b,c,d)a##b##c##d
 #else
 #define Concat4(a,b,c,d)a/**/b/**/c/**/d
@@ -262,7 +277,7 @@ XCOMM special target for clearmake                                  @@\
  *           exists to avoid problems with some preprocessors
  */
 #ifndef _XUseCat
-# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp)
+# if (__STDC__ && !defined(UnixCpp)) || defined(AnsiCpp) || defined(__llvm__)
 #  if defined(UseInstalled) || UseInstalledX11
 #   define _XUseCat(a,b,c) a##c
 #  else
@@ -2061,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
  */
@@ -2284,23 +2319,30 @@ MakeLintSubdirs(dirs,lintlib,lintlib)
 #endif /* MakeLintLibSubdirs */
 
 
+/*
+ * MakeMakeOneSubdirs - generate rules to recreate $(ONESUBDIR)/Makefile
+ * as part of the specified step in the build. This separate, explicit target
+ * exists so that clearmake will know what its goal is and do wink-in.
+ */
+#ifndef MakeMakeOneSubdirs
+#define MakeMakeOneSubdirs()                                           @@\
+$(ONESUBDIR)/Makefile:                                                 @@\
+       @MakeFlagsToShellFlags(n,executeit="no"); \                     @@\
+       cd $(ONESUBDIR); \                                              @@\
+       if [ "$$executeit" != "no" ]; then \                            @@\
+               ImakeSubCmdHelper -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ @@\
+       fi;
+#endif /* MakeMakeOneSubdirs */
+
+
 /*
  * MakeMakeSubdirs - generate rules to recursively recreate Makefiles as part
  * of the specified step in the build.  If $(TOP) is set to an absolute path, 
  * do not prepend the ../ prefix.  This makes running things outside of the 
  * source tree much easier.
- * $(ONESUBDIR)/Makefile exists as a separate, explicit target so that
- * clearmake will know what its goal is and do wink-in.
  */
 #ifndef MakeMakeSubdirs
 #define MakeMakeSubdirs(dirs,target)                                   @@\
-$(ONESUBDIR)/Makefile:                                                 @@\
-       @MakeFlagsToShellFlags(n,executeit="no"); \                     @@\
-       cd $(ONESUBDIR); \                                              @@\
-       if [ "$$executeit" != "no" ]; then \                            @@\
-               ImakeSubCmdHelper -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ @@\
-       fi;                                                             @@\
-                                                                       @@\
 target::                                                               @@\
        -@MakeFlagsToShellFlags(ik,set +e); \                           @@\
        MakeFlagsToShellFlags(n,executeit="no"); \                      @@\
@@ -2367,6 +2409,7 @@ target::                                                          @@\
  */
 #ifndef MakefileSubdirs
 #define MakefileSubdirs(dirs)                                          @@\
+MakeMakeOneSubdirs()                                                   @@\
 MakeMakeSubdirs(dirs,Makefiles)
 #endif /* MakefileSubdirs */
 
@@ -2376,7 +2419,7 @@ MakeMakeSubdirs(dirs,Makefiles)
  * Also delete line numbers from the cpp output (-P is not portable, I guess).
  */
 #ifndef CppSedMagic
-#define CppSedMagic $(SED) -e '/^#  *[0-9][0-9]*  *.*$$/d' -e '/^XCOMM$$/s//#/' -e '/^XCOMM[^a-zA-Z0-9_]/s/^XCOMM/#/'
+#define CppSedMagic $(SED) -e '/^#[line]* *[0-9][0-9]*  *.*$$/d' -e '/^XCOMM$$/s//#/' -e '/^XCOMM[^a-zA-Z0-9_]/s/^XCOMM/#/'
 #endif /* CppSedMagic */
 
 #ifndef CppFileTarget
@@ -2486,6 +2529,44 @@ step::                                                                   @@\
 all:: depends
 #endif /* AllTarget */
 
+
+/*
+ * MakeImakeDir - call make in imake directory.
+ */
+#ifndef MakeImakeDir
+#define MakeImakeDir() cd $(IMAKESRC) && \                             @@\
+       if [ -f Makefile ]; then \                                      @@\
+           $(MAKE) $(MFLAGS) BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \   @@\
+       else \                                                          @@\
+           $(MAKE) $(MFLAGS) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; \                                                                   @@\
+       fi
+#endif /* MakeImakeDir */
+
+
+/*
+ * DoUDB_SCRIPT3 - macro for creation of udb scripts for installation
+ */
+#ifndef DoUDB_SCRIPT3
+#define DoUDB_SCRIPT3(target, file, script, build)                     @@\
+target:: $(DATABASE_DIR)/file.udb                                      @@\
+       script -toLst -ReleaseStream $(PLATFORM) \                      @@\
+           $(DATABASE_DIR)/file.udb > file.lst                         @@\
+       build file ../../..
+#endif
+
+
+/*
+ * DoUDB_SCRIPT4 - macro for creation of udb scripts for installation
+ */
+#ifndef DoUDB_SCRIPT4
+#define DoUDB_SCRIPT4(target, file, script, build)                     @@\
+target:: $(DATABASE_DIR)/file.udb                                      @@\
+       script -toLst -ReleaseStream $(PLATFORM) \                      @@\
+           $(DATABASE_DIR)/file.udb > file.lst                         @@\
+       build file ../../../..
+#endif
+
+
 #ifdef DefineOldLibraryRules
 #include <oldlib.rules>
 #endif