improve makefile
This commit is contained in:
parent
528cf95367
commit
f773ca8a38
4
Makefile
4
Makefile
|
@ -42,12 +42,14 @@ clean:
|
|||
dist: clean
|
||||
mkdir -p spmenu-$(VERSION)
|
||||
cp -rf LICENSE Makefile *.h *.mk *.c scripts/ docs/ libs/ PKGBUILD build.sh spmenu-$(VERSION)
|
||||
[ -f buildconf ] && cp buildconf spmenu-$(VERSION) || :
|
||||
[ -f spmenu.1 ] && cp spmenu.1 spmenu-$(VERSION) || :
|
||||
tar -cf spmenu-$(VERSION).tar spmenu-$(VERSION)
|
||||
gzip spmenu-$(VERSION).tar
|
||||
rm -rf spmenu-$(VERSION)
|
||||
|
||||
install: all
|
||||
install:
|
||||
[ ! -x spmenu ] && make all || :
|
||||
rm -rf $(DESTDIR)$(PREFIX)/share/spmenu/
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/share/spmenu
|
||||
|
|
3
build.sh
3
build.sh
|
@ -95,7 +95,6 @@ build() {
|
|||
make clean
|
||||
[ "$GEN_MANUAL" != "false" ] && make man
|
||||
|
||||
[ "$INSTALL" != "true" ] && \
|
||||
make \
|
||||
CC="$CC" \
|
||||
PREFIX="$PREFIX" \
|
||||
|
@ -142,4 +141,4 @@ check_dist
|
|||
check
|
||||
loadconf
|
||||
build
|
||||
[ "$INSTALL" != "false" ] && install
|
||||
[ "$install" != "false" ] && install
|
||||
|
|
10
buildconf
Executable file
10
buildconf
Executable file
|
@ -0,0 +1,10 @@
|
|||
# buildconf
|
||||
#
|
||||
# This is the default configuration used to build spmenu. The build.sh script reads it.
|
||||
imlib2=true
|
||||
pango=true
|
||||
pangoxft=true
|
||||
xinerama=true
|
||||
openssl=true
|
||||
fribidi=true
|
||||
CC=tcc
|
|
@ -90,7 +90,7 @@ readstdin(void)
|
|||
|
||||
// spmenu:about
|
||||
if (!strncmp("about", items[i].ex, strlen("about"))) {
|
||||
int i = system("printf \"spmenu $([ -f '/usr/share/spmenu/version' ] && cat /usr/share/spmenu/version || printf unknown)\\nBased on dmenu 5.2 from https://tools.suckless.org/dmenu\\nCompiled $([ -f '/usr/share/spmenu/compile-date' ] && cat /usr/share/spmenu/compile-date || printf unknown)\\nCFLAGS: $([ -f '/usr/share/spmenu/cflags' ] && cat /usr/share/spmenu/cflags || printf unknown)\\nCC: $([ -f '/usr/share/spmenu/cc' ] && cat /usr/share/spmenu/cc || printf unknown)\" | spmenu --columns 1 --lines 5 --hide-cursor --no-allow-typing --hide-mode --hide-match-count --hide-prompt --hide-powerline --hide-input --no-indent --no-color-items > /dev/null");
|
||||
int i = system("printf \"spmenu $([ -f '/usr/share/spmenu/version' ] && cat /usr/share/spmenu/version || printf unknown)\\nBased on dmenu 5.2 from https://tools.suckless.org/dmenu\\nCompiled $([ -f '/usr/share/spmenu/compile-date' ] && cat /usr/share/spmenu/compile-date || printf Unknown)\\nCFLAGS: $([ -f '/usr/share/spmenu/cflags' ] && cat /usr/share/spmenu/cflags || printf unknown)\\nCC: $([ -f '/usr/share/spmenu/cc' ] && cat /usr/share/spmenu/cc || printf unknown)\\nDistro: $([ -f '/usr/share/spmenu/pkg_arch' ] && echo Arch || echo Installed manually)\\n\" | spmenu --columns 1 --lines 10 --hide-cursor --no-allow-typing --hide-mode --hide-match-count --hide-prompt --hide-powerline --hide-input --no-indent --no-color-items > /dev/null");
|
||||
if (i||!i) exit(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue