Browse Source

patch and restore system

dwm6.4
Ivan Polyakov 3 years ago
parent
commit
6325677375
  1. 11
      .gitignore
  2. 19
      Makefile

11
.gitignore vendored

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
# dist
dwm
*.tar*
# generated files
config.h
# patch
*.unpatched
*.orig
*.rej

19
Makefile

@ -20,14 +20,14 @@ options: @@ -20,14 +20,14 @@ options:
${OBJ}: config.h config.mk
config.h:
config.h: patch
cp config.def.h $@
dwm: ${OBJ} patch
dwm: ${OBJ}
${CC} -o $@ ${OBJ} ${LDFLAGS}
clean:
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
clean: restore
rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz *.rej $.orig
dist: clean
mkdir -p dwm-${VERSION}
@ -49,7 +49,14 @@ uninstall: @@ -49,7 +49,14 @@ uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/dwm\
${DESTDIR}${MANPREFIX}/man1/dwm.1
patch: patches/*.diff
orig:
find . -iname '*.[ch]' -exec sh -c 'cp $$0 $$0.unpatched' {} \;
restore:
find . -iname '*.unpatched' \
-exec sh -c 'mv $$0 "$${0%.unpatched}"' {} \;
patch: orig
find ${PATCHESDIR} -iname '*.diff' -exec sh -c 'patch < $$0' {} \;
.PHONY: all options clean dist install uninstall
.PHONY: all options clean dist install uninstall orig patch restore

Loading…
Cancel
Save