smol/src/Makefile.am

50 lines
980 B
Makefile

AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
CLEANFILES = revision.h
if BUILDING_FROM_GIT
SOMETHING = "REVISION \"`git describe --tags 2>/dev/null`\""
else
SOMETHING = "PLAINBUILD \"from tarball\""
endif
nano.o: revision.h
winio.o: revision.h
# Always run the commands in this rule. But update the target
# only when the revision actually changed.
revision.h: FORCE
@[ -f $@ ] || touch $@
@echo "#define $(SOMETHING)" | cmp -s $@ - || \
echo "#define $(SOMETHING)" > $@
FORCE:
bin_PROGRAMS = nano
nano_SOURCES = \
definitions.h \
prototypes.h \
browser.c \
chars.c \
color.c \
cut.c \
files.c \
global.c \
help.c \
history.c \
move.c \
nano.c \
prompt.c \
rcfile.c \
search.c \
text.c \
utils.c \
winio.c
nano_LDADD = @LIBINTL@ \
$(LIB_CLOCK_GETTIME) $(LIBTHREAD)
install-exec-hook:
cd $(DESTDIR)$(bindir) && rm -f rnano && $(LN_S) nano rnano
uninstall-hook:
cd $(DESTDIR)$(bindir) && rm -f rnano