need .h & .c on SUFFIXES for proper make rules
authorJohn Kohl <jtkohl@mit.edu>
Thu, 25 Oct 1990 11:44:55 +0000 (11:44 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Thu, 25 Oct 1990 11:44:55 +0000 (11:44 +0000)
add CopyHeader directive

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1316 dc483132-0cff-0310-8789-dd5450dbe970

src/config/Project.tmpl

index ed2deb230bce8f3145ad5e187897fc22984e5948..59a400963225c091abb46035b9d344399adf4e9d 100644 (file)
@@ -60,7 +60,7 @@
 #ifndef ErrorTableObjectRule
 
 #define ErrorTableObjectRule()                                         @@\
-.SUFFIXES: .et                                                         @@\
+.SUFFIXES: .et .h .c                                                   @@\
                                                                        @@\
 .et.h:                                                                         @@\
        $(COMPILE_ET) $*.et                                             @@\
@@ -117,6 +117,21 @@ libdir/lib/**/libname.a:                                           @@\
 /* The $(RANLIB) is done at the end by the directory itself */
 #endif /* OtherdirLibraryTarget */
 
+/*
+ * CopyHeader - generate rule to copy a generated header file to an include
+ * tree.
+ */
+#ifndef CopyHeader
+#define CopyHeader(hfile,hdir)                                         @@\
+headers:: hfile                                                                @@\
+       -if cmp hfile hdir/hfile >/dev/null 2>&1; then \                @@\
+               echo ; \                                                @@\
+       else \                                                          @@\
+               $(RM) hdir/hfile ; \                                    @@\
+               $(CP) hfile hdir/hfile; \                               @@\
+       fi
+#endif /* CopyHeader */
+
 /*
  * Default Definitions.
  */