[AD] plugins.h fix

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


I submitted this patch about a month ago but promptly forgot about it. Can it be applied? It removes the need for platform specific plugins.h and keeps the header file in tools/ instead of obj/. The only questionable thing might be how the various scripts in misc/ produce plugins.h in the current make system.


Index: tools/datedit.c
===================================================================
--- tools/datedit.c	(revision 5633)
+++ tools/datedit.c	(working copy)
@@ -102,29 +102,7 @@
    int done, i;
    AL_CONST char *prop_types;
 
-   #if defined ALLEGRO_DJGPP
-      #include "obj/djgpp/plugins.h"
-   #elif defined ALLEGRO_MSVC
-      #include "obj/msvc/plugins.h"
-   #elif defined ALLEGRO_WATCOM
-      #include "obj/watcom/plugins.h"
-   #elif defined ALLEGRO_UNIX
-      #include "obj/unix/plugins.h"
-   #elif defined ALLEGRO_MINGW32
-      #include "obj/mingw32/plugins.h"
-   #elif defined ALLEGRO_BEOS
-      #include "obj/beos/plugins.h"
-   #elif defined ALLEGRO_BCC32
-      #include "obj/bcc32/plugins.h"
-   #elif defined ALLEGRO_MPW
-      #include "::obj:mpw:plugins.h"
-   #elif defined ALLEGRO_MACOSX
-      #include "obj/macosx/plugins.h"
-   #elif defined ALLEGRO_QNX
-      #include "obj/qnx/plugins.h"
-   #else
-      #error unknown platform
-   #endif
+   #include "plugins.h"
 
    do {
       done = TRUE;
Index: misc/zipwin.sh
===================================================================
--- misc/zipwin.sh	(revision 5633)
+++ misc/zipwin.sh	(working copy)
@@ -167,7 +167,7 @@
 s/\\//\\\\/g
 
 # make sure were are using command.com copy, rather than cp
-s/^.*cat tools.*msvc.plugins.h/copy \/B tools\\\\plugins\\\\*.inc obj\\\\msvc\\\\plugins.h/
+s/^.*cat tools.*msvc.plugins.h/copy \/B tools\\\\plugins\\\\*.inc tools\\\\plugins\\\\plugins.h/
 
 # add blank lines, to make the batch output more readable
 s/^\([^@]*\)$/\\
Index: misc/depdlib.sh
===================================================================
--- misc/depdlib.sh	(revision 5633)
+++ misc/depdlib.sh	(working copy)
@@ -146,6 +146,6 @@
 # Special rule to create the plugins.h file
 inc_files=`echo tools/plugins/*.inc | sed 's,tools/plugins/,$(srcdir)/tools/plugins/,g'`
 echo "\$(OBJDIR)/plugins.h: $inc_files"
-echo "	cat $inc_files > \$(OBJDIR)/plugins.h"
+echo "	cat $inc_files > tools/plugins/plugins.h"
 echo ""
 


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