From: Nishi Date: Thu, 26 Sep 2024 20:28:06 +0000 (+0000) Subject: better makefile X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=174ec25e34f91e92a5540d207df70ef41e913d74;p=tewi.git better makefile git-svn-id: file:///raid/svn-personal/tewi/trunk@170 8739d7e6-ffea-ec47-b151-bdff447c6205 --- diff --git a/Makefile b/Makefile index b84110c..c2b3a17 100644 --- a/Makefile +++ b/Makefile @@ -34,12 +34,12 @@ all: ./Server ./Module ./Tool/genconf ./Tool/itworks sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed -E 's/^"//g'`/g" ./README.tmpl > $@ install: all ./Tool/genconf ./Tool/itworks - mkdir -p $(PREFIX)/bin $(PREFIX)/lib/tewi $(PREFIX)/etc $(PREFIX)/www - if [ ! -e $(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) lib/tewi so > $(PREFIX)/etc/tewi.conf || ( rm $(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi - if [ ! -e $(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(PREFIX)/www/index.html || ( rm $(PREFIX)/www/index.html ; exit 1 ) ) ; fi - if [ ! -e $(PREFIX)/www/pbtewi.gif ]; then ( cp Binary/pbtewi.gif $(PREFIX)/www/ || ( rm $(PREFIX)/www/pbtewi.gif ; exit 1 ) ) ; fi - cp ./Server/tewi $(PREFIX)/bin/ - cp ./Module/*.so $(PREFIX)/lib/tewi/ + mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/lib/tewi $(DESTDIR)$(PREFIX)/etc $(PREFIX)/www + if [ ! -e $(DESTDIR)$(PREFIX)/etc/tewi.conf ]; then ( ./Tool/genconf $(PREFIX) lib/tewi so > $(DESTDIR)$(PREFIX)/etc/tewi.conf || ( rm $(DESTDIR)$(PREFIX)/etc/tewi.conf ; exit 1 ) ) ; fi + if [ ! -e $(DESTDIR)$(PREFIX)/www/index.html ]; then ( ./Tool/itworks > $(DESTDIR)$(PREFIX)/www/index.html || ( rm $(DESTDIR)$(PREFIX)/www/index.html ; exit 1 ) ) ; fi + if [ ! -e $(DESTDIR)$(PREFIX)/www/pbtewi.gif ]; then ( cp Binary/pbtewi.gif $(DESTDIR)$(PREFIX)/www/ || ( rm $(DESTDIR)$(PREFIX)/www/pbtewi.gif ; exit 1 ) ) ; fi + cp ./Server/tewi $(DESTDIR)$(PREFIX)/bin/ + cp ./Module/*.so $(DESTDIR)$(PREFIX)/lib/tewi/ format: clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h