1 /* Copyright (C) 2002 Free Software Foundation, Inc. */ 2 3 /* { dg-do preprocess } */ 4 /* { dg-options "-dN -M" } */ 5 6 /* Test -dN -M does not fail. It should print just 7 the Makefile rule with dependencies. */ 8 9 #define foo bar 10 #define funlike(like) fun like 11 int variable; 12 13 /* { dg-final { if ![file exists cmdlne-dN-M.i] { return } } } 14 { dg-final { if { [grep cmdlne-dN-M.i "^#define foo"] != "" } { fail "cmdlne-dN-M.c: #define line printed" } } } 15 { dg-final { if { [grep cmdlne-dN-M.i "variable"] != "" } { fail "cmdlne-dN-M.c: non-#define line printed" } } } 16 { dg-final { if { [grep cmdlne-dN-M.i "^cmdlne-dN-M.*:.*cmdlne-dN-M.c"] == "" } { xfail "cmdlne-dN-M.c: dependency rule not printed" } } } 17 { dg-final { return } } */ 18