# Makefile for cvs-fast-export # # Build requirements: Read the "buildprep" script. # You may be able to run that to install all dependencies. # # The C compiler must support anonymous unions (GNU, clang, C11). # # If you get a link error complaining that clock_gettime() can't be # found, uncomment the line that includes -lrt in the link flags. # You'll need this if your glibc version is < 2.17; that is for RHEL 6 # or older and Debian Wheezy or older. Alas, we can't unconditionally # include -lrt because Darwin. # # You will see some meaningless failures with git 1.7.1 and older. # # Note: the reason for the .adoc extensions on README/NEWS/TODO is so they'll # display nicely in GitLab's repository-browsing interface. VERSION=$(shell sed -n /dev/null PROFILE: gmon.out gprof cvs-fast-export >PROFILE version: @echo $(VERSION) # Weird suppressions are required because of strange tricks in Bison and Flex. CSUPPRESSIONS = -U__UNUSED__ -UYYPARSE_PARAM -UYYTYPE_INT16 -UYYTYPE_INT8 \ -UYYTYPE_UINT16 -UYYTYPE_UINT8 -UYY_USER_INIT -UYY_READ_BUF_SIZE \ -UYY_NO_INPUT -UECHO -UYY_START_STACK_INCR -UYY_FATAL_ERROR \ -U_SC_NPROCESSORS_ONLN -Ushort -Usize_t -Uyytext_ptr \ -Uyyoverflow -U__cplusplus -U__APPLE__ -DCLOCK_REALTIME=0 cppcheck: cppcheck -I. --template $(CC) --enable=all $(CSUPPRESSIONS) --suppress=unusedStructMember --suppress=unusedFunction --suppress=unreadVariable --suppress=uselessAssignmentPtrArg --suppress=missingIncludeSystem $(EXTRA) --inline-suppr *.[ch] PYLINTOPTS = --rcfile=/dev/null --reports=n \ --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \ --dummy-variables-rgx='^_' PYSUPPRESSIONS = --disable="C0103,C0111,C0301,C0325,C0326,C0410,C0411,C0413,E1305,R0201,R0205,R0801,R0903,R0912,R0913,R0914,W0142,R1705,R1718,R1721,R1724,W0221,W0621" pylint: @pylint $(PYLINTOPTS) $(PYSUPPRESSIONS) cvssync cvsconvert cvsstrip tests/*.py # Because we don't want copies of the test repositories in the distribution. distclean: clean cd tests; $(MAKE) --quiet clean SOURCES = Makefile *.[ch] *.[yl] cvssync cvsconvert cvsstrip buildprep DOCS = control *.adoc cfe-logo.png ALL = $(SOURCES) $(DOCS) tests cvs-fast-export-$(VERSION).tar.gz: $(ALL) $(TAR) --transform='s:^:cvs-fast-export-$(VERSION)/:' --show-transformed-names -cvzf cvs-fast-export-$(VERSION).tar.gz $(ALL) dist: distclean cvs-fast-export-$(VERSION).tar.gz release: cvs-fast-export-$(VERSION).tar.gz html shipper version=$(VERSION) | sh -e -x refresh: html shipper -N -w version=$(VERSION) | sh -e -x