--- Makefile 2024/10/18 23:27:16 1.2 +++ Makefile 2024/10/28 00:01:52 1.4 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.2 2024/10/18 23:27:16 nishi Exp $ +# $Id: Makefile,v 1.4 2024/10/28 00:01:52 nishi Exp $ PWD = `pwd` PLATFORM = generic @@ -22,6 +22,7 @@ src-archive: clean @svn cleanup --remove-unversioned cp -rf . /tmp/tewi-`grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'` cd /tmp && tar --exclude .github -czvf tewi-`grep "define TW_VERSION" tewi-*/Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'`.tar.gz tewi-`grep "define TW_VERSION" tewi-*/Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'` + rm -rf /tmp/tewi-* mv /tmp/tewi-`grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'`.tar.gz ./ ./Tool/option: ./Tool/option.c config.h prepare-config @@ -43,10 +44,10 @@ src-archive: clean $(MAKE) -C $@ $(FLAGS) ./README: ./README.tmpl ./Server/tw_version.h - sed "s/@*VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'`/g" ./README.tmpl > $@ + sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'`/g" ./README.tmpl > $@ install: all ./Tool/genconf ./Tool/itworks - -mkdir -p* $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(DESTDIR)$(PREFIX)/www + -mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(DESTDIR)$(PREFIX)/www if [ '!' -e $(DESTDIR)$(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) lib/tewi `echo $(LIBSUF) | sed 's/\.//g'` > $(DESTDIR)$(PREFIX)/etc/tewi.conf || ( rm $(DESTDIR)$(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi cp mime.types $(DESTDIR)$(PREFIX)/ if [ '!' -e $(DESTDIR)$(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(DESTDIR)$(PREFIX)/www/index.html || ( rm $(DESTDIR)$(PREFIX)/www/index.html ; exit 1 ) ) ; fi