summaryrefslogtreecommitdiff
path: root/gcc/Makefile.in
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 13:56:12 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-14 13:56:12 +0000
commit1fdf44f0f9ff1fd0540323b1ea0d9a14f5b77673 (patch)
tree1d3285b2f57ab16f7f07a313761dda7c317de69a /gcc/Makefile.in
parentbdf062ba05197f59cb222693f810bc144bf3d732 (diff)
downloadgcc-1fdf44f0f9ff1fd0540323b1ea0d9a14f5b77673.tar.gz
2010-10-14 Jeremie Salvucci <jeremie.salvucci@free.fr>
Basile Starynkevitch <basile@starynkevitch.net> * gcc/gengtype.c: Include getopt.h and version.h. (lang_bitmap, struct outf, outf_p) (get_output_file_with_visibility, oprintf): Definitions moved to gengtype.h (output_files, header_file, srcdir, srcdir_len, this_file) (do_dump): No more static variables. (do_debug): New. (dbgprint_count_type_at): Added new function. (gengtype_long_options): New. (print_usage, print_version, parse_program_options): New. (main): Call parse_program_options, and removed old option handling code. Added some debug output. * gcc/gengtype.h: Updated copyright year. (lang_bitmap, struct outf, outf_p, header_file, oprintf) (get_output_file_with_visibility, srcdir, srcdir_len, do_dump): Moved from gengtype.c to here. (do_debug, read_state_filename, write_state_filename): New variables. (DBGPRINTF, DBGPRINT_COUNT_TYPE): New macros. * gcc/Makefile.in: (REVISION): Always defined. (version.o): Removed ifdef REVISION_c. (s-gtype): Pass arguments to build/gengtype program. (build/version.o): Added building rule. (build/gengtype$(build_exeext)): Added build/version.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r--gcc/Makefile.in20
1 files changed, 14 insertions, 6 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index a58f0265436..fd27cf74037 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -837,6 +837,7 @@ DATESTAMP_c := $(shell cat $(DATESTAMP))
ifeq (,$(wildcard $(REVISION)))
REVISION_c :=
+REVISION :=
else
REVISION_c := $(shell cat $(REVISION))
endif
@@ -2249,11 +2250,7 @@ gcc-options.o: options.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) opts.h intl
dumpvers: dumpvers.c
-ifdef REVISION_c
version.o: version.c version.h $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
-else
-version.o: version.c version.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
-endif
$(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
-DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
-DREVISION=$(REVISION_s) \
@@ -3807,7 +3804,7 @@ s-gtyp-input: Makefile
s-gtype: build/gengtype$(build_exeext) $(filter-out [%], $(GTFILES)) \
gtyp-input.list
- $(RUN_GEN) build/gengtype$(build_exeext) $(srcdir) gtyp-input.list
+ $(RUN_GEN) build/gengtype$(build_exeext) -S $(srcdir) -I gtyp-input.list
$(STAMP) s-gtype
generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \
@@ -3827,6 +3824,16 @@ build/%.o : # dependencies provided by explicit rule later
$(COMPILER_FOR_BUILD) -c $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) \
-o $@ $<
+## build/version.o is compiled by the $(COMPILER_FOR_BUILD) but needs
+## several C macro definitions, just like version.o
+build/version.o: version.c version.h \
+ $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE)
+ $(COMPILER_FOR_BUILD) -c $(BUILD_COMPILERFLAGS) $(BUILD_CPPFLAGS) \
+ -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
+ -DREVISION=$(REVISION_s) \
+ -DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
+ -DBUGURL=$(BUGURL_s) -o $@ $<
+
# Header dependencies for the programs that generate source code.
# These are library modules...
build/errors.o : errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
@@ -3936,7 +3943,8 @@ genprog = $(genprogerr) check checksum condmd
build/genautomata$(build_exeext) : BUILD_LIBS += -lm
# These programs are not linked with the MD reader.
-build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o
+build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
+ build/version.o
# Rule for the generator programs:
$(genprog:%=build/gen%$(build_exeext)): build/gen%$(build_exeext): build/gen%.o $(BUILD_LIBDEPS)