$(MAKE) -C $@ $(FLAGS)
./README: ./README.tmpl ./Server/tw_version.h
- sed "s/@VERSION@/`grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | 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
clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
get-version:
- @grep "define TW_VERSION" Server/tw_version.h | grep -Eo '"[^\]+' | sed 's/^"//g'
+ @grep "define TW_VERSION" Server/tw_version.h | grep -Eom 1 '"[^\]+' | sed 's/^"//g'
clean:
$(MAKE) -C ./Server $(FLAGS) clean
cd Server
../Tool/genconf "C:/Tewi" modules dll > ../generated.conf
../Tool/itworks > ../itworks.html
-makensis -DVERSION=$VERSION install.nsi
+makensis -DVERSION=$VERSION install.nsi || fail
cp install.exe ../install-nossl.exe
rm -f tewi.exe tewi-service.exe
cd ..
cd Server
../Tool/genconf "C:/Tewi" modules dll > ../generated.conf
../Tool/itworks > ../itworks.html
-makensis -DVERSION=$VERSION install.nsi
+makensis -DVERSION=$VERSION install.nsi || fail
cp install.exe ../install-ssl.exe
rm -f tewi.exe tewi-service.exe
cd ..