1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

menu: Write data directory during build instead of with wmaker.inst.

Many of the menu files contain the macro #wmdatadir# as a placeholder for
the data directory containing Window Maker themes, styles, background
pixmaps, etc.  This macro is replaced by the the actual path to the data
directory (by default /usr/local/share/WindowMaker) by the wmaker.inst
script, but only when copying WMRootMenu to the user's home directory.

Instead, we replace the macro during the build.  This way, *every* menu
file has the correct path.

Note that several of the files in question were not previously generated
during build.  These have been renamed with a .in extension.
This commit is contained in:
Doug Torrance
2017-08-17 21:02:25 -04:00
committed by Carlos R. Mafra
parent 273d17a0be
commit d364afff02
5 changed files with 9 additions and 13 deletions

View File

@@ -4,7 +4,7 @@ prefsdatadir = $(pkgdatadir)
wpexecbindir = @wprefs_bindir@
# menus which need generated to have correct path to WPrefs
# menus which need generated to have correct path to WPrefs or data directory
GENERATED_MENUS =\
menu\
menu.bg\
@@ -24,11 +24,14 @@ GENERATED_MENUS =\
plmenu.ja\
plmenu.ko\
plmenu.nl\
plmenu.pl\
plmenu.ro\
plmenu.sk\
plmenu.zh_TW
plmenu.zh_CN\
plmenu.zh_TW\
wmmacros
# menus which do not mention WPrefs
# menus which do not mention WPrefs or data directory
NONGENERATED_MENUS =\
menu.ca\
menu.cz\
@@ -54,9 +57,7 @@ NONGENERATED_MENUS =\
plmenu.de\
plmenu.fr\
plmenu.hr\
plmenu.it\
plmenu.pl\
plmenu.zh_CN
plmenu.it
dist_prefsdata_DATA =\
appearance.menu\
@@ -65,7 +66,6 @@ dist_prefsdata_DATA =\
exitscript.sh\
README\
README.themes\
wmmacros\
$(NONGENERATED_MENUS)
nodist_prefsdata_DATA = $(GENERATED_MENUS)
@@ -76,4 +76,4 @@ CLEANFILES = $(GENERATED_MENUS)
$(GENERATED_MENUS):
$(AM_V_GEN)sed -e "s:#wprefs#:$(wpexecbindir)/WPrefs:" \
$(srcdir)/$@.in > $@
-e "s:#wmdatadir#:$(pkgdatadir):" $(srcdir)/$@.in > $@

View File

@@ -62,12 +62,8 @@ copy() {
if [ "$file" = "WindowMaker" ]; then
sed -e "s|~/GNUstep|$GSDIR|g" "$source" > "$target"
else
if test "x$GNUSTEP_USER_ROOT" = "x"; then
sed -e "s:#wmdatadir#:$GLOBALDIR:g" \
"$source" > "$target"
else
if test "x$GNUSTEP_USER_ROOT" != "x"; then
sed -e "s|\$HOME/GNUstep|$GSDIR|g" \
-e "s:#wmdatadir#:$GLOBALDIR:g" \
"$source" > "$target"
fi
fi