diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2006-08-31 17:03:23 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2006-08-31 17:03:23 -0700 |
commit | efa9283c1ec05d6bfee4bf5a1da803cd478eec78 (patch) | |
tree | 590d9d47b7017bcaf4615419ee85604759ec902c /v4l/Makefile | |
parent | bc012a5d7cbc29b620f4455f96d17d101e1af03a (diff) | |
download | mediapointer-dvb-s2-efa9283c1ec05d6bfee4bf5a1da803cd478eec78.tar.gz mediapointer-dvb-s2-efa9283c1ec05d6bfee4bf5a1da803cd478eec78.tar.bz2 |
Handle updating .config and Kconfig better
From: Trent Piepho <xyzzy@speakeasy.org>
Both .config and Kconfig are created at the same time by the same
program, make_kconfig.pl. make does not understand the concept of
a program which creates two targets and cannot handle this properly.
Everything works with this patch, but in some cases make -j will run
make_kconfig.pl twice at the same time. This works, one script will just
overwrite the output of the other, but it looks bad. Without make -j,
everything works as it should and make_kconfig.pl isn't run more than it
needs to be.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'v4l/Makefile')
-rw-r--r-- | v4l/Makefile | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/v4l/Makefile b/v4l/Makefile index 4637e9fac..963146eaa 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -74,6 +74,9 @@ endif # make will try to automatically rebuild the Makefile and all includes, # and if any of them change, make will start over with the updated files +.myconfig: .config Kconfig + ./scripts/make_myconfig.pl + # If it doesn't exist, this rule will build Makefile.media. If it does # exist, it will have dependency information in it, and only be rebuilt # when necessary. @@ -297,19 +300,23 @@ LXDIALOG_DIR := $(shell if [ -d $(KDIR)/scripts/kconfig/lxdialog ]; then echo kc LXDIALOG_LNK := $(if $(LXDIALOG_DIR),scripts/kconfig,scripts/lxdialog) LXDIALOG := $(KDIR)/scripts/$(LXDIALOG_DIR)lxdialog/lxdialog -# Rule to make a .config if one doesn't exist -# Ideally, some kind of oldconfig process would be used +# Ideally, some kind of oldconfig process would be used to update .config +# without destroying the user's configuration. Lacking that, we will +# just touch .config if it already exists, and run make_kconfig if it +# doesn't. .config: .version - @echo "Creating default .config file" - ./scripts/make_kconfig.pl $(KDIR) - @touch .config - -.myconfig: .config Kconfig - ./scripts/make_myconfig.pl + @echo Updating/Creating .config + @if [ -e .config ]; then touch .config ; else \ + ./scripts/make_kconfig.pl $(KDIR) ; fi Kconfig: .version ./scripts/make_kconfig.pl $(KDIR) +# With make -j, it's possible that both the .config and Kconfig rules +# will run at the same time, running make_kconfig.pl twice. There +# doesn't appear to be any way around this, but it doesn't cause a +# failure. One make_kconfig.pl will just overwrite the other's output. + xconfig:: $(QCONF) Kconfig $(QCONF) Kconfig |