DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2728
Version: 1.3-feature


Attached file "shadow-variables-test-program.patch"...


Link: http://www.fltk.org/str.php?L2728
Version: 1.3-feature
Index: Makefile
===================================================================
--- Makefile    (revision 9132)
+++ Makefile    (working copy)
@@ -80,6 +80,7 @@
        resize.cxx \
        rotated_text.cxx \
        scroll.cxx \
+       shadow_varaibles.cxx \
        shape.cxx \
        subwindow.cxx \
        sudoku.cxx \
@@ -190,6 +191,7 @@
        $(RM) keyboard_ui.cxx keyboard_ui.h
        $(RM) mandelbrot_ui.cxx mandelbrot_ui.h
        $(RM) preferences.cxx preferences.h
+       $(RM) shadow_variables.cxx
        $(RM) radio.cxx radio.h
        $(RM) resize.cxx resize.h
        $(RM) tabs.cxx tabs.h
@@ -484,6 +486,16 @@
        echo Linking $@...
        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ gl_overlay.o $(LINKFLTKGL) 
$(LINKFLTK) $(GLDLIBS)
 
+shadow_variables.cxx: .
+       echo '#include <stdio.h>' > shadow_variables.cxx
+       (cd ..; perl -e 'opendir(DIR,"FL/"); foreach(sort(readdir(DIR))) { if( 
/\.H$$/ && !/^mac.H$$/ && !/^win32.H$$/ && !/^x.H$$/) {print "#include 
<FL/$$_>\n"; } }' ) >> shadow_variables.cxx
+       echo 'int main() { printf("No errors.\n"); return(0); }' >> 
shadow_variables.cxx
+
+ifeq ($(CXX),g++)
+shadow_variables: shadow_variables.cxx
+       $(CXX) -Wshadow $(ARCHFLAGS) $(LDFLAGS) $< -o $@ $(LINKFLTK)
+endif
+
 shape$(EXEEXT): shape.o
        echo Linking $@...
        $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ shape.o $(LINKFLTKGL) $(LINKFLTK) 
$(GLDLIBS)
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to