Skip to content

Commit

Permalink
tools/Makefile: add option -c to patch to avoid it getting confused w…
Browse files Browse the repository at this point in the history
…hen perforce is used for version control.
  • Loading branch information
danpovey committed Oct 3, 2015
1 parent 4a13a17 commit fa1440d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ endif
# support multi-threads when compile with g++ (gcc) version above 4.1
openfst-$(OPENFST_VERSION)/.patched: | openfst-$(OPENFST_VERSION)
-cd openfst-$(OPENFST_VERSION)/src/include/fst; \
patch -p0 -N < ../../../../extras/openfst-$(OPENFST_VERSION).patch;
$(CXX) -dumpversion | awk '{if(NR==1 && $$1>"4.1") print "cd openfst-$(OPENFST_VERSION)/src/include/fst; patch -p0 -N < ../../../../extras/openfst_gcc41up.patch"}' | sh -
patch -c -p0 -N < ../../../../extras/openfst-$(OPENFST_VERSION).patch;
$(CXX) -dumpversion | awk '{if(NR==1 && $$1>"4.1") print "cd openfst-$(OPENFST_VERSION)/src/include/fst; patch -c -p0 -N < ../../../../extras/openfst_gcc41up.patch"}' | sh -
touch $@

openfst-$(OPENFST_VERSION): openfst-$(OPENFST_VERSION).tar.gz
Expand Down

0 comments on commit fa1440d

Please sign in to comment.