Skip to content

Commit

Permalink
vendor dependencies and autotoolify
Browse files Browse the repository at this point in the history
  • Loading branch information
chorman0773 committed Jun 16, 2021
1 parent 72532a9 commit ed1d704
Show file tree
Hide file tree
Showing 55 changed files with 20,104 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@

# don't need my editor's files
Session.vim

# Non-cargo build directories
build*/

autom4te.cache/
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ edition = "2018"

[dependencies]
argparse = "0.2.2"

[[bin]]
name="lc-make"
151 changes: 151 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Root Options



srcdir = @srcdir@
builddir = @builddir@
abs_builddir = @abs_builddir@

RUSTC = @RUSTC@
RUSTFLAGS := @RUSTFLAGS@

INSTALL := @INSTALL@

RUSTC_IS_LCCC = @rustc_is_lccc@

## Install directories

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
docdir = @docdir@
infodir = @infodir@
localedir = @localedir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
runstatedir = @runstatedir@
sharedstatedir = @sharedstatedir@


# Other Configuration

features =
binaries = lc-make
tests =
# Package specific Configuration

EDITION = 2018

version = 0.2.2

OUTPUT = liblc-make.rlib

CRATE_NAME = lc_make

DEPENDENCIES =

# Autogenerated variables

file_to_crate = $(subst -,_,$(1))

binary_outputs = $(foreach bin,$(binaries),$(bin)@EXEEXT@)

CFG = $(foreach feature,$(features),feature="$feature")

SUBDIRS = vendor/argparse

EXTERN_CRATES = --extern argparse=vendor/argparse/libargparse.rlib $(foreach dep,$(DEPENDENCIES),--extern $(call file_to_crate,$(dep))=$(abs_bindir)/vendor/$(dep)/lib$(dep).rlib)

export CARGO_PKG_VERSION=$(version)
export CARGO_MANIFEST_DIR=@abs_srcdir@

# Targets

all: stamp

.PHONY: all clean distclean install install-strip $(binary_outputs:%=install-%) $(binary_outputs:%=install-strip-%) $(foreach subdir,$(SUBDIRS),$(subdir)/install) $(foreach subdir,$(SUBDIRS),$(subdir)/install-strip) $(foreach subdir,$(SUBDIRS),$(subdir)/clean) $(foreach subdir,$(SUBDIRS),$(subdir)/distclean) $(foreach subdir,$(SUBDIRS),$(subdir)/check)


Makefile: config.status @srcdir@/Makefile.in
@builddir@/config.status Makefile


config.status: @srcdir@/configure
@builddir@/config.status --recheck


stamp: $(binaries) $(OUTPUT)
touch stamp

$(OUTPUT): Makefile


include $(OUTPUT).d

$(OUTPUT).d: $(srcdir)/src/lib.rs $(foreach subdir,$(SUBDIRS),$(subdir)/stamp)
$(RUSTC) $(RUSTFLAGS) --edition $(EDITION) $(foreach cfg,$(CFG),--cfg $(cfg)) --crate-name $(CRATE_NAME) --crate-type rlib --emit dep-info=@builddir@/$(OUTPUT).d -o$(OUTPUT) $< $(EXTERN_CRATES)

$(OUTPUT): $(srcdir)/src/lib.rs $(foreach subdir,$(SUBDIRS),$(subdir)/stamp)
+$(RUSTC) $(RUSTFLAGS) --edition $(EDITION) $(foreach cfg,$(CFG),--cfg $(cfg)) --crate-name $(CRATE_NAME) --crate-type rlib --emit dep-info=@builddir@/$(OUTPUT).d --emit link=@abs_builddir@/$(OUTPUT) -o$(OUTPUT) $< $(EXTERN_CRATES)

include $(foreach bin,$(binary_outputs),$(bin).d)

$(foreach out,$(binary_outputs),$(out).d): %@[email protected]: $(srcdir)/src/bin/%.rs $(OUTPUT)
$(RUSTC) $(RUSTFLAGS) --edition $(EDITION) $(foreach cfg,$(CFG),--cfg $(cfg)) --crate-name $(call file_to_crate,$*) --crate-type bin --emit dep-info=@builddir@/$@ -o$*@EXEEXT@ $< $(EXTERN_CRATES) --extern $(CRATE_NAME)=@abs_builddir@/$(OUTPUT)

