mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +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:
committed by
Carlos R. Mafra
parent
273d17a0be
commit
d364afff02
@@ -4,7 +4,7 @@ prefsdatadir = $(pkgdatadir)
|
|||||||
|
|
||||||
wpexecbindir = @wprefs_bindir@
|
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 =\
|
GENERATED_MENUS =\
|
||||||
menu\
|
menu\
|
||||||
menu.bg\
|
menu.bg\
|
||||||
@@ -24,11 +24,14 @@ GENERATED_MENUS =\
|
|||||||
plmenu.ja\
|
plmenu.ja\
|
||||||
plmenu.ko\
|
plmenu.ko\
|
||||||
plmenu.nl\
|
plmenu.nl\
|
||||||
|
plmenu.pl\
|
||||||
plmenu.ro\
|
plmenu.ro\
|
||||||
plmenu.sk\
|
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 =\
|
NONGENERATED_MENUS =\
|
||||||
menu.ca\
|
menu.ca\
|
||||||
menu.cz\
|
menu.cz\
|
||||||
@@ -54,9 +57,7 @@ NONGENERATED_MENUS =\
|
|||||||
plmenu.de\
|
plmenu.de\
|
||||||
plmenu.fr\
|
plmenu.fr\
|
||||||
plmenu.hr\
|
plmenu.hr\
|
||||||
plmenu.it\
|
plmenu.it
|
||||||
plmenu.pl\
|
|
||||||
plmenu.zh_CN
|
|
||||||
|
|
||||||
dist_prefsdata_DATA =\
|
dist_prefsdata_DATA =\
|
||||||
appearance.menu\
|
appearance.menu\
|
||||||
@@ -65,7 +66,6 @@ dist_prefsdata_DATA =\
|
|||||||
exitscript.sh\
|
exitscript.sh\
|
||||||
README\
|
README\
|
||||||
README.themes\
|
README.themes\
|
||||||
wmmacros\
|
|
||||||
$(NONGENERATED_MENUS)
|
$(NONGENERATED_MENUS)
|
||||||
|
|
||||||
nodist_prefsdata_DATA = $(GENERATED_MENUS)
|
nodist_prefsdata_DATA = $(GENERATED_MENUS)
|
||||||
@@ -76,4 +76,4 @@ CLEANFILES = $(GENERATED_MENUS)
|
|||||||
|
|
||||||
$(GENERATED_MENUS):
|
$(GENERATED_MENUS):
|
||||||
$(AM_V_GEN)sed -e "s:#wprefs#:$(wpexecbindir)/WPrefs:" \
|
$(AM_V_GEN)sed -e "s:#wprefs#:$(wpexecbindir)/WPrefs:" \
|
||||||
$(srcdir)/$@.in > $@
|
-e "s:#wmdatadir#:$(pkgdatadir):" $(srcdir)/$@.in > $@
|
||||||
|
|||||||
@@ -62,12 +62,8 @@ copy() {
|
|||||||
if [ "$file" = "WindowMaker" ]; then
|
if [ "$file" = "WindowMaker" ]; then
|
||||||
sed -e "s|~/GNUstep|$GSDIR|g" "$source" > "$target"
|
sed -e "s|~/GNUstep|$GSDIR|g" "$source" > "$target"
|
||||||
else
|
else
|
||||||
if test "x$GNUSTEP_USER_ROOT" = "x"; then
|
if test "x$GNUSTEP_USER_ROOT" != "x"; then
|
||||||
sed -e "s:#wmdatadir#:$GLOBALDIR:g" \
|
|
||||||
"$source" > "$target"
|
|
||||||
else
|
|
||||||
sed -e "s|\$HOME/GNUstep|$GSDIR|g" \
|
sed -e "s|\$HOME/GNUstep|$GSDIR|g" \
|
||||||
-e "s:#wmdatadir#:$GLOBALDIR:g" \
|
|
||||||
"$source" > "$target"
|
"$source" > "$target"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user