From: Adam Heath Date: Mon, 20 May 2002 04:40:25 +0000 (+0000) Subject: Add rules to Makefile.conf, to rebuild Makefile if $(srcdir)/Makefile.in is X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b3399486eaafc36336eadd7dc10fea44548e9f3;p=dpkg Add rules to Makefile.conf, to rebuild Makefile if $(srcdir)/Makefile.in is modified. This also required adding a 'default' target to all Makefiles. --- diff --git a/ChangeLog b/ChangeLog index e8798f05..697da806 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun May 19 23:39:02 CDT 2002 Adam Heath + + * , Makefile.conf.in: Add rules to Makefile.conf, to + rebuild Makefile if $(srcdir)/Makefile.in is modified. This also + required adding a 'default' target to all Makefiles. + Sun, 19 May 2002 22:56:41 -0500 Adam Heath * utils/md5sum.c: Fairly heavy work(net no lines changed), to fix diff --git a/Makefile.conf.in b/Makefile.conf.in index cfc55900..d785fe6a 100644 --- a/Makefile.conf.in +++ b/Makefile.conf.in @@ -34,6 +34,13 @@ sysconfdir = @sysconfdir@ dpkgconfdir = $(sysconfdir)/$(PACKAGE) alternativesdir = $(sysconfdir)/alternatives +abs_builddir = @abs_builddir@ +top_srcdir = @top_srcdir@ +ifeq ($(strip $(srcdir)),$(strip $(top_srcdir))) +subdir = +else +subdir = $(patsubst $(top_srcdir)/%,%,$(srcdir))/ +endif PERL = @PERL@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs LN = @LN_S@ @@ -78,3 +85,10 @@ ALSO_STATIC = @ALSO_STATIC@ .cc.o: $(CXX) $(ALL_CXXFLAGS) -c $< + +Makefile: $(srcdir)/Makefile.in + (cd $(abs_builddir);CONFIG_FILES=$(subdir)$@ $(abs_builddir)/config.status) + +foobar: + @echo "srcdir='$(srcdir)'" + @echo "subdir='$(subdir)'" diff --git a/Makefile.in b/Makefile.in index dd4fb5da..fe3a7616 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,6 +6,7 @@ VERSION = $(shell cat version-nr) GENFILES = version.h +default: all include Makefile.conf SUBDIRS = include optlib lib intl dpkg-deb split scripts utils main \ diff --git a/doc/Makefile.in b/doc/Makefile.in index c9850480..331dcd3b 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -2,6 +2,8 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all + include ../Makefile.conf ifeq (@USE_SGML_DOC@, true) diff --git a/dpkg-deb/Makefile.in b/dpkg-deb/Makefile.in index f68ec757..8bbd2c51 100644 --- a/dpkg-deb/Makefile.in +++ b/dpkg-deb/Makefile.in @@ -5,6 +5,8 @@ top_srcdir = @top_srcdir@ top_builddir = .. +default: all + include ../Makefile.conf diff --git a/dselect/Makefile.in b/dselect/Makefile.in index b98d73a9..d82f763a 100644 --- a/dselect/Makefile.in +++ b/dselect/Makefile.in @@ -3,6 +3,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. +default: all include ../Makefile.conf CXX_SOURCES = basecmds.cc baselist.cc basetop.cc bindings.cc curkeys.cc \ diff --git a/include/Makefile.in b/include/Makefile.in index 56278a73..ead2b585 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -4,6 +4,7 @@ srcdir = @srcdir@ GENFILES = dpkg.h +default: all include ../Makefile.conf all:: $(GENFILES) diff --git a/lib/Makefile.in b/lib/Makefile.in index 7d90e4b9..05b91e57 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -3,6 +3,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../Makefile.conf SOURCES = compat.c database.c dbmodify.c dump.c ehandle.c fields.c \ diff --git a/main/Makefile.in b/main/Makefile.in index 0c691c5b..be91254a 100644 --- a/main/Makefile.in +++ b/main/Makefile.in @@ -3,6 +3,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. +default: all include ../Makefile.conf SOURCES = main.c enquiry.c filesdb.c archives.c processarc.c \ diff --git a/man/Makefile.in b/man/Makefile.in index 888b7f92..cc92c2eb 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -4,6 +4,7 @@ top_srcdir = @top_srcdir@ SUBDIRS = de en fr ja pt_BR ru sv +default: all include ../Makefile.conf clean: clean-recursive diff --git a/man/de/Makefile.in b/man/de/Makefile.in index 332f5832..b727a509 100644 --- a/man/de/Makefile.in +++ b/man/de/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../../Makefile.conf deman1dir = $(subst $(mandir),$(mandir)/de,$(man1dir)) diff --git a/man/en/Makefile.in b/man/en/Makefile.in index 4359d35b..3bba3c5a 100644 --- a/man/en/Makefile.in +++ b/man/en/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../../Makefile.conf MAN5PAGES = deb-control.5 deb-old.5 deb.5 dpkg.cfg.5 dselect.cfg.5 diff --git a/man/fr/Makefile.in b/man/fr/Makefile.in index dbfe7752..3c693ea0 100644 --- a/man/fr/Makefile.in +++ b/man/fr/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../../Makefile.conf frman1dir = $(subst $(mandir),$(mandir)/fr,$(man1dir)) diff --git a/man/ja/Makefile.in b/man/ja/Makefile.in index 7d55a0e6..d2d97595 100644 --- a/man/ja/Makefile.in +++ b/man/ja/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../../Makefile.conf jaman1dir = $(subst $(mandir),$(mandir)/ja,$(man1dir)) diff --git a/man/pt_BR/Makefile.in b/man/pt_BR/Makefile.in index 8dd5e288..d1c93488 100644 --- a/man/pt_BR/Makefile.in +++ b/man/pt_BR/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../../Makefile.conf ptman8dir = $(subst $(mandir),$(mandir)/pt_BR,$(man8dir)) diff --git a/man/ru/Makefile.in b/man/ru/Makefile.in index 8f71b5d7..ae87df5c 100644 --- a/man/ru/Makefile.in +++ b/man/ru/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../../Makefile.conf ruman1dir = $(subst $(mandir),$(mandir)/ru,$(man1dir)) diff --git a/man/sv/Makefile.in b/man/sv/Makefile.in index 47d2f2b0..d2fce89a 100644 --- a/man/sv/Makefile.in +++ b/man/sv/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../../Makefile.conf svman1dir = $(subst $(mandir),$(mandir)/sv,$(man1dir)) diff --git a/methods/Makefile.in b/methods/Makefile.in index 4fc6f3ce..e002748f 100644 --- a/methods/Makefile.in +++ b/methods/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../Makefile.conf # Available methods diff --git a/optlib/Makefile.in b/optlib/Makefile.in index 469ba07a..bbaa8061 100644 --- a/optlib/Makefile.in +++ b/optlib/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../Makefile.conf SOURCES = getopt.c getopt1.c long-options.c closeout.c obstack.c diff --git a/scripts/Makefile.in b/scripts/Makefile.in index b985cf93..a0c56806 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -2,6 +2,7 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +default: all include ../Makefile.conf BIN_SCRIPTS = dpkg-name dpkg-source dpkg-genchanges \ diff --git a/split/Makefile.in b/split/Makefile.in index 5d8b900c..f4e14ffc 100644 --- a/split/Makefile.in +++ b/split/Makefile.in @@ -2,8 +2,8 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ -top_builddir = .. +default: all include ../Makefile.conf SPLIT_SOURCES = queue.c split.c info.c join.c main.c diff --git a/utils/Makefile.in b/utils/Makefile.in index 0f5227c8..f2395865 100644 --- a/utils/Makefile.in +++ b/utils/Makefile.in @@ -2,8 +2,8 @@ VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ -top_builddir = .. +default: all include ../Makefile.conf CFLAGS += -I$(top_srcdir)/optlib