Re: [AD] Makefile fix

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


Good point. Here's an updated patch.

Elias Pschernig wrote:

On Sat, 2004-05-15 at 19:53, Robert Jr Ohannessian wrote:

If no one complains, I'll apply it to mainline tomorrow (Sunday).




$(INSTALLDIR_U)/$(LIBDIR_U):
-	mkdir $(MKDIR_OPTS) $(INSTALLDIR_U)/$(LIBDIR_U)
+	mkdir -p $(MKDIR_OPTS) $(INSTALLDIR_U)/$(LIBDIR_U)



Um.. wouldn't it be easier to add -p to MKDIR_OPTS? Else the patch to
add MKDIR_OPTS was rather pointless :P

Index: makefile.all
===================================================================
RCS file: /cvsroot/alleg/allegro/makefile.all,v
retrieving revision 1.44
diff -u -b -r1.44 makefile.all
--- makefile.all	28 Jan 2004 12:53:55 -0000	1.44
+++ makefile.all	15 May 2004 18:41:08 -0000
@@ -97,6 +97,12 @@
 endif
 
 
+# mkdir should not fail if the directory already exists
+ifndef MKDIR_OPTS
+MKDIR_OPTS = -p
+endif
+
+
 
 # -------- list what objects and programs we need to build --------
 
@@ -297,38 +303,38 @@
 else
 
 $(INSTALLDIR_U)/$(LIBDIR_U):
-	md $(INSTALLDIR_D)\$(LIBDIR_D)
+	- md $(INSTALLDIR_D)\$(LIBDIR_D)
 
 $(INSTALLDIR_U)/$(INCDIR_U)/allegro/platform/%.h: include/allegro/platform/%.h $(INSTALLDIR_U)/$(INCDIR_U)/allegro/platform
 	copy $(subst /,\,$< $@)
 
 $(INSTALLDIR_U)/$(INCDIR_U)/allegro/platform: $(INSTALLDIR_U)/$(INCDIR_U)/allegro
-	md $(INSTALLDIR_D)\$(INCDIR_D)\allegro\platform
+	- md $(INSTALLDIR_D)\$(INCDIR_D)\allegro\platform
 
 $(INSTALLDIR_U)/$(INCDIR_U)/allegro/internal/%.h: include/allegro/internal/%.h $(INSTALLDIR_U)/$(INCDIR_U)/allegro/internal
 	copy $(subst /,\,$< $@)
 
 $(INSTALLDIR_U)/$(INCDIR_U)/allegro/internal: $(INSTALLDIR_U)/$(INCDIR_U)/allegro
-	md $(INSTALLDIR_D)\$(INCDIR_D)\allegro\internal
+	- md $(INSTALLDIR_D)\$(INCDIR_D)\allegro\internal
 
 $(INSTALLDIR_U)/$(INCDIR_U)/allegro/inline/%.inl: include/allegro/inline/%.inl $(INSTALLDIR_U)/$(INCDIR_U)/allegro/inline
 	copy $(subst /,\,$< $@)
 
 $(INSTALLDIR_U)/$(INCDIR_U)/allegro/inline: $(INSTALLDIR_U)/$(INCDIR_U)/allegro
-	md $(INSTALLDIR_D)\$(INCDIR_D)\allegro\inline
+	- md $(INSTALLDIR_D)\$(INCDIR_D)\allegro\inline
 
 $(INSTALLDIR_U)/$(INCDIR_U)/allegro/%.h: include/allegro/%.h $(INSTALLDIR_U)/$(INCDIR_U)/allegro
 	copy $(subst /,\,$< $@)
 
 $(INSTALLDIR_U)/$(INCDIR_U)/allegro: $(INSTALLDIR_U)/$(INCDIR_U)
-	-md $(INSTALLDIR_D)\$(INCDIR_D)\allegro 
+	- md $(INSTALLDIR_D)\$(INCDIR_D)\allegro 
 # workaround for a weird make problem
 
 $(INSTALLDIR_U)/$(INCDIR_U)/%.h: include/%.h $(INSTALLDIR_U)/$(INCDIR_U)
 	copy $(subst /,\,$< $@)
 
 $(INSTALLDIR_U)/$(INCDIR_U):
-	md $(INSTALLDIR_D)\$(INCDIR_D)
+	- md $(INSTALLDIR_D)\$(INCDIR_D)
 
 endif
 


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