Skip to content

Commit bcf657f

Browse files
committed
Only build nip2-icon.o on Windows
Don't generate and build dummy.c on other platforms. Fixes warning when building on MacPorts: dummy.c:1:14: warning: control reaches end of non-void function [-Wreturn-type] Also fixes "make dist" failure if run before "make": make[2]: *** No rule to make target '../src/dummy.c', needed by 'nip2.pot'. Stop.
1 parent b4d2eb4 commit bcf657f

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ po/POTFILES
3030
fred
3131
po/Makefile.in.in
3232
src/.deps/
33-
src/dummy.c
3433
src/gtksheet-marshal.c
3534
src/gtksheettypebuiltins.c
3635
src/lex.c

po/POTFILES.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ src/parse.c
4040
src/managedgvalue.c
4141
src/conversion.c
4242
src/trace.c
43-
src/dummy.c
4443
src/gtkutil.c
4544
src/slider.c
4645
src/action.c

src/Makefile.am

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ nip2_SOURCES = \
184184
plotwindow.h \
185185
model.c \
186186
model.h \
187-
nip2-icon.rc \
188187
option.c \
189188
option.h \
190189
optionview.c \
@@ -296,6 +295,11 @@ nip2_SOURCES = \
296295
workspaceview.c \
297296
workspaceview.h
298297

298+
if OS_WIN32
299+
nip2_SOURCES += \
300+
nip2-icon.rc
301+
endif
302+
299303
helpindex.h:
300304
./makehelpindex.pl $(prefix) > helpindex.h
301305
nipmarshal.h:
@@ -305,13 +309,8 @@ nipmarshal.c:
305309
glib-genmarshal --prefix=nip --body nipmarshal.list >> nipmarshal.c
306310

307311
.rc.o:
308-
if OS_WIN32
309312
cp ${top_srcdir}/share/nip2/data/nip2-icon.ico .
310313
${WINDRES} $< -o $@
311-
else
312-
echo "int poop () {}" >dummy.c
313-
$(CC) -c dummy.c -o $@
314-
endif
315314

316315
# we have to replace the standard .y.c rule: we are a bison-only GLR parser,
317316
# so we can't use autoconf's preferred -y yacc-compatibility stuff

0 commit comments

Comments
 (0)