]> andersk Git - moira.git/commitdiff
add new funky rules; clean up install steps and fix spelling
authorjtkohl <jtkohl>
Fri, 18 Mar 1988 15:37:13 +0000 (15:37 +0000)
committerjtkohl <jtkohl>
Fri, 18 Mar 1988 15:37:13 +0000 (15:37 +0000)
util/imake.includes/Imake.rules

index 3f895f78d07b56e527470d05138a2ec4dfed16a4..1ce081487bb886f90168597365f055e12b55b0a9 100644 (file)
@@ -1,3 +1,8 @@
+/**/#  $Source$
+/**/#  $Author$
+/**/#  $Header$
+/**/#
+
 #ifdef __STDC__
 #define concat(x,y) x##y
 #define concat3(x,y,z) x##y##z
@@ -57,7 +62,7 @@ concat3(lib,libname,_p.a): objs                                               @@\
        cd profiled; $(ARCHIVE) ../$@ objs                              @@\
        $(RANLIB) $@                                                    @@\
                                                                        @@\
-lint: concat3(llib-l,libname,.ln)                                      @@\
+lint:: concat3(llib-l,libname,.ln)                                     @@\
                                                                        @@\
 concat3(llib-l,libname,.ln): srcs                                      @@\
        $(LINT) concat(-C,libname) $(CFLAGS) srcs lintlibs              @@\
@@ -69,11 +74,11 @@ clean::                                                             @@\
        $(RM) profiled/*.o                                              @@\
                                                                        @@\
 install::                                                              @@\
-       $(INSTALLFILE) concat3(lib,libname,.a) $(DESTDIR)/$(LIBDIR)     @@\
-       $(RANLIB) concat4($(DESTDIR)/$(LIBDIR),lib,libname,.a)          @@\
-       $(INSTALLFILE) concat3(lib,libname,_p.a) $(DESTDIR)/$(LIBDIR)   @@\
-       $(RANLIB) concat4($(DESTDIR)/$(LIBDIR),lib,libname,_p.a)        @@\
-       $(INSTALLFILE) concat3(llib-l,libname,.ln) $(DESTDIR)/$(LIBDIR)/lint
+       $(INSTALLFILE) concat3(lib,libname,.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,.a)     @@\
+       $(RANLIB) concat4($(DESTDIR)$(LIBDIR),lib,libname,.a)           @@\
+       $(INSTALLFILE) concat3(lib,libname,_p.a) concat4($(DESTDIR)$(LIBDIR)/,lib,libname,_p.a) @@\
+       $(RANLIB) concat4($(DESTDIR)$(LIBDIR),lib,libname,_p.a)         @@\
+       $(INSTALLFILE) concat3(llib-l,libname,.ln) concat4($(DESTDIR)$(LIBDIR)/lint,llib-l,libname,.ln)
 
 /*
  * Rule for building utilities (binaries which don't get installed)
@@ -141,6 +146,46 @@ obj:       src                                                             @@\
 clean::                                                                        @@\
        $(RM) obj                                                       @@\
        
+/*
+ * Rule for building some random object module with compile flags and
+ * other dependendcies
+ */
+
+#define host_flag_object(obj,src,flags,localdeps)                      @@\
+obj:   src localdeps                                                   @@\
+       $(HCC) $(HCFLAGS) flags -c src                                  @@\
+                                                                       @@\
+clean::                                                                        @@\
+       $(RM) obj                                                       @@\
+
+#define ro_flag_object(obj,src,flags,localdeps)                                @@\
+obj:   src localdeps                                                   @@\
+       $(CCRO) $(CFLAGS) flags -c src                                  @@\
+                                                                       @@\
+clean::                                                                        @@\
+       $(RM) obj                                                       @@\
+       
+/*
+ * Rule for building some random object module with compile flags, an
+ * intermediate output, and some other dependencies
+ */
+
+#define host_cplx_object(obj,interim,src,flags,localdeps)              @@\
+obj:   src localdeps                                                   @@\
+       $(HCC) $(HCFLAGS) flags -c src                                  @@\
+       $(MV) interim obj                                               @@\
+                                                                       @@\
+clean::                                                                        @@\
+       $(RM) obj                                                       @@\
+
+#define ro_cplx_object(obj,interim,src,flags,localdeps)                        @@\
+obj:   src localdeps                                                   @@\
+       $(CCRO) $(CFLAGS) flags -c src                                  @@\
+       $(MV) interim obj                                               @@\
+                                                                       @@\
+clean::                                                                        @@\
+       $(RM) obj                                                       @@\
+       
 /*
  * Rule for building a program which is to be installed:
  */
@@ -152,7 +197,23 @@ pgm: objs localdeps                                                        @@\
        $(CC) $(CFLAGS) -o $@ objs localdeps syslibs                    @@\
                                                                        @@\
 install::                                                              @@\
-       $(INSTALLPROG) pgm ${DESTDIR}installdir                         @@\
+       $(INSTALLPROG) pgm ${DESTDIR}installdir/pgm                     @@\
+                                                                       @@\
+clean::                                                                @@\
+       $(RM) pgm objs                                                  @@\
+
+/*
+ * Rule for building a program which is to be installed setuid root:
+ */
+
+#define suidprogram(pgm,objs,localdeps,syslibs,installdir)             @@\
+all:: pgm                                                              @@\
+                                                                       @@\
+pgm: objs localdeps                                                    @@\
+       $(CC) $(CFLAGS) -o $@ objs localdeps syslibs                    @@\
+                                                                       @@\
+install::                                                              @@\
+       $(INSTALLSUID) pgm ${DESTDIR}installdir/pgm                     @@\
                                                                        @@\
 clean::                                                                @@\
        $(RM) pgm objs                                                  @@\
@@ -168,13 +229,14 @@ pgm: objs localdeps                                                       @@\
        $(CC) $(CFLAGS) -o $@ objs localdeps syslibs                    @@\
                                                                        @@\
 install::                                                              @@\
-       $(INSTALLPROG) instopts pgm ${DESTDIR}installdir                @@\
+       $(INSTALLRAW) instopts pgm ${DESTDIR}installdir/pgm             @@\
                                                                        @@\
 clean::                                                                @@\
        $(RM) pgm objs                                                  @@\
 
 /*
- * Rule for installing man pages.
+ * Rule for installing man pages.  Section installing into should match
+ * suffix, or the man page won't show up when using man(1).
  */
 
 #define manpage(section,page)                                          @@\
@@ -183,12 +245,12 @@ install:: page                                                            @@\
        $(INSTALLFILE) page concat3(${DESTDIR}${MANDIR}/man,section,/`basename page`) @@\
 
 /*
- * Rule for building makefile dependancies.
+ * Rule for building makefile dependencies.
  */
 
 #define        depend_target()                                                 @@\
 depend:: $(SRCS)                                                       @@\
-       @echo "### Now computing dependancies"                          @@\
+       @echo "### Now computing dependencies"                          @@\
        @$(DEPEND) -s "# DO NOT DELETE" $(CFLAGS) $(SRCS)               @@\
 
 #define clean_target()                                                 @@\
This page took 1.183204 seconds and 5 git commands to generate.