Makefile.am (1107B)
1 AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \ 2 -I$(top_builddir)/lib -I$(top_srcdir)/lib 3 4 CLEANFILES = revision.h 5 6 if BUILDING_FROM_GIT 7 SOMETHING = "REVISION \"`git describe --tags 2>/dev/null`\"" 8 else 9 SOMETHING = "PLAINBUILD \"from tarball\"" 10 endif 11 12 nano.o: revision.h 13 winio.o: revision.h 14 15 # Always run the commands in this rule. But update the target 16 # only when the revision actually changed. 17 revision.h: FORCE 18 @[ -f $@ ] || touch $@ 19 @! git describe >/dev/null 2>&1 || \ 20 echo "#define $(SOMETHING)" | cmp -s $@ - || \ 21 echo "#define $(SOMETHING)" > $@ 22 FORCE: 23 24 bin_PROGRAMS = nano 25 nano_SOURCES = \ 26 definitions.h \ 27 prototypes.h \ 28 browser.c \ 29 chars.c \ 30 color.c \ 31 cut.c \ 32 files.c \ 33 global.c \ 34 help.c \ 35 history.c \ 36 move.c \ 37 nano.c \ 38 prompt.c \ 39 rcfile.c \ 40 search.c \ 41 text.c \ 42 utils.c \ 43 winio.c 44 45 nano_LDADD = $(top_builddir)/lib/libgnu.a @LIBINTL@ \ 46 $(GETRANDOM_LIB) $(CLOCK_TIME_LIB) $(LIBTHREAD) 47 48 install-exec-hook: 49 cd $(DESTDIR)$(bindir) && rm -f rnano && $(LN_S) nano rnano 50 uninstall-hook: 51 cd $(DESTDIR)$(bindir) && rm -f rnano