diff options
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 9 | ||||
-rw-r--r-- | sim/common/Make-common.in | 18 |
2 files changed, 20 insertions, 7 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 9e1d300..bcf9242 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,12 @@ +2021-06-22 Mike Frysinger <vapier@gentoo.org> + + * Make-common.in (VPATH): Use $(srcdir). + (config.status): New variable. + (stamp-hw): Depend on $(config.status). + (Makefile): Likewise. Change rule based on SIM_COMMON_BUILD. + (config.status): Disable when SIM_COMMON_BUILD is true. + (.gdbinit): Likewise. + 2021-06-21 Mike Frysinger <vapier@gentoo.org> * Make-common.in: Move sim-hw settings to ../arch-subdir.mk.in. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 41becaa..4bf1e2e 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -34,12 +34,15 @@ ## COMMON_PRE_CONFIG_FRAG -VPATH = @srcdir@:$(srccom) srcdir = @srcdir@ +VPATH = $(srcdir):$(srccom) srccom = $(srcdir)/../common srcroot = $(srcdir)/../.. srcsim = $(srcdir)/.. +@SIM_COMMON_BUILD_FALSE@config.status = config.status +@SIM_COMMON_BUILD_TRUE@config.status = ../config.status + include $(srcroot)/gdb/silent-rules.mk # Helper code from gnulib. @@ -413,7 +416,7 @@ endif # FIXME This is one very simple-minded way of generating the file hw-config.h hw-config.h: stamp-hw ; @true -stamp-hw: Makefile.in $(srccom)/Make-common.in config.status Makefile +stamp-hw: Makefile.in $(srccom)/Make-common.in $(config.status) Makefile rm -f tmp-hw.h echo "/* generated by Makefile */" > tmp-hw.h sim_hw="$(SIM_HW_DEVICES)"; \ @@ -529,14 +532,15 @@ distclean maintainer-clean realclean: clean $(SIM_EXTRA_DISTCLEAN) # Dummy target to force execution of dependent targets. force: -Makefile: Makefile.in $(srccom)/Make-common.in config.status - CONFIG_HEADERS= $(SHELL) ./config.status +Makefile: Makefile.in $(srccom)/Make-common.in $(config.status) +@SIM_COMMON_BUILD_FALSE@ CONFIG_HEADERS= $(SHELL) ./config.status +@SIM_COMMON_BUILD_TRUE@ cd .. && $(SHELL) ./config.status $(arch)/Makefile -config.status: configure - $(SHELL) ./config.status --recheck +@SIM_COMMON_BUILD_FALSE@config.status: configure +@SIM_COMMON_BUILD_FALSE@ $(SHELL) ./config.status --recheck .gdbinit: # config.status $(srccom)/gdbinit.in - CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status +@SIM_COMMON_BUILD_FALSE@ CONFIG_FILES=$@:../common/gdbinit.in CONFIG_HEADERS= $(SHELL) ./config.status # CGEN support |