[exim-dev] /bin/rm

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Bryan Henderson
Date:  
À: exim-dev
Sujet: [exim-dev] /bin/rm
I have a system that doesn't have the requisite 'rm' program in
/bin/rm. The Exim make files expect it there. There is a make
variable RM_COMMAND, but it doesn't get used.

Here is a patch to the make files so they use $(RM_COMMAND) and the
user can override it in Local/Makefile.

The bootstrap make file uses rm too, so it has its own setting of
RM_COMMAND and the user has to modify that too.

Though I didn't change the default from /bin/rm, I believe the default
should be "rm", so that the user's PATH gets searched in the
conventional way.

-- 
Bryan Henderson                                    Phone 408-621-2000
San Jose, California




diff --rec --unif exim-4.52/Makefile exim/Makefile
--- exim-4.52/Makefile    2005-07-01 11:09:15.000000000 +0000
+++ exim/Makefile    2005-09-04 22:32:49.000000000 +0000
@@ -14,6 +14,8 @@


SHELL=/bin/sh

+RM_COMMAND=/bin/rm
+
# If a build name has not been specified by running this make file via a
# command of the form "make build=xxxx", then determine the name of the
# operating system and the machine architecture and use that. This does not
@@ -58,7 +60,7 @@
# "configure", which doesn't force it).

 makefile: build-directory
-    @cd build-$(buildname); /bin/rm -f Makefile; \
+    @cd build-$(buildname); $(RM_COMMAND) -f Makefile; \
       build=$(build) $(SHELL) ../scripts/Configure-Makefile


 # Go to the build directory and do the business
@@ -77,12 +79,12 @@
     @echo '*** Use "make makefile" to force a rebuild of the makefile'
     @echo ""
     cd build-$(buildname); \
-    /bin/rm -f *.o lookups/*.o lookups/*.a auths/*.o auths/*.a \
+    $(RM_COMMAND) -f *.o lookups/*.o lookups/*.a auths/*.o auths/*.a \
     routers/*.o routers/*.a transports/*.o transports/*.a \
     pcre/*.o pcre/*.a


 clean_exim:; cd build-$(buildname); \
-     /bin/rm -f *.o lookups/*.o lookups/*.a auths/*.o auths/*.a \
+    $(RM_COMMAND) -f *.o lookups/*.o lookups/*.a auths/*.o auths/*.a \
     routers/*.o routers/*.a transports/*.o transports/*.a


 # End of top-level makefile
diff --rec --unif exim-4.52/OS/Makefile-Base exim/OS/Makefile-Base
--- exim-4.52/OS/Makefile-Base    2005-07-01 11:09:15.000000000 +0000
+++ exim/OS/Makefile-Base    2005-09-03 22:01:20.000000000 +0000
@@ -665,7 +665,7 @@


 buildlookups:
      @cd lookups; $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-       FE="$(FE)" RANLIB="$(RANLIB)" HDRS="$(PHDRS)" \
+       FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \
        INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE) $(LOOKUP_INCLUDE)"; \
      echo " "


@@ -673,7 +673,7 @@

 buildrouters:
      @cd routers; $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-       FE="$(FE)" RANLIB="$(RANLIB)" HDRS="$(PHDRS)" \
+       FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \
        INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)"; \
      echo " "


@@ -681,7 +681,7 @@

 buildtransports:
      @cd transports; $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-       FE="$(FE)" RANLIB="$(RANLIB)" HDRS="$(PHDRS)" \
+       FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \
        INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)"; \
      echo " "


@@ -689,7 +689,7 @@

 buildauths:
      @cd auths; $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \
-       FE="$(FE)" RANLIB="$(RANLIB)" HDRS="$(PHDRS)" \
+       FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \
        INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)"; \
      echo " "


diff --rec --unif exim-4.52/src/auths/Makefile exim/src/auths/Makefile
--- exim-4.52/src/auths/Makefile    2005-07-01 11:09:15.000000000 +0000
+++ exim/src/auths/Makefile    2005-09-03 22:02:10.000000000 +0000
@@ -12,11 +12,11 @@
       cram_md5.o cyrus_sasl.o plaintext.o pwcheck.o sha1.o auth-spa.o spa.o


 auths.a:         $(OBJ)
-         @/bin/rm -f auths.a
+         @$(RM_COMMAND) -f auths.a
          @echo "$(AR) auths.a"
          $(FE)$(AR) auths.a $(OBJ)
          $(RANLIB) $@
-         @/bin/rm -rf ../drtables.o
+         @$(RM_COMMAND) -rf ../drtables.o


 .SUFFIXES:       .o .c
 .c.o:;           @echo "$(CC) $*.c"
diff --rec --unif exim-4.52/src/lookups/Makefile exim/src/lookups/Makefile
--- exim-4.52/src/lookups/Makefile    2005-07-01 11:09:15.000000000 +0000
+++ exim/src/lookups/Makefile    2005-09-03 22:02:06.000000000 +0000
@@ -10,11 +10,11 @@
       lf_quote.o


 lookups.a:       $(OBJ)
-         @/bin/rm -f lookups.a
+         @$(RM_COMMAND) -f lookups.a
          @echo "$(AR) lookups.a"
          @$(AR) lookups.a $(OBJ)
          $(RANLIB) $@
-         @/bin/rm -rf ../drtables.o
+         @$(RM_COMMAND) -rf ../drtables.o


 .SUFFIXES:       .o .c
 .c.o:;           @echo "$(CC) $*.c"
diff --rec --unif exim-4.52/src/routers/Makefile exim/src/routers/Makefile
--- exim-4.52/src/routers/Makefile    2005-07-01 11:09:15.000000000 +0000
+++ exim/src/routers/Makefile    2005-09-03 22:01:58.000000000 +0000
@@ -14,11 +14,11 @@
       rf_set_ugid.o


 routers.a:       $(OBJ)
-         @/bin/rm -f routers.a
+         @$(RM_COMMAND) -f routers.a
          @echo "$(AR) routers.a"
          @$(AR) routers.a $(OBJ)
          $(RANLIB) $@
-         @/bin/rm -rf ../drtables.o
+         @$(RM_COMMAND) -rf ../drtables.o


 .SUFFIXES:       .o .c
 .c.o:;           @echo "$(CC) $*.c"
diff --rec --unif exim-4.52/src/transports/Makefile exim/src/transports/Makefile
--- exim-4.52/src/transports/Makefile    2005-07-01 11:09:15.000000000 +0000
+++ exim/src/transports/Makefile    2005-09-03 22:01:53.000000000 +0000
@@ -7,11 +7,11 @@
 OBJ = appendfile.o autoreply.o lmtp.o pipe.o smtp.o tf_maildir.o


 transports.a:    $(OBJ)
-         @/bin/rm -f transports.a
+         @$(RM_COMMAND) -f transports.a
          @echo "$(AR) transports.a"
          @$(AR) transports.a $(OBJ)
          $(RANLIB) $@
-         @/bin/rm -rf ../drtables.o
+         @$(RM_COMMAND) -rf ../drtables.o


 .SUFFIXES:       .o .c
 .c.o:;           @echo "$(CC) $*.c"