From 22b6d3f6230e0c23101332aa0ee13d4f9ee28252 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 16 Sep 2005 01:47:57 +0200 Subject: [PATCH 1/4] Uhm, don't autogenerate po/Makefile. --- configure.in | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.in b/configure.in index b90c7847c..5b03a1f3f 100644 --- a/configure.in +++ b/configure.in @@ -1267,7 +1267,6 @@ AC_OUTPUT([ \ contrib/lua/hooks.lua \ contrib/conv/w3m2links.awk \ doc/Makefile \ - po/Makefile \ src/Makefile \ src/bfu/Makefile \ src/bookmarks/Makefile \ From 204bbe5d2c7f48511de7a5c820e8fffa581f0b7a Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 16 Sep 2005 02:07:36 +0200 Subject: [PATCH 2/4] Fix starting a build from a subdirectory ELBuild-wise Now all the submakefiles contain informationa buot where in the directory hierarchy they stay. --- Makefile | 8 +++----- Makefile.lib | 2 +- doc/man/Makefile | 5 +++-- doc/man/man1/Makefile | 5 +++-- doc/man/man5/Makefile | 5 +++-- po/Makefile | 5 +++-- src/cache/Makefile | 5 +++-- src/config/Makefile | 5 +++-- src/ecmascript/Makefile | 5 +++-- src/ecmascript/spidermonkey/Makefile | 5 +++-- src/formhist/Makefile | 5 +++-- src/globhist/Makefile | 5 +++-- src/session/Makefile | 5 +++-- 13 files changed, 37 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index 00b081791..52da867af 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,5 @@ -include Makefile.config -# This should be _really_ ., but only after we have src/Makefile. -# Otherwise, it wouldn't be set right in the submakefiles. -path_to_top = .. +path_to_top = . +include $(path_to_top)/Makefile.config # TODO: Automagically rerun autoconf. @@ -11,4 +9,4 @@ SUBDIRS = doc po src clean-l: rm -rf features.log -include Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/Makefile.lib b/Makefile.lib index aec1def47..281959cfe 100644 --- a/Makefile.lib +++ b/Makefile.lib @@ -32,7 +32,7 @@ quiet_cmd_archive = '[AR] $@' # Recursive make quiet_cmd_recmake = "[MAKE $$target] $$subdir" - cmd_recmake = $(MAKE) -C $$subdir $$target path_to_top="$(path_to_top)/.." + cmd_recmake = $(MAKE) -C $$subdir $$target diff --git a/doc/man/Makefile b/doc/man/Makefile index eb43df3a3..4244e78a2 100644 --- a/doc/man/Makefile +++ b/doc/man/Makefile @@ -1,5 +1,6 @@ -include ../../Makefile.config +path_to_top=../.. +include $(path_to_top)/Makefile.config SUBDIRS = man1 man5 -include ../../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/doc/man/man1/Makefile b/doc/man/man1/Makefile index 50a80c6a0..24108a104 100644 --- a/doc/man/man1/Makefile +++ b/doc/man/man1/Makefile @@ -1,6 +1,7 @@ -include ../../../Makefile.config +path_to_top=../../.. +include $(path_to_top)/Makefile.config install-l: $(INSTALL_DATA) elinks.1 $(DESTDIR)$(mandir)/man1 -include ../../../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/doc/man/man5/Makefile b/doc/man/man5/Makefile index 04acf0ffd..7a68cfe43 100644 --- a/doc/man/man5/Makefile +++ b/doc/man/man5/Makefile @@ -1,7 +1,8 @@ -include ../../../Makefile.config +path_to_top=../../.. +include $(path_to_top)/Makefile.config install-l: $(INSTALL_DATA) elinks.conf.5 $(DESTDIR)$(mandir)/man5 $(INSTALL_DATA) elinkskeys.5 $(DESTDIR)$(mandir)/man5 -include ../../../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/po/Makefile b/po/Makefile index 6ad1b7927..5bc21df84 100644 --- a/po/Makefile +++ b/po/Makefile @@ -1,4 +1,5 @@ -include ../Makefile.config +path_to_top=.. +include $(path_to_top)/Makefile.config # Where to install the catalog files. localedir = $(datadir)/locale @@ -129,4 +130,4 @@ dist: update-po distdir clean: rm -f $(PACKAGE).po *.new.po -include ../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/src/cache/Makefile b/src/cache/Makefile index 3f5c40dc0..b0ebcf525 100644 --- a/src/cache/Makefile +++ b/src/cache/Makefile @@ -1,8 +1,9 @@ -include ../../Makefile.config +path_to_top=../.. +include $(path_to_top)/Makefile.config OBJS = cache.o dialogs.o all-l: libcache.a libcache.a: $(OBJS) -include ../../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/src/config/Makefile b/src/config/Makefile index 3eac8ae8b..3d4d6734d 100644 --- a/src/config/Makefile +++ b/src/config/Makefile @@ -1,8 +1,9 @@ -include ../../Makefile.config +path_to_top=../.. +include $(path_to_top)/Makefile.config OBJS = cmdline.o conf.o dialogs.o home.o kbdbind.o options.o opttypes.o timer.o urlhist.o all-l: libconfig.a libconfig.a: $(OBJS) -include ../../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/src/ecmascript/Makefile b/src/ecmascript/Makefile index edf019d5c..1831a10c8 100644 --- a/src/ecmascript/Makefile +++ b/src/ecmascript/Makefile @@ -1,4 +1,5 @@ -include ../../Makefile.config +path_to_top=../.. +include $(path_to_top)/Makefile.config INCLUDES += $(SPIDERMONKEY_CFLAGS) SUBDIRS = spidermonkey @@ -9,4 +10,4 @@ OBJS = ecmascript.o spidermonkey.o $(foreach obj,$(SM_OBJS),spidermonkey/$(obj)) all-l: libecmascript.a libecmascript.a: $(OBJS) -include ../../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/src/ecmascript/spidermonkey/Makefile b/src/ecmascript/spidermonkey/Makefile index 9fd3a7047..c052e052c 100644 --- a/src/ecmascript/spidermonkey/Makefile +++ b/src/ecmascript/spidermonkey/Makefile @@ -1,4 +1,5 @@ -include ../../../Makefile.config +path_to_top=../../.. +include $(path_to_top)/Makefile.config INCLUDES += $(SPIDERMONKEY_CFLAGS) # Do not forget to also add the .o to ../Makefile. Yes, it sucks. @@ -6,4 +7,4 @@ OBJS = document.o form.o location.o navigator.o unibar.o window.o all-l: $(OBJS) -include ../../../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/src/formhist/Makefile b/src/formhist/Makefile index fd9907180..641bdeafb 100644 --- a/src/formhist/Makefile +++ b/src/formhist/Makefile @@ -1,8 +1,9 @@ -include ../../Makefile.config +path_to_top=../.. +include $(path_to_top)/Makefile.config OBJS = formhist.o dialogs.o all-l: libformhist.a libformhist.a: $(OBJS) -include ../../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/src/globhist/Makefile b/src/globhist/Makefile index 1c2214922..1327c69ec 100644 --- a/src/globhist/Makefile +++ b/src/globhist/Makefile @@ -1,8 +1,9 @@ -include ../../Makefile.config +path_to_top=../.. +include $(path_to_top)/Makefile.config OBJS = globhist.o dialogs.o all-l: libglobhist.a libglobhist.a: $(OBJS) -include ../../Makefile.lib +include $(path_to_top)/Makefile.lib diff --git a/src/session/Makefile b/src/session/Makefile index ca21b32e1..1495d6231 100644 --- a/src/session/Makefile +++ b/src/session/Makefile @@ -1,8 +1,9 @@ -include ../../Makefile.config +path_to_top=../.. +include $(path_to_top)/Makefile.config OBJS = download.o history.o location.o session.o task.o all-l: libsession.a libsession.a: $(OBJS) -include ../../Makefile.lib +include $(path_to_top)/Makefile.lib From 261fdb5326842f0d69fb77db734b4c1888ed3832 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 16 Sep 2005 02:54:38 +0200 Subject: [PATCH 3/4] Fix building of .gmo files --- po/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/po/Makefile b/po/Makefile index 5bc21df84..285bb90d5 100644 --- a/po/Makefile +++ b/po/Makefile @@ -12,6 +12,7 @@ POTFILES_ABS = $(shell cd $(top_srcdir); find src/ -name '*.[ch]' -o -name optio SUFFIXES = .po .gmo .mo +.SUFFIXES: .gmo .mo .po .po.mo: $(MSGFMT) -o $@ $< From 39bddb75629983932ece3de57975048edc2bbcc7 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 16 Sep 2005 02:55:13 +0200 Subject: [PATCH 4/4] Properly set $(srcdir) Should fix building outside of source tree and making po/. --- Makefile.config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.config.in b/Makefile.config.in index de17972bf..225032001 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -6,6 +6,7 @@ SHELL = @SHELL@ top_srcdir = $(path_to_top)/@top_srcdir@ +srcdir = $(top_srcdir)/$(shell pwd | sed 's!.*/\($(shell echo $(path_to_top) | sed 's!\.\.![^/]*!')\)$$!\1!') top_builddir = $(path_to_top) prefix = @prefix@ exec_prefix = @exec_prefix@