Re: [AD] Makefile issues

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I've had reports that under OSX 10.1.x the "rm" command doesn't support
> the -v (verbose) switch. So the "clean" target in makefile.all gives
> problems... How can I fix this? The quickest solution would be to remove
> the -v option from there, but is it safe to do so? Otherwise I suppose
> we'd need to make makefile.all aware of the problem by setting some
> dedicated definition. What do you propose?

Try the attached patch. If it fits your needs, you can commit it alongside 
the related modification to makefile.osx .

-- 
Eric Botcazou
Index: makefile.all
===================================================================
RCS file: /cvsroot/alleg/allegro/makefile.all,v
retrieving revision 1.36
diff -u -r1.36 makefile.all
--- makefile.all	10 May 2003 09:54:57 -0000	1.36
+++ makefile.all	12 Jun 2003 20:52:48 -0000
@@ -90,6 +90,11 @@
 
 include $(MAKEFILE_INC)
 
+# rm doesn't support -v on Darwin
+ifndef RM_OPTS
+RM_OPTS = -fv
+endif
+
 
 
 # -------- list what objects and programs we need to build --------
@@ -192,8 +197,8 @@
 
 clean:
 ifdef UNIX_TOOLS
-	-rm -fv $(OBJ_CLEAN_FILES)
-	-rm -fv $(OTHER_CLEAN_FILES)
+	-rm $(RM_OPTS) $(OBJ_CLEAN_FILES)
+	-rm $(RM_OPTS) $(OTHER_CLEAN_FILES)
 else
    define RM_CLEAN
       $(foreach file, $(wildcard $(OBJ_CLEAN_FILES)), -del $(subst /,\,$(file))
@@ -206,7 +211,7 @@
 
 distclean: clean
 ifdef UNIX_TOOLS
-	-rm -fv $(DISTCLEAN_FILES)
+	-rm $(RM_OPTS) $(DISTCLEAN_FILES)
 else
    define RM_DISTCLEAN
       $(foreach file, $(wildcard $(DISTCLEAN_FILES)), -del $(subst /,\,$(file))
@@ -217,7 +222,7 @@
 
 veryclean: distclean
 ifdef UNIX_TOOLS
-	-rm -fv $(VERYCLEAN_FILES)
+	-rm $(RM_OPTS) $(VERYCLEAN_FILES)
 else
    define RM_VERYCLEAN
       $(foreach file, $(wildcard $(VERYCLEAN_FILES)), -del $(subst /,\,$(file))


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/