rework makefile
Build/Publish XBPS / build-and-publish (push) Failing after 6s
Details
Build/Publish XBPS / build-and-publish (push) Failing after 6s
Details
This commit is contained in:
parent
5a977fd675
commit
0a13d2a525
|
@ -0,0 +1,64 @@
|
|||
# dmenu - dynamic menu
|
||||
# See LICENSE file for copyright and license details.
|
||||
.PHONY: all clean dist install uninstall
|
||||
|
||||
include config.mk
|
||||
|
||||
SRC = drw.c dmenu.c stest.c util.c
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
all: dmenu stest
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $<
|
||||
|
||||
config.h:
|
||||
cp config.def.h $@
|
||||
|
||||
config.mk:
|
||||
cp config/config.mk config.mk
|
||||
|
||||
${SRC}: buildroot
|
||||
|
||||
$(OBJ): arg.h config.h config.mk drw.h
|
||||
|
||||
stest: stest.o
|
||||
$(CC) -o $@ stest.o $(LDFLAGS)
|
||||
|
||||
dmenu: dmenu.o drw.o util.o
|
||||
$(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
find . -maxdepth 1 -type f | grep -Pv "^\./\.|Makefile$$" | xargs -r rm
|
||||
rm -r tmp patch 2>/dev/null || true
|
||||
git -C dmenu-flexipatch reset --hard HEAD
|
||||
git -C dmenu-flexipatch clean -ffdx
|
||||
|
||||
buildroot:
|
||||
cp config/patches.h dmenu-flexipatch/patches.h
|
||||
flexipatch-finalizer/flexipatch-finalizer.sh -r -d dmenu-flexipatch -o tmp
|
||||
rm -r tmp/Makefile tmp/config.mk patch 2>/dev/null || true
|
||||
mv tmp/* ./
|
||||
rmdir tmp
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
|
||||
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
||||
sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
|
||||
sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
|
||||
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\
|
||||
$(DESTDIR)$(PREFIX)/bin/dmenu_path\
|
||||
$(DESTDIR)$(PREFIX)/bin/dmenu_run\
|
||||
$(DESTDIR)$(PREFIX)/bin/stest\
|
||||
$(DESTDIR)$(MANPREFIX)/man1/dmenu.1\
|
||||
$(DESTDIR)$(MANPREFIX)/man1/stest.1
|
||||
|
15
build.sh
15
build.sh
|
@ -1,15 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
cp config.mk patches.h dmenu-flexipatch/
|
||||
flexipatch-finalizer/flexipatch-finalizer.sh -r -d dmenu-flexipatch -o dmenu-final
|
||||
git -C dmenu-flexipatch reset --hard HEAD && git -C dmenu-flexipatch clean -fd
|
||||
# for patch in patches/*.diff; do
|
||||
# patch -d dmenu-final <"$patch"
|
||||
# done
|
||||
cp config.h dmenu-final/
|
||||
cd dmenu-final || exit 1
|
||||
if [ "$1" = "-i" ]; then
|
||||
sudo make install
|
||||
else
|
||||
make
|
||||
fi
|
Loading…
Reference in New Issue