$(binary_outputs): %@EXEEXT@: $(srcdir)/src/bin/%.rs $(OUTPUT)
+$(RUSTC) $(RUSTFLAGS) --edition $(EDITION) $(foreach cfg,$(CFG),--cfg $(cfg)) --crate-name $(call file_to_crate,$*) --crate-type bin --emit dep-info=@builddir@/$@.d --emit link=@abs_builddir@/$@ -o$@ $< $(EXTERN_CRATES) --extern $(CRATE_NAME)=@abs_builddir@/$(OUTPUT)

clean: $(foreach subdir,$(SUBDIRS),$(subdir)/clean)
rm -f $(OUTPUT) $(binary_outputs) test-$(OUTPUT:%.rlib=%@EXEEXT@) $(tests:%.rs=%@EXEEXT@) stamp

distclean: clean $(foreach subdir,$(SUBDIRS),$(subdir)/distclean)
rm -f config.status config.log $(OUTPUT).d test-$(OUTPUT:%.rlib=%@EXEEXT@).d $(foreach out,$(binary_outputs),$(out).d) Makefile

$(binary_outputs:%=install-%): install-%: %
$(INSTALL) -m755 $< ${bindir}/

$(binary_outputs:%=install-strip-%): install-strip-%: %
$(INSTALL) -s -m755 $< ${bindir}/

install: $(binary_outputs:%=install-%) $(foreach subdir,$(SUBDIRS),$(subdir)/install)

install-strip: $(binary_outputs:%=install-strip-%) $(foreach subdir,$(SUBDIRS),$(subdir)/install-strip)

include test-$(OUTPUT:%.rlib=%@EXEEXT@).d

tests/:
mkdir tests/

test-$(OUTPUT:%.rlib=%@EXEEXT@).d: $(srcdir)/src/lib.rs
$(RUSTC) $(RUSTFLAGS) --edition $(EDITION) $(foreach cfg,$(CFG),--cfg $(cfg)) --cfg test --crate-name $(CRATE_NAME) --test --emit dep-info=@builddir@/test-$(OUTPUT:%.rlib=%@EXEEXT@).d -otest-$(OUTPUT:%.rlib=%@EXEEXT@) $< $(EXTERN_CRATES)

test-$(OUTPUT:%.rlib=%@EXEEXT@): $(srcdir)/src/lib.rs
+$(RUSTC) $(RUSTFLAGS) --edition $(EDITION) $(foreach cfg,$(CFG),--cfg $(cfg)) --cfg test --crate-name $(CRATE_NAME) --test --emit dep-info=@builddir@/test-$(OUTPUT:%.rlib=%@EXEEXT@).d --emit link=@abs_builddir@/test-$(OUTPUT:%.rlib=%@EXEEXT@) -o$(OUTPUT:%.rlib=%@EXEEXT@) $< $(EXTERN_CRATES)

$(tests:%.rs=%@EXEEXT@): %@EXEEXT@: $(srcdir)/%.rs $(OUTPUT) tests/
+$(RUSTC) $(RUSTFLAGS) --edition $(EDITION) $(foreach cfg,$(CFG),--cfg $(cfg)) --crate-name $(call file_to_crate,$(*F)) --test --emit dep-info=@builddir@/[email protected] --emit link=@abs_builddir@/$@ -o$@ $< $(EXTERN_CRATES) --extern $(CRATE_NAME)=@abs_builddir@/$(OUTPUT)

check: @builddir@/test-$(OUTPUT:%.rlib=%@EXEEXT@) $(tests:%.rs=@builddir@/%@EXEEXT@) $(foreach subdir,$(SUBDIRS),$(subdir)/check)
$(srcdir)/run-tests.sh $(foreach file,$^,@builddir@/$(file))

%/stamp: %/Makefile
+$(MAKE) -C $* stamp

%/clean:
+$(MAKE) -C $* clean

%/install:
+$(MAKE) -C $* install
%/install:
+$(MAKE) -C $* install-strip

%/check:
+$(MAKE) -C $* check
15 changes: 15 additions & 0 deletions aclocal.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# generated automatically by aclocal 1.16.3 -*- Autoconf -*-

# Copyright (C) 1996-2020 Free Software Foundation, Inc.

# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([m4/lcrust_prog_rustc.m4])
Loading

0 comments on commit ed1d704

Please sign in to comment.