]> git.pld-linux.org Git - packages/doomlegacy.git/blob - svnversion.patch
- build on x32
[packages/doomlegacy.git] / svnversion.patch
1 --- doomlegacy-1.44/src/Makefile        2011-03-13 23:16:45.655640054 +0200
2 +++ doomlegacy-1.44/src/Makefile        2011-03-13 23:14:40.039898572 +0200
3 @@ -41,11 +41,6 @@
4  # SDL Mixer, to get music
5  HAVE_MIXER=1
6  
7 -# Developers with svn can enable this to have svn number in executable.
8 -# Causes compile error message otherwise.
9 -# Until can find test for presence of svn, this is best that can be done.
10 -#SVN_ENABLE=1
11 -
12  # Subdirectories for objects and binaries
13  O=../objs
14  BIN=../bin
15 @@ -92,7 +87,6 @@
16  NASMFORMAT=elf -DLINUX
17  i_cdmus_o=$(O)/i_cdmus.o
18  
19 -
20  # default system media interface
21  ifndef SMIF
22    SMIF = SDL
23 @@ -331,6 +325,7 @@
24  OBJS :=  $(OBJS) \
25                 $(O)/dstrings.o  \
26                 $(i_cdmus_o)     \
27 +               $(O)/i_main.o    \
28                 $(O)/i_net.o     \
29                 $(O)/i_tcp.o     \
30                 $(O)/i_system.o  \
31 @@ -462,15 +457,13 @@
32  $(O):
33         @mkdir $(O)
34  
35 -.PHONY : versionstring
36 -# This may fail because, (a) svn not installed, (b) not a svn directory.
37 -# This compiles d_main a second time, with SVN_REV set.
38 -versionstring:
39 -ifdef SVN_ENABLE
40 -       $(CC) -c $(CFLAGS) -DSVN_REV=\"`svn info | grep Revision | sed -e 's/Revision: //'`\" d_main.c -o $(O)/d_main.o
41 -endif
42 -
43 +# this prints "exported" if is outside svn dir, and "none" if svn not installed
44 +# release tarball should include svnrev.txt or not use the define in code.
45 +svnrev.txt:
46 +       (svnversion 2>/dev/null || echo none) > $@
47  
48 +$(O)/d_main.o: d_main.c svnrev.txt
49 +       $(CC) $(CFLAGS) -DSVN_REV=\"`cat svnrev.txt`\" -c $< -o $@
50  
51  $(BIN)/wadtool: $(O)/wadtool.o $(O)/md5_cpp.o
52         $(CXX) $(LDFLAGS) $^ -o $@
53 @@ -503,12 +496,11 @@
54  asm: $(BIN)/$(EXENAME)
55         objdump -d $(BIN)/$(EXENAME) --no-show-raw-insn > $(BIN)/doomlegacy.s
56  
57 -
58  # executable
59 -$(BIN)/$(EXENAME): $(O) $(OBJS) $(O)/i_main.o versionstring
60 +$(BIN)/$(EXENAME): $(O) $(OBJS)
61  #       @mkdir $(BIN)
62         @echo Linking...
63 -       $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(O)/i_main.o \
64 +       $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) \
65         -o $(BIN)/$(EXENAME) $(LIBS)
66  
67  
This page took 0.076925 seconds and 3 git commands to generate.