1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-02 20:04:15 +01:00

Fix path substitutions

Autoconf uses multiple levels of variables when defining paths. For
example, ${datadir} by default is ${datarootdir}, which by default is
${prefix}/share, which by default is /usr/local. Substituting from
./configure, as is done by AC_DEFINE or AC_DEFINE_UNQUOTED, does not
expand all these variables. This was causing some of our defines to have
garbage like "${prefix}/share/pixmaps" rather than the intended
"/usr/local/share/pixmaps".

The solution is to generate the files needing these paths from the
Makefile rather than from ./configure, because make does fully expand
all those levels.

Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
This commit is contained in:
Brad Jorsch
2010-09-29 16:12:33 -04:00
committed by Carlos R. Mafra
parent f6080ffd56
commit 060ba6a9cd
17 changed files with 193 additions and 163 deletions

View File

@@ -16,7 +16,7 @@ LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFTLIBS@ @FCLIBS@ @LIBM@
libWUtil_la_LIBADD = @LIBBSD@
EXTRA_DIST = BUGS make-rgb Examples Extras Tests
EXTRA_DIST = BUGS make-rgb Examples Extras Tests get-wings-flags.in get-wutil-flags.in
# wbutton.c
@@ -85,7 +85,33 @@ AM_CFLAGS =
INCLUDES = -I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
@XFTFLAGS@ @HEADER_SEARCH_PATH@
DISTCLEANFILES = WINGs.pc
DISTCLEANFILES = WINGs.pc get-wings-flags get-wutil-flags
WINGs.pc: Makefile
@echo "Generating $@"
@echo 'Name: WINGs' > $@
@echo 'Description: Small widget set with the NeXTStep(TM) look and feel' >> $@
@echo 'Version: $(VERSION)' >> $@
@echo 'Requires: wrlib' >> $@
@echo 'Libs: $(lib_search_path) -lWINGs $(XFTLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
@echo 'Cflags: $(inc_search_path)' >> $@
get-wings-flags: get-wings-flags.in Makefile
@echo "Generating $@"
@$(SED) -e 's#$${inc_search_path}#$(inc_search_path)#;' \
-e 's#$${lib_search_path}#$(lib_search_path)#;' \
-e 's#$${GFXLIBS}#$(GFXLIBS)#;' \
-e 's#$${XFTLIBS}#$(XFTLIBS)#;' \
-e 's#$${INTLIBS}#$(INTLIBS)#;' \
-e 's#$${XLIBS}#$(XLIBS)#;' < $< > $@
@chmod 755 $@
get-wutil-flags: get-wutil-flags.in Makefile
@echo "Generating $@"
@$(SED) -e 's#$${includedir}#$(includedir)#;' \
-e 's#$${libdir}#$(libdir)#;' \
-e 's#$${INTLIBS}#$(INTLIBS)#;' < $< > $@
@chmod 755 $@
install-exec-local:
@$(NORMAL_INSTALL)