Commit 8efc91cd by Mike Stump

darwin.h: Make pretty.

	* config/darwin.h: Make pretty.
	* config/t-darwin (config/darwin.h.rebuild): Add.
	(build/slashify): Add.
	* config/slashify.c: Add.

From-SVN: r170097
parent d65dd7dc
2011-02-12 Mike Stump <mikestump@comcast.net>
* config/darwin.h: Make pretty.
* config/t-darwin (config/darwin.h.rebuild): Add.
(build/slashify): Add.
* config/slashify.c: Add.
2011-02-12 Joseph Myers <joseph@codesourcery.com> 2011-02-12 Joseph Myers <joseph@codesourcery.com>
PR driver/45731 PR driver/45731
...@@ -46,7 +53,7 @@ ...@@ -46,7 +53,7 @@
2011-02-12 Iain Sandoe <iains@gcc.gnu.org> 2011-02-12 Iain Sandoe <iains@gcc.gnu.org>
* config/darwin.c (darwin_override_options): Add a hunk missed * config/darwin.c (darwin_override_options): Add a hunk missed
from the commit of r168571. Trim comment line lengths and from the commit of r168571. Trim comment line lengths and
correct indents of the preceding block. correct indents of the preceding block.
2011-02-12 Iain Sandoe <iains@gcc.gnu.org> 2011-02-12 Iain Sandoe <iains@gcc.gnu.org>
......
/* Generate a slashified version of the input
Copyright (C) 2011
Free Software Foundation, Inc.
Contributed by Mike Stump <mikestump@comcast.net>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* This is a small utility to slashify a source file so that one never
needs to stare at backslashes. */
#include <stdio.h>
extern int main (int, char **);
int main (int argc, char **argv) {
int c,c1;
int saw_start = 0;
while ((c=getchar ()) != EOF) {
if (c != '@') {
if (saw_start && c == '\n') {
putchar ('\\');
}
putchar (c);
continue;
}
c1=getchar();
if (c1 == EOF) {
putchar (c);
return 0;
}
if (!saw_start && c1 == '(') {
saw_start = 1;
} else if (saw_start && c1 == ')') {
saw_start = 0;
} else {
putchar (c);
putchar (c1);
}
}
return 0;
}
...@@ -17,6 +17,20 @@ ...@@ -17,6 +17,20 @@
# along with GCC; see the file COPYING3. If not see # along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>. # <http://www.gnu.org/licenses/>.
build/slashify: $(srcdir)/config/slashify.c
$(COMPILER_FOR_BUILD) $< -o $@
$(srcdir)/config/darwin.h: config/darwin.h.rebuild
config/darwin.h.rebuild: build/slashify
@if [ ! -e $(srcdir)/config/darwin.h \
-o $(srcdir)/config/darwin.h -nt config/darwin.h ]; then \
{ test -d config || mkdir config; } && \
cp -p $(srcdir)/config/darwin-sections.def \
config/darwin-sections.def && \
build/slashify < $(srcdir)/config/darwin.h >config/darwin.h; \
fi
darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(REAL_H) insn-config.h \ $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(REAL_H) insn-config.h \
conditions.h insn-flags.h output.h insn-attr.h flags.h $(TREE_H) expr.h \ conditions.h insn-flags.h output.h insn-attr.h flags.h $(TREE_H) expr.h \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